December 10th, 2012, 02:25 PM
Saving file to PC
I am new to Python and I have created a web page where the user fills out information in a form and then press submit and it gets passed to a phython script that returns the output back to the web browser. The output is just a large amount of text. What I would really like to be able to do is have the user fill out the information on the form and when they press submit, I would like them to see the output in the browser but also have the option to save it as a text file to their local pc. I know they can just save from the browser and do a save as .txt file but trying to find out if there is a better way to do the same thing programatically
December 10th, 2012, 02:32 PM
Browser code is limited by design from writing (except cookies) to the client platform. The generally accepted way to do what you want is on the server-side. However, depending on the size of the data you want to write, you might be able to use the cookie approach.
Originally Posted by wfsteady