4 ms·
Why not just add an atexit trap that automatically cleans up open logs? http://docs.python.org/2/library/atexit.html http://docs.python.org/2/library/atexit.ht
by aiiane 14y ago
Why not just add an atexit trap that automatically cleans up open logs?
http://docs.python.org/2/library/atexit.html http://docs.python.org/2/library/atexit.html
- LeafStorm 14y agoI am fairly sure that most of the streams and sockets would get closed when the interpreter exited regardless. Also, in accordance to the principle of "explicit is better than implicit," it's generally better to avoid messing with global state (such as atexit) behind the scenes, and to provide a way to shut down the logs manually.
- peter_l_downs 14y agoLeafStorm got to it before me :)