cgi, templates, and the % operator

Bob Horvath bob at horvath.com
Sun Jul 23 01:29:16 EDT 2000


HI all,

I have a CGI script that I would like to be able to use the
% operator and a HTML template to product the outout.
Unfortunately, the HTML that is the template contains table tags
that have percentage widths on them , as in '<table align="center"
width="90%">'.  Later, of course, I have something like 'blah blah
%(var_to_be_replaced)s blah blah'.

The problem is that the % in the width setting looks like a format
string.

Anyway to escape the %, or to turn it into something else that
won't screw up the % operator.

Any other suggestions?




More information about the Python-list mailing list