title: Python - download a file from a ftp server to a different local name
body: <p>I have the following code:</p>
  
  <pre><code>ftp = ftplib.FTP(ftp_srv)
  ftp.login(ftp_usr, ftp_pass)
  
  for item in list:
      f = open(item.localName,"wb")
      ftp.retrbinary("RETR " + item.remoteName, f.write)
  ftp.quit()
  </code></pre>
  
  <ul>
  <li>"localName" is the name of the file on the local machine, for example: one.txt</li>
  <li>"remoteName" is the name of the file on the FTP server with full path, something like "/share/path/to/file.txt"</li>
  </ul>
  
  <p>In perl this was very easy:</p>
  
  <pre><code> $ftp-&gt;get($ftp_file, $local_file)
  </code></pre>
  
  <p>EDIT:
  The code above does not work. I would like to download the remoteName file to the local machine and on the local machine that file to be named localName. How do I do that? :D 
  EDIT2: made it a list</p>
  
  <p>Thank you</p>