<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2730.1700" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Is there any way to ínclude percentage
signs (as text) in a string, that also contains format modulos
(%s)?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I'm sorry if the above makes no sense, but thats
the reason for posting! I have no clue what to search for... I tried
but...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>So I better give an example of what I want to
do:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>>>> txt = "Hello %s. This is a
percentagesign: %"</FONT></DIV>
<DIV><FONT face=Arial size=2>>>> name = "Thomas"</FONT></DIV>
<DIV><FONT face=Arial size=2>>>> print txt % name</FONT></DIV>
<DIV><FONT face=Arial size=2>Traceback (most recent call last):<BR> File
"<pyshell#55>", line 1, in ?<BR> print txt %
name<BR>ValueError: incomplete format<BR>>>> # should be
this:</FONT></DIV>
<DIV><FONT face=Arial size=2>>>> # Hello Thomas. This is a
percentagesign: %</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Basically I want to use the modulo thing to insert
variable values on a web page (cgi output) where there are a lot of percentages
signs that shouldn't be formated because they are part of the
html-code.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Alright I hope it made better sense in the
end.</FONT></DIV>
<DIV><FONT face=Arial size=2>And thanks in advance for any
suggestions.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>For now</FONT></DIV>
<DIV><FONT face=Arial size=2>Ole</FONT></DIV></BODY></HTML>