[Python-Dev] Improving the CGI module

Simon Willison cs1spw at bath.ac.uk
Wed Sep 17 19:57:43 EDT 2003

Hi all,

I've recently started using Python for server side web development, and 
I've been running in to some limitations in the CGI module. The most 
critical of these is that the module provides no method of determining 
whether form data originated in a query string (GET data) or a POSTed 
form. The module also provides very little in the way of support for 
common CGI related operations such as sending common headers and parsing 
and sending cookies; the Cookie module provides parsing capabilities but 
requires additional glue code to extract cookie data from the CGI 

I have previous experience with PHP, which has a number of extremely 
convenient mechanisms for dealing with form input and cookies that I 
sorely miss when working with Python. I have started work on porting 
some of these capabilities, but it struck me that several of the ideas 
represented would make valuable additions to the Python standard library 

I have been working with Python for over a year, but I have no real 
experience of the Python development process. Is this list the right 
place to discuss potential improvements to the CGI module, or should I 
work independently and construct a PEP? I noticed that PEP 222 already 
exists relating to "web library enhancements", but it has a 'Deferred' 
status and appears not to have been modified since December 2000.

Best regards,

Simon Willison

More information about the Python-Dev mailing list