Reputation: 47
I am trying to decompile a .pyc into a .py to avoid rewriting some code, but I don't understand the instructions given in the description on the page for pycdc on GitHub.
I downloaded it, but how do I run the decompiler? It says ./bin/pycdc [PATH TO PYC FILE]
but I'm not sure what this means. I typed that in the command prompt and it doesn't recognize it. What do I need to do?
Upvotes: 1
Views: 16015
Reputation: 3010
Make sure you first build it using Visual Studio. There is a pycdc.vcproj in the repo. Double-click that to open Visual Studio. Then build it. This would put the pycde executable in the \bin folder.
Then from the root directory i.e from pycde-master folder, do
bin\pycde yourfile
where yourfile is the file you want to decompile. If your file is in C:\tmp\yourfile.pyc
, do
bin\pycde C:\tmp\yourfile.pyc
Upvotes: 3
Reputation: 1601
This ./
notation only applies to unix shell commands. This does not apply to Windows. It means you have to run pydc [PATH TO PYC FILE]
, where [PATH to PYC FILE]
, is the directory to the pyc file. For example:
If your pyc file is named example.py
and is located in C:\Users\Bobby\example.py
then you would type:
python pycdc C:\Users\Bobby\example.py
Upvotes: 1