thanos vassilakis
thanos at 0x01.com
Thu Jan 16 00:19:10 EST 2003
If you use pso you will have env available in a neat and easy manner: http://sourceforge.net/docman/display_doc.php?docid=11314&group_id=49265 Or you can always see how in pso we get all the enviromental variables ;) good luck, thanos On Tuesday, January 14, 2003, at 09:49 AM, 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. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2398 bytes Desc: not available Url : http://mailman.modpython.org/pipermail/mod_python/attachments/20030116/bf4edf39/attachment-0003.bin
|