I created an executable file (.exe file) of a python script.
I lost the folder with the original python script (also no backups), due to disk formatting.
By chance I got its executable file on the drive.
Can I re-convert it to the python script?
No, what you dream of is called a decompiler, and cannot really exist (in a reliable and systematic way) for Python (and for most programming languages and their implementations, because they are not homoiconic). Consider that your Python source code is lost (but see also this: analyzing your executable would take a lot of time, a lot of skills, so is practically not worth the effort).
Learn to use a version control system (for your future source code). I recommend git
. Make backups. Even better, publish your software with a free software license (e.g. on github or elsewhere) while you are developping it.
You could also pay a lot of money (perhaps thousands of € or US$) to ask some specialized companies to recover data (hopefully also your lost source code) from your crashed disk drive. This is usually not worth the money.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With