1

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?

DMSTA
  • 212
  • 3
  • 9

1 Answers1

0

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?

Nachtwache
  • 103
  • 1
  • 9
  • Yeah I don't have a pyc file since it wasn't imported. Seems it's a goner.. – DMSTA Feb 13 '19 at 17:34
  • Well, depending on how recent it was there might be a recoverable file in the caches of your OS, or a prograv that you've used to view it. – RoyM Feb 13 '19 at 17:37