I'm working on Spyder IDE, version 3.0.0. My python version is 2.7.12. For some reason, the atexit mechanism doesn't work on this particular IDE.
Code
import atexit
def done():
print '2'
atexit.register(done)
print '1'
Result
When I run the script in PyCharm or from Windows cmd, it prints:
1
2
When I run it from Spyder, done function is not being called, and 2 is not printed. The final result is:
1
Does someone knows why is that and how can I fix it?
Thanks!