python - Saving program state when user invokes Ctrl-C -


in python, when user invokes ctrl-c, happens? have possibility save program state?

what context-managers? __exit__() section executed?

basically, keyboardinterrupt exception raised inside main thread. yes, can handle catching in try/except block , __exit__() sections executed

https://docs.python.org/2/library/exceptions.html#exceptions.keyboardinterrupt


Comments

Popular posts from this blog

c++ - list<myClass<int> * > sort -

SoapUI on windows 10 - high DPI/4K scaling issue -

java - why am i getting a "cannot resolve method" error on getApplication? -