[Tutor] ftplib.storbinary and using a progress bar
johnf
jfabiani at yolo.com
Sun Sep 7 16:10:39 CEST 2008
On Saturday 06 September 2008 06:49:39 pm johnf 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.
Once I took a look at the source for ftplib I decided to subclass the module.
I then provided my own method with a callback. For my purpose I just passed
an integer back (a counter). But thanks everyone for the help. It was a
good lesson anyway.
--
John Fabiani
More information about the Tutor
mailing list