Gregory (Grisha) Trubetskoy
grisha at modpython.org
Tue Jan 14 11:23:31 EST 2003
Tim - look for "subprocess_env" here: http://www.modpython.org/live/mod_python-3.0.1/doc-html/pyapi-mprequest-mem.html Grisha On 14 Jan 2003, Tim Parker wrote: > Hi, > > I have recently installed Python 2.2.2 and Apache 2.0.43, and have > configured a directory to execute mod_python. The problem I have is I > do not seem to be able to access any of the environment variables in the > Request Object form object. Below is the part of my httpd.conf file and > also the python script that I am using. > > # Adding directory for python > Alias /python/ "/usr/local/apache2/mod_python/" > > <Directory "/usr/local/apache2/mod_python"> > AddHandler python-program .py > SetHandler python-program > PythonPath "sys.path+['/usr/local/apache2/mod_python']" > PythonHandler mod_python.publisher > Options +ExecCGI > PythonDebug On > </Directory> > > And the python function is as follows: > > def my_test(req): > dict = req.form > > list = req.form.list > > keys = dict.keys() > str = dict_to_str(dict) > > str = "<H1>Test Page for FieldStorage</H1>\n"+ str + "\nlen(list) %d" > % len(list) > > return str > > > If anyone had any ideas or somewhere I can look at some examples for > using CGI Environment variables that would be really helpful. > > Thanks in advance > regards > Tim. > > > > This e-mail and any attachments are confidential and may also be privileged and/or copyright > material of Intec Telecom Systems PLC (or its affiliated companies). If you are not an > intended or authorised recipient of this e-mail or have received it in error, please delete > it immediately and notify the sender by e-mail. In such a case, reading, reproducing, > printing or further dissemination of this e-mail is strictly prohibited and may be unlawful. > Intec Telecom Systems PLC. does not represent or warrant that an attachment hereto is free > from computer viruses or other defects. The opinions expressed in this e-mail and any > attachments may be those of the author and are not necessarily those of Intec Telecom > Systems PLC. > > This footnote also confirms that this email message has been swept by > MIMEsweeper for the presence of computer viruses. > >
|