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
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
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
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
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
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
[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'''
[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]