There have been a few occasions in which I’ve got some code in some temp files thanks to ipython’s %edit feature, and through some tragic sequence of events or other I end up exiting the shell before saving the code permanently.
Is there any setting anywhere that makes the temporary files, how should I say this … not so temporary?
you can use
%edit filename.pyto keep your edits even after quitting the shell. if you want to use temp files, you could try configuring your editor to automatically save them.you could also hack the ipython source and prevent the shell from cleaning up temp files when exiting: just comment the 5 lines after “# Cleanup all tempfiles left around”. just an idea 🙂