Help, I screwed up.
I have a somewhat complex python script that is currently running in a putty window to a Ubuntu server.
I accidentally overwrote the scri
I am two years too late for this question but this is how i recovered my script.
After running the script, in the pycache folder, there will be .pyc (bytecode) file with the same name as the script. You can use a third party module called uncompyle to decompile this .pyc file to get back the source code. The only disadvantage is that your comments will get lost. But something is better than nothing.