![]() |
Recover currently running script? - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Recover currently running script? (/thread-1132.html) |
Recover currently running script? - kbriden - Dec-06-2016 I have a program that I used Notebook++ to write, and I did not back it up for the past two weeks even though I put a ton of work into it. I ran the script using iPython in Powershell and then Notebook crashed and completely wiped out the original code. The file name is saved with no lines of code in it. I am a relatively new programmer who learned the hard way why backing up and GitHub are so important, but does anyone have any idea of a way that I can recover the code, especially since it is still running in iPython? There must be a cache of it somewhere or a magic function that will show the code that is in memory? Any help would be incredibly appreciated! RE: Recover currently running script? - stonetr33 - Dec-07-2016 you mean notepad++ right? hopefully you've learned a valuable lesson. i think you'd have better luck reaching out on an iPython forum, maybe a copy of it is made somewhere along the line. Maybe notepad++ has it cached somewhere but i would have no clue, better to ask on a notepad++ forum heh. good luck! RE: Recover currently running script? - Larz60+ - Dec-07-2016 what happens if you type object_name? (include the ?) I would take a look at what's available in inspect (needs to be imported) in addition, ipython has some builtin commands that may be of help. Sorry that I don't have specifics, but it's something. It seems that you might find some way to inspect your namespace. RE: Recover currently running script? - sparkz_alot - Dec-07-2016 Not sure which version of Windows you're using, but in Windows 10, Notepad++ will keep a backup file that it is working on in the C:\Users\user_name \AppData\Roaming\Notepadd++\backup. It might have a name like: file_name.py@2016-12-07_084239. If your lucky, it might still be there. |