title: Python ftplib can't get size of file before download?
body: <p>I'm using ftplib to transfer files.  Everything is working great.  Now I'm trying to get the size of the target file before downloading.</p>
  
  <ol>
  <li><p>First, I tried just getting size with ftp.size(filename).  Server complained that I can't do that in ascii mode.</p></li>
  <li><p>Then I tried setting binary mode using ftp.sendcmd("binary") and ftp.sendcmd("bin").  In both cases the server complained "500 binary Not understood"</p></li>
  </ol>
  
  <p>Can ftplib get size of a file before downloading in this instance?  I don't control the FTP server and can't change how it's behaving.</p>
  
  <p>Thanks</p>