Question using CGI in Python

Ignacio Vazquez-Abrams ignacio at openservices.net
Tue Aug 28 17:18:46 EDT 2001


On Tue, 28 Aug 2001, Maan M. Hamze wrote:

> or of course you can use:
> print '<input type="hidden" name=',VAR1,'>'
> As you see, you should not include your variable in the string because it
> will be treated just like another string.

Ack! Using a comma in print will result in a space. But it's wrong anyways.
Use the following instead:

---
print '<input type="hidden" name="VAR1" value="%s">' % VAR1
---

-- 
Ignacio Vazquez-Abrams  <ignacio at openservices.net>






More information about the Python-list mailing list