[Tutor] ftplib.storbinary and using a progress bar
Alan Gauld
alan.gauld at btinternet.com
Sun Sep 7 10:13:17 CEST 2008
"johnf" <jfabiani at yolo.com> wrote
> 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.
If you don't fancy getting the 2.6 source as Terry suggested then
the other way to do this kind of thing is with a separate thread.
Start
the new thread which just displays a progress bar (you need to find
how big the file is before hand and check progress as you go too)
Then in the main thread run the transfer and terminate the progress
thread when you finish.
How easy this is depends on your familiarity with threads I guess!
As threading goes its a fairly straighforward use.
Alan G.
More information about the Tutor
mailing list