is there an Python equivalent for the PHP super globals like $_POST, $_COOKIE ?

Roy Smith roy at
Fri Nov 12 02:25:19 CET 2010

In article <ibhi4h$evv$1 at>,
 r0g < at> wrote:

> On 11/11/10 14:22, Stef Mientki wrote:
>> I can't find how th get to PHP's equivalent of $_Post and $_Cookie ?

PHP is mostly a one-trick pony.  It's meant to be run as a web scripting 
language with Apache (or, I suppose, something else) on the front end.  
As a result, a lot of web-specific things like $_Post and $_Cookie are 
built into the language.

Python is intended to be more general purpose, so things which are built 
in to other languages usually can be found in library modules.  In this 
case, you probably want to look at the SimpleHTTPServer module.

You may also want to look at any of several web application frameworks 
such as Django, Pylons, etc.  I'm guessing these are overkill for the 
sorts of things you want to do, but they're worth at least browsing to 
get some idea of what's out there.

For what it's worth, I've pretty much avoided PHP for all these years.  
My latest gig, however, has had me doing PHP for the past 3 months or 
so.  The more I learn about PHP, the more I want to go running in the 
other direction.

More information about the Python-list mailing list