News for hackers. Stuff that matters.
Re:Python for Humans by aiiane on Sunday November 11, 2012 @06:20PM (#4770949)
Why not just add an atexit trap that automatically cleans up open logs?

http://docs.python.org/2/library/atexit.html

Re:Python for Humans by LeafStorm on Sunday November 11, 2012 @06:30PM (#4770972)
I 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.

Re:Python for Humans by peter_l_downs on Sunday November 11, 2012 @06:32PM (#4770973)
LeafStorm got to it before me :)