[Zope] python Script to download a file

Hervé Richard Herve.Richard at avignon.inra.fr
Thu Jan 15 12:01:47 EST 2004


Hi list,

I write a python script which return a selected file to download.
The script receive value from a form to choose the kind of file to 
download (and increment the counter of the file selected):
For example, in a folder i have 2 files ("A.tgz" and "B.tgz") and a Page 
Template Object (chooseFileToDownload.html). This page is a form with 
multiple choice in order to seclect a file to download (if the user 
select "A" button, he must get the A.tgz file, if select "B" he must get 
A.tgz ...)

I write the python script method to select the file but i don't know how 
the script sends the file to download:
With the variable "fileToDownload" which contain the name of the file 
selected, if i write "return fileToDownload" in my script i get all the 
file (in his compressed format) in my navigator windows, but *no* a 
popup windows which ask me where i want to save the file like we have 
any time we want to download a file.

Thanks for any help !


_______________________________________________
Hervé RICHARD	  Herve.Richard at avignon.inra.fr
INRA - Biometrie
_______________________________________________






More information about the Zope mailing list