closing file
Mark Day
mday at apple.com
Tue Apr 20 19:14:07 EDT 2004
In article <mailman.800.1082472051.20120.python-list at python.org>,
Marcello Pietrobon <teiffel at attglobal.net> wrote:
> Once I open a file, for example as:
> class MyClass:
> def logFileOpen( self ):
> self.fdFilenameLog = file( self.filenameLog, 'a' )
> return
>
> I cannot find in hte documentation how to make sure the file are closed.
File objects have a close() method that you can call. See
<http://docs.python.org/lib/bltin-file-objects.html>
-Mark
More information about the Python-list
mailing list