In Python, whever a module needs some kind of initialization, in order for it to be done automatically, you can just place the code in the module (with zero indent) to be executed on the first import (right?). Is there any way to do automatic deinitialization when the application closes and the modules get collected?
Share
Here’s one way I found, to do this: