Scanning a file

Fredrik Lundh fredrik at
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
> <
> leobject.c?rev=>

that's slightly misleading: CPython will make a decent attempt (via the module cleanup
mechanism: ), 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 mailing list