hello, I wrote a lot of important python code for my project. unfortunately, I ran sed with wrong options and lost my files :( In repo these files are very old, but I have the pyc files.
How can I convert pyc files to py?
Thanks!
hello, I wrote a lot of important python code for my project. unfortunately, I ran sed with wrong options and lost my files :( In repo these files are very old, but I have the pyc files.
How can I convert pyc files to py?
Thanks!
http://www.crazy-compilers.com/decompyle/
There is still the package on Debian and friends (called decompyle) of the standalone software (ie, no need to send your pyc files), but it probably won't decompile 2.6 (or earlier).
A quick search found a tool at http://byteplay.googlecode.com/svn/trunk/byteplay.py . http://wiki.python.org/moin/ByteplayDoc has docs.
I also saw http://www.depython.net/ and it looks really easy to use.
I know this doesn't answer your question direcly, but
Seriously, don't ever ever ever let this happen again. You should be using source control and some form of regular backups on every last line of code that you write.
There are a thousand good VCS's out there, hell just search stackoverflow for options. Bazaar is a good example of one that is easy-as-pie to use. Back it up to a portable hard drive, another PC, or use Dropbox for automatic backups.
you can use depython.com online service. http://depython.com is a new alternative online decompiling tool for Python pyc files. It does not have file size limit.