Scanning a file
fredrik at pythonware.com
Tue Nov 1 15:36:36 CET 2005
Alex Martelli wrote:
>> As far as I know, Python simply relies on the opreating system to close
>> files left open at the end of the program.
> Nope, see
that's slightly misleading: CPython will make a decent attempt (via the module cleanup
mechanism: http://www.python.org/doc/essays/cleanup.html ), but any files that are not
closed by that process will be handled by the OS.
CPython is not designed to run on an OS that doesn't reclaim memory and other re-
sources upon program exit.
More information about the Python-list