Predefined Variables

Fred Atkinson fatkinson at
Sun Aug 2 05:07:21 CEST 2009

On Sat, 01 Aug 2009 18:56:33 -0700, Fred Atkinson
<fatkinson at> wrote:

>On Thu, 23 Jul 2009 15:28:50 +0200, "Diez B. Roggisch"
><deets at> wrote:
>>Fred Atkinson wrote:
>>> Is there a pre-defined variable that returns the GET line
>>> ( as a
>>> single variable (rather than individual variables)?
>>Variables don't return things. Functions do. And additionally the answer
>>depends on what and with what you actually do.
>	I want to display the client browser's IP address on the Web
>	I'd like to create a variable like this: ip = somefunction(). 
>	Then I can print the IP address on the Web page and/or log it
>in an error file.  
>					Fred 

I replied to the wrong post.  


     I want to do something like this: 

            string = os.environment('QUERY_STRING')

    If this is the string in the URL:
   'string' should now contain the value

   When I use the os.environment('QUERY_STRING'), it doesn't work.  

   Is there something I should import to make this function work?  Or
what else is wrong?  


More information about the Python-list mailing list