writing html code
John Hunter
jdhunter at ace.bsd.uchicago.edu
Thu Mar 6 22:54:04 EST 2003
>>>>> "Ali" == Ali Dada <dada_ali at hotmail.com> writes:
Ali> hi all: i am new to python and i have a couple of small
Ali> questions, let's start with the first for now: i want to
Ali> write a script that launch a web browser and writes in in
Ali> some text. so basically what is the command open the browser
Ali> in write mode and what is the command that permits us to
Ali> write html code into the opened brower? is the latter
Ali> something like
Ali> file.write(<p>this text will appear in the browser</p>) ??
Ali> thanks and expect to here from me more!!!
Is this really what you want to do? I can't see why you need python
to *open* the web browser. Why not write the html to a file and open
that file in an already running browser. Maybe bookmark it, as in a
bookmark to
file:///home.yourname/yourfile.html
You can certainly write html in python
fh = file('yourfile.html', 'w')
fh.write('<html>\n')
fh.write('Hello!\n')
fh.write('</html>\n')
It would help if you said more specifically why you need to do what
you ask.
John Hunter
More information about the Python-list
mailing list