<br><br><div class="gmail_quote">On Fri, Jun 6, 2008 at 9:16 AM, John Dohn <<a href="mailto:john.dohn.john@gmail.com">john.dohn.john@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Sat, Jun 7, 2008 at 12:50 AM, Derek Tracy <<a href="mailto:tracyde@gmail.com" target="_blank">tracyde@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><div class="Ih2E3d"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

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.  </blockquote>

</div><div><br><div class="Ih2E3d">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. <br><br>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. <br>
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.<br><br>JDJ</div></div></div>
<br>--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br></blockquote></div><br>I will look for the AJAX Progress Bar, but I will admit I have never touched AJAX and haven't written javascript in years.<br>
<br>I patched Pythons ftplib.py storbinary() to send callbacks to the specified method, so I have the callbacks locked down.  The thing to note is that this app isn't allowing the user to upload to the server the cgi is on but rather allowing the user to kick off an ftp process on the server to another server.<br>
<br>Would there be a way to do this with python cgi and automatically append or update information on the page it is displaying?<br clear="all"><br>-- <br>---------------------------------<br>Derek Tracy<br><a href="mailto:tracyde@gmail.com">tracyde@gmail.com</a><br>
---------------------------------<br>