I would like to save some variables to pickle file on exit, although closing the program by the user (exit code -1, by pressing the "X" button) do not trigger the .atexit functions.
How can I do this?
I would like to save some variables to pickle file on exit, although closing the program by the user (exit code -1, by pressing the "X" button) do not trigger the .atexit functions.
How can I do this?