From: Michael bridges <micha_el2...@yahoo.com>
To: Alan Gauld <alan.ga...@btinternet.com> Sent: Thursday, 16 June, 2011 0:43:35 Subject: Re: [Tutor] using python to write web page > i do not want to write html, not in whole or in part, nor in reference. > just 100% python. not from a server. The code I showed was 100% Python that created an html file that could be opened in a browser without a server. > i want to write the python only code and have python > only code make the web page that can be read on > any computer with a web browser. Thats exactly what my code does. > no server use, no server down load, no server at all. Thats exactly what my code does. > no python interrupter. No idea what you mean here? If you mean no Python interpreter how do you expect to execute the python code? If you mean you want to read the resultant file without using Python then.... thats exactly what my code does. So does my sample code meet your needs, or is there some other requirement that you haven't explained yet? --- On Wed, 6/15/11, Alan Gauld <alan.ga...@btinternet.com> wrote: > Python can create html files so if you only want to create > an html file just do it: > > content = """ > <html><body> > <P>Hello world</p> > </body></html>""" > > open("myfile.htm","w").write(contents) > Alan G
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor