"Dr. Who" <[EMAIL PROTECTED]> writes:
> This seems clunky and my next step was going to be to define generic
> functions which would generate the surrounding html tags only when
> passed the proper argument. I was wondering if there was a better way
> to do this with a standard Python library. I
Dr. Who wrote:
> I have a tool that outputs data in either html or text output.
>
> Currently I'm writing chucnks like:
>
> if html:
> print ''
> print ''
> print ''
> print 'Differences %s: %s' % (htypestr, lbl1)
> if html:
> ...
I'd create two Formatter classes, one for HTML
I have a tool that outputs data in either html or text output.
Currently I'm writing chucnks 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 whi