when will the file be closed

Discussion in 'Python' started by Mage, Apr 24, 2005.

  1. Mage

    Mage Guest

    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
     
    Mage, Apr 24, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. damezumari
    Replies:
    2
    Views:
    501
    damezumari
    Apr 27, 2006
  2. j vickroy
    Replies:
    5
    Views:
    798
    Peter Otten
    Nov 14, 2003
  3. Marco Nicosia
    Replies:
    0
    Views:
    428
    Marco Nicosia
    Feb 25, 2005
  4. Matt Kruse
    Replies:
    5
    Views:
    311
    Richard Cornford
    Sep 9, 2003
  5. Brad Baxter

    do 'file' -- when is file closed?

    Brad Baxter, Apr 5, 2006, in forum: Perl Misc
    Replies:
    7
    Views:
    106
    A. Sinan Unur
    Apr 5, 2006
Loading...

Share This Page