[Tutor] ftplib.storbinary and using a progress bar

Kent Johnson kent37 at tds.net
Sun Sep 7 12:20:35 CEST 2008


On Sat, Sep 6, 2008 at 9:49 PM, johnf <jfabiani at yolo.com> wrote:
> Hi,
> I'm currently using ftplib.storbinary() to upload a file to a FTP server.
> However, I would like to inform the user of the progress being made during
> the file transfer (it could be a very long transfer).  But
> ftplib.storbinary() has no callback like retrbinary() so does anyone have a
> thought on how I can update my user on the progress of the transfer.  BTW  I
> have to use a binary transfer because the file being transfer is not text.

storbinary() is not very complex. You could write your own version
that has a callback function.

Kent


More information about the Tutor mailing list