[mod_python] Query about FieldStorage

Tim Parker tim.parker at intec-telecom-systems.com
Tue Jan 14 14:49:53 EST 2003


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 --------------
An HTML attachment was scrubbed...
URL: http://mailman.modpython.org/pipermail/mod_python/attachments/20030114/51d59bd9/attachment-0003.htm


More information about the Mod_python mailing list