Implement file download using python

skulka3 at skulka3 at
Thu Sep 27 18:53:31 CEST 2007

On Sep 27, 11:39 am, "Diez B. Roggisch" <de... at> wrote:
>  skul... at wrote:
> > 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.
> Fetching using ftplib is easy. But serving depends on what
> HTTP-server-environment you use. Please elaborate on that.
> Diez

Thanks Diez for your reply.
I am comfortable with using ftplib to fetch the file. As for the HTTP-
server environment,
I am using Apache 1.3 web server and python 2.1.3.



More information about the Python-list mailing list