Implement file download using python

skulka3 at gmail.com skulka3 at gmail.com
Thu Sep 27 12:29:16 EDT 2007


Hello,

I want to implement file downloads inside an authenticated web page,
such that when a user clicks a link, the server side python code
connects to a ftp server, downloads a relevant file and then streams
the file to the browser for the user to open it with the appropriate
application. In this case it will either be a pdf or a tiff file.

This function is quite similar to something like writing raw bytes to
a ServletOutputStream in java to be rendered directly to the user.

It would be nice if someone can provide guidance, examples on how such
a task may be accomplished using python.

Thanks,
Salil .




More information about the Python-list mailing list