Progress bar in web-based ftp?

CatDude catdude at catfolks.net
Tue May 9 20:37:15 CEST 2006


I've got an application that prompts the user to select a file from his
local computer, checks the user's selection, then sends the file via 
<form name="clients" method="POST" action="upload"
enctype="multipart/form-data">

In the python code that receives the files I've got a section that does
the following:

            if not os.path.isfile(filePath):
                file(filePath, 'wb').write(str(form[name].value))
            else:
                print "File already exists - deleting"
                os.unlink(filePath)
                file(filePath, 'wb').write(str(form[name].value))

after error checking, etc.

My question is whether anyone has ideas as to how I could implement a
progress bar. When I send a large file this way it can take a long time,
and I'd like to be able to reassure the user that something really is
happening.





More information about the Python-list mailing list