Re: [Tutor] HTML/text formatting question

2005-08-03 Thread Kent Johnson
Smith, Jeff wrote: > I have a tool that outputs data in either html or text output. > > Currently I'm writing chucks like: > > if html: > print '' > print '' > print '' > print 'Differences %s: %s' % (htypestr, lbl1) > if html: You might want to consider some kind of template lib

Re: [Tutor] HTML/text formatting question

2005-08-03 Thread Alan G
> if html: >print '' >print '' >print '' You can use a single print with a triple quoted string to simplify a bit. > I was wondering if there was a better way to do this with a standard > Python library. I donlt think there is one in the standard library but there is an HTML genera

[Tutor] HTML/text formatting question

2005-08-03 Thread Smith, Jeff
I have a tool that outputs data in either html or text output. Currently I'm writing chucks like: if html: print '' print '' print '' print 'Differences %s: %s' % (htypestr, lbl1) if html: ... This seems clunky and my next step was going to be to define generic functions