Re: when will the file be closed

2005-04-24 Thread Fredrik Lundh
"Mage" <[EMAIL PROTECTED]> wrote: > The question is above: when will these file be closed? > > for s in file('/etc/passwd'): > print s > > file('/home/mage/test.txt','w').write('foo') when the interpreter gets around to it. if you want to make sure that a file is closed at a given point in y

when will the file be closed

2005-04-24 Thread Mage
Hello, The question is above: when will these file be closed? for s in file('/etc/passwd'): print s file('/home/mage/test.txt','w').write('foo') Mage -- http://mail.python.org/mailman/listinfo/python-list