Simple question: how do I pass a variable from one python script to another?
How do I pass a variable from one python script to another? I'm trying to pass a username from a form to a python script and then another python script on redirect. Any help would be appreciated. Thanks, Rob
Rob Foster writes:
How do I pass a variable from one python script to another? Usually, your would pass it as a parameter...
I'm trying to pass a username from a form to a python script and then another python script on redirect. The HTTP 1.1 standard is very weak on this question.
But, usually, something like RESPONSE.redirect(REDIRECT_URL + '?%s=%s' % (url_quote_plus(param_name), url_quote_plus(param_value))) will work. I.e., you pass the parameter as part of the HTTP URI query string. More info: <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html> Dieter
participants (2)
-
Dieter Maurer -
Rob Foster