Module: Destructor/Cleanup Code/etc
aleaxit at yahoo.com
Sun Oct 19 12:32:40 CEST 2003
Dylan Shell wrote:
> How do I register a clean up function for a module written in C? While
> I can find plenty of documentation for the "init<module_name>"
> function... I don't see a single reference on a "done<module_name>" or
> something analogous.
Call function register from standard library module atexit, passing it
the Python-callable function object you want to be called at exit,
and optionally positional and keyword arguments you want to be
used when that function is called. I.e., just like for a module written
More information about the Python-list