Python CGI Upload from Server Status

John Dohn john.dohn.john at
Fri Jun 6 15:16:05 CEST 2008

On Sat, Jun 7, 2008 at 12:50 AM, Derek Tracy <tracyde at> wrote:

> I am trying to create a simple python cgi app that allows the user to kick
> off an ftp from the server the cgi is on to another server; I have that
> piece working using ftplib but since the files in question are usually very
> large (500mb to 2gb) in size I want to be able to display some sort of
> status to the user, preferrably a progress bar of some sort.

You'll need some AJAX progress bar (hint: google for this term ;-) that will
be getting updates from the server or request an update every second or so.

The question is if your upload code can provide progress tracking? If it's
just a call to some xyz.upload("/here/is/my-500M-file.bin") that only
returns after several minutes of uploading without giving you any updates on
how fast things go you're probably out of luck.
OTOH if it can do e.g.callbacks for progress reporting or if it can run in a
separate thread that you could query somehow you can hook that to that AJAX
thing of your choice.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list