"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
your program, you have to close it yourself.

for more on this, read the fine manual:

    http://docs.python.org/ref/objects.html

</F>



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to