Is there a way to automatically execute a Python file when quitting Spyder (sort of like the opposite of startup)?

125 Views Asked by At

Spyder can execute code on startup; one can even run a whole .py file when Spyder is first launched. I was just wondering if there was something similar for when Spyder is closed? That is, automatically execute a .py file when you close/exit Spyder (so the file would be executed just before Spyder is closed)?

0

There are 0 best solutions below