Python and HTML hidden input variables

Oleg Broytmann phd at phd.russ.ru
Fri Oct 22 10:06:23 EDT 1999


On Fri, 22 Oct 1999 rainer2207 at my-deja.com wrote:
> test = "Hello"
> print "<input type=\"HIDDEN\" name=\"username\"  value=test>"

   You've spent too much time with perl. Python does not interpolate
variables in strings. Do this:

print "<input type=\"HIDDEN\" name=\"username\"  value=%s>" % test

Oleg.
---- 
    Oleg Broytmann      Foundation for Effective Policies      phd at phd.russ.ru
           Programmers don't die, they just GOSUB without RETURN.





More information about the Python-list mailing list