in example - we wrote script named getfile pya python cgi program designed to display any public server-side filewithin web browser (or other recipienton the requesting client machine it uses content type of text/plain or text/html to make the requested file' text show up properly inside browser in the descriptionwe compared getfile py to generalized cgi download toolwhen augmented with cutand-paste or save-as interactions while truegetfile py was intended to mostly be file display tool onlynot cgi download demo if you want to truly and directly download file by cgi (instead of displaying it in browser or opening it with an application)you can usually force the browser to pop up save as dialog for the file on the client by supplying the appropriate content-type line in the cgi reply browsers decide what to do with file using either the file' suffix ( xxx jpg is interpreted as an image)or the content-type line ( text/html is html codeby using various mime header line settingsyou can make the datatype unknown and effectively render the browser clueless about data handling for instancea content type of application/octet-stream in the cgi reply generally triggers the standard save as dialog box in browser this strategy is sometimes frowned onthoughbecause it leaves the true nature of the file' data ambiguous--it' usually better to let the user/client decide how to handle downloaded datarather than force the save as behavior it also has very little to do with pythonfor more detailsconsult cgi-specific textor try web search on "cgi download server-side scripting