Downloading Python files
Adam
adam6No_Spam_Please at speedy.co.il
Fri Jul 25 18:20:55 EDT 2003
Luke StClair wrote:
> Only marginally belonging in this newsgroup... but oh well.
>
> I've just started writing in python, and I want to make the files
> available on the web. So I did the standard <a
> href="mypath/myfile.py"> and not surprisingly, it displays like a
> webpage, but just the code. If I gzip it, and then link to the new
> file, it will download, but its so small I don't want it zipped.
> How can I make this into a downloadable
> file SIMPLY? The other thread seems a bit complicated...
>
> Thanks
>
>
>
In order to assure that the file is downloaded and not displayed, you
need a certain amount of control either at the client agent or the server:
1. Server: you need to be able to send the client a header which is
intended for download rather than display (content-type not set to
text/html)
2. Client: you need to be able to tell the client agent to download the
data and save it as file on the disk ("Save targer as...") rather than
display it.
Adam
More information about the Python-list
mailing list