Getting the bytes or percent uploaded/downloaded through FTP?

Fredrik Lundh fredrik at pythonware.com
Mon Sep 5 12:22:28 EDT 2005


Steve Holden wrote:

> The only way I can think of to get the size of the file you're about to
> download is using the FTP object's .dir() method. If you have the Tools
> directory (standard on Windows, with source on other platforms) you can
> take a look at the ftpmirror script - a fairly recent version can be seen at
>
>     http://weblog.cs.uiowa.edu/python-2.3.1/Tools/scripts/ftpmirror.py

to handle arbitrary servers, you also need a flexibel LIST response
parser; see:

    http://cr.yp.to/ftpparse.html

python bindings:

    http://c0re.23.nu/c0de/ftpparsemodule/

and

    http://effbot.org/downloads/#ftpparse

</F> 






More information about the Python-list mailing list