Re: generate HTML

2005-11-15 Thread s99999999s2003
thanks i will check out the example you have given.actually my html output is a bit dynamic in the sense that i may have different number of rows depending on some inputs. so i am putting everything into a list and using 'extend' to append to that list for every dynamically generated rows using for

Re: generate HTML

2005-11-15 Thread Thomas Guettler
Am Tue, 15 Nov 2005 02:52:54 -0800 schrieb ss2003: > alist = [ ' > ValueError: unsupported format character '"' (0x22) at index 14 Look at this: ===> python Python 2.3.4 (#1, Feb 7 2005, 15:50:45) [GCC 3.3.4 (pre 3.3.5 20040809)] on linux2 Type "help", "copyright", "credits" or "li

Re: generate HTML

2005-11-15 Thread Kent Johnson
Jim wrote: > Perhaps you are trying to do this: > 'text to go here: %s' % ('text',) > ? For that you need a double-quoted string: > "text to go here: %s" % ('text',) Uh, no, not in Python: >>> 'text to go here: %s' % ('text',) 'text to go here: text' >>> "text to go here: %s" % ('text',) 't

Re: generate HTML

2005-11-15 Thread Jim
Perhaps you are trying to do this: 'text to go here: %s' % ('text',) ? For that you need a double-quoted string: "text to go here: %s" % ('text',) (or triple-doubles: """ .. """ as you noted). Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: generate HTML

2005-11-15 Thread s99999999s2003
hi thanks for all the help actually i am doing it the hard way alist = [ 'TEST', '', 'blah' ] f = open('test.html",'w') f.writelines(alist) f.close() but everytime i hit ... alist = [ ' ValueError: unsupported format character '"' (0x22) at index 14 what does it mean? i tried alist = [ 'TE

Re: generate HTML

2005-11-14 Thread Scott David Daniels
Jeffrey Schwab wrote: > [EMAIL PROTECTED] wrote: ... >> def genpage(arg1,arg2): >>print ''' BLAH BLAH.%s %s >> ''' % (arg1, arg2) ... >> i wish to print all these into a HTML output file so that >> when i click on it, it shows me the html page. How can i do that? > ... > Why

Re: generate HTML

2005-11-14 Thread Jeffrey Schwab
[EMAIL PROTECTED] wrote: > hi > i have fucntion that generates a HTML page > > def genpage(arg1,arg2): >print ''' BLAH BLAH.%s %s > ''' % (arg1, arg2) > >print ''' blah blah... %s %s > > ''' % (arg1,arg2)' > > The func is something like that, alot of open'''

Re: generate HTML

2005-11-14 Thread Richie Hindle
[ss2003] > I am stuck at above after doing a lot of f.write for every line of HTML > . Any betterways to do this in python? See the "Templating Engines" section of http://wiki.python.org/moin/WebProgramming - I hope you have a few hours to spare! 8-) -- Richie Hindle [EMAIL PROTECTED]