title: why am I getting a 'closed file' message when I run my python script?
body: <p>simple bit of code, just prints out a list of urls I put into a text file (it was printing them with the \n char at the end of each one though - how do I get rid of the \n?):</p>
  
  <pre><code>import mechanize, fileinput
  
  with open('F:\Python\url_list2.txt') as urls:
      content = urls.readlines()
  print content
  </code></pre>
  
  <p>anyway, it worked printed out the list, great. Run it again and I get this message in the python shell:</p>
  
  <pre><code>&lt;closed file 'F:\Python\url_list2.txt', mode 'r' at 0x0000000002E4E390&gt;
  </code></pre>
  
  <p>What is going on? Using windows 7 x64 if that makes any difference?</p>