Recover overwritten .py file overwitten using Spyd

2019-08-16 04:32发布

问题:

I know I should have used version control but I have accidentally overwritten a script (.py file) by saving another script with exactly the same name while using Spyder.

Is there any way at all this can be recovered?

回答1:

Once the file has been compiled to a pyc it is lost. If you still have the old pyc file you may be able to decompile it:

Is it possible to decompile a compiled .pyc file into a .py file?