title: How can I set the last modified time of a file from python?
body: <p>I have a python script that downloads a file over FTP using <a href="http://docs.python.org/library/ftplib.html">ftplib</a>.</p>
  
  <p>My current download code looks just like the example in the ftp lib docs:</p>
  
  <pre><code>ftp.retrbinary('RETR README', open('README', 'wb').write)
  </code></pre>
  
  <p>Now I have a requirement that the file downloaded over FTP needs to have the same last modified time as the file on the FTP server itself. Assuming I could parse out the time from <code>ftp.retrlines('list')</code>, how can I set the modified time on the downloaded file?</p>
  
  <p>I'm on a unix based OS if that matters.</p>