title: File permissions with python
body: <p>I have an xml file on a windows network drive that I am trying to read and write to. I have full permission to edit the file normally (in gedit or anything), but when I attempt to parse the xml file in python, I get a permissions error. Any ideas?</p>
  
  <p>Here is an example of what I am trying to do:</p>
  
  <pre><code>from xml.etree import ElementTree as ET
  file = "/directory/to/xml/file"
  nfo = ET.parse(file)
  </code></pre>
  
  <p>I then read info from the file and write to the file. It hangs up when trying to write to the file (even though when I use gedit, I can write to the file fine)</p>
  
  <p>the error I get is:</p>
  
  <pre><code>Traceback (most recent call last):
    File "parser.py", line 277, in &lt;module&gt;
      nfo.write(file)
    File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 803, in write
      file = open(file_or_filename, "wb")
  IOError: [Errno 13] Permission denied: '/directory/to/xml/file'
  </code></pre>