1 points · by johnrob · 18y ago · 3 comments
myhtml = '''
<html><body>
<p>%(firstname)s</p>
<p>%(lastname)s</p>
</body></html>
''' % {'firstname':'john','lastname':'doe'}
It's not pretty, but I feel less hindered by this approach. I'm curious what people think the main downsides of this are...
I fixed this by simply using string replace(), and suitably unique replace tokens.
(Then again, I program in Notepad, preferring it for aesthetic reasons over Emacs, so go figure :-)