Git Product home page Git Product logo

Comments (10)

dpogue avatar dpogue commented on May 20, 2024

By default the output goes to stdout, so you should be able to invoke it from a terminal like ./bin/pycdc input.pyc > output.py

from pycdc.

MaisKolben avatar MaisKolben commented on May 20, 2024

I use it on Windows and i want to edit the source for this progress. becauae i want to decomepyle man files and don't like to change everytime the input and output name. in windows i can drag the file on the exe. that's because i want to edit the source.

from pycdc.

zrax avatar zrax commented on May 20, 2024

If you want to construct a filename based on the input, you can get that from argv[1] (the easiest, albeit not very robust, way would be just to strip off the final 'c' by replacing it with '\0'). However, you could also create a .bat file that would redirect stdout, and then do your drag-n-drop onto that, if you didn't want to mess with the source.

from pycdc.

MaisKolben avatar MaisKolben commented on May 20, 2024

yes that what i want, can you give me a example code for the batch?

Kind regards

from pycdc.

Mystler avatar Mystler commented on May 20, 2024

I think it should be as simple as
pycdc %1 > %~n1.py

You can drag and drop the *.pyc file onto that batch and it will write the decompiled code to *.py

from pycdc.

MaisKolben avatar MaisKolben commented on May 20, 2024

The program ist create now the file, but the file is empty ..
Any idea?

from pycdc.

Mystler avatar Mystler commented on May 20, 2024

Make sure the .bat file can find pycdc. You can put pycdc in your path, start the batch file in the same folder or replace pycdc with the whole path, e.g.
C:\Dev\pycdc\bin\pycdc %1 > %~n1.py

from pycdc.

MaisKolben avatar MaisKolben commented on May 20, 2024

Same problem:

My Batchfile:
C:\Users\LoLz\Desktop\Dekompieler-MaisKolben\Decompyle.exe %1 > %~n1.py

The output-file is every time empty :(

from pycdc.

zrax avatar zrax commented on May 20, 2024

If you have any spaces in your path, you'll need to surround the parameters with quotes:
C:\Path\To\pycdc.exe "%1" > "%~n1.py"

However, an empty output file often means an error occurred (errors go to stderr). To debug this, you can run it from a command prompt and see what error message is given, or if you prefer, you can add another parameter to the .bat file to print errors to another file:
C:\Path\To\pycdc.exe "%1" 1>"%~n1.py" 2>"%~n1.err"

EDIT: Also worth noting that if you built with VS2012 in Release mode, you'll need to pull the latest fix I just added >.>

from pycdc.

MaisKolben avatar MaisKolben commented on May 20, 2024

.err File and the output File are empty.
I going crazy here >.<.
Thanks for your help, but i think if anyone can give me the edited source with the argv it will be works without problems.

from pycdc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.