users of pycurl here?
fredrik at pythonware.com
Fri Oct 7 18:00:25 CEST 2005
Michele Simionato wrote:
> I am having a hard time in finding out how to retrieve information
> about the *size* of files I want to download from an FTP site. Should I
> send a QUOTE SIZE command to the ftp server or is there an easier way?
SIZE isn't a standard FTP command, so that only works for some servers.
if you want your code to work for a wider range of servers, you need to
parse the output from the LIST command:
here's a robust parser for various LIST output formats:
(google for "ftpparse" to find python bindings for that module)
More information about the Python-list