variable to be transmitted from a CGI script to a module

jcj jcjouffre at bigfoot.com
Thu Sep 18 09:17:32 EDT 2003


as the goal is to pass a parameter to a module, I found a way using
the OS environment :

in the cgi, I do like a putenv :
os.environ['MY_UNIX_VARIABLE'] = 'myvalue'

in the module, I do like a getenv :
MY_PYTHON_VARIABLE = os.environ['MY_UNIX_VARIABLE']




More information about the Python-list mailing list