Re: Predefined Variables
On Sun, 02 Aug 2009 08:11:22 -0700, Scott David Daniels wrote: >Piet van Oostrum wrote: >>> Scott David Daniels (SDD) wrote: >>> SDD> Stephen Cuppett (should have written in this order): > "Fred Atkinson" wrote ... >> Is there a pre-defined variable that returns the GET line... > os.environment('QUERY_STRING') >>> SDD> Maybe you mean: >>> SDD> os.environ['USER'] >> Let's take the best of both: >> os.environ['QUERY_STRING'] > >Sorry about that. I was testing expression before posting, and I don't >do that much cgi stuff. I forgot to restore the variable name. > >--Scott David Daniels >scott.dani...@acm.org I finally got it to work with x =getenv('QUERY_STRING') Regards, Fred -- http://mail.python.org/mailman/listinfo/python-list
Re: Predefined Variables
Piet van Oostrum wrote: Scott David Daniels (SDD) wrote: SDD> Stephen Cuppett (should have written in this order): "Fred Atkinson" wrote ... Is there a pre-defined variable that returns the GET line... os.environment('QUERY_STRING') SDD> Maybe you mean: SDD> os.environ['USER'] Let's take the best of both: os.environ['QUERY_STRING'] Sorry about that. I was testing expression before posting, and I don't do that much cgi stuff. I forgot to restore the variable name. --Scott David Daniels scott.dani...@acm.org -- http://mail.python.org/mailman/listinfo/python-list
Re: Predefined Variables
On Sat, 01 Aug 2009 18:56:33 -0700, Fred Atkinson wrote: >On Thu, 23 Jul 2009 15:28:50 +0200, "Diez B. Roggisch" > wrote: > >>Fred Atkinson wrote: >> >>> Is there a pre-defined variable that returns the GET line >>> (http://www.php.net/index.php?everythingafterthequestionmark) 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. >> >>Diez > > I want to display the client browser's IP address on the Web >page. > > 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. Sorry. I want to do something like this: string = os.environment('QUERY_STRING') If this is the string in the URL: http://www.someurl.com/cgi-bin/somescript.cgi?anythingafterthequestionmark 'string' should now contain the value 'everythingafterthequestionmark' 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? Fred -- http://mail.python.org/mailman/listinfo/python-list
Re: Predefined Variables
On Thu, 23 Jul 2009 15:28:50 +0200, "Diez B. Roggisch" wrote: >Fred Atkinson wrote: > >> Is there a pre-defined variable that returns the GET line >> (http://www.php.net/index.php?everythingafterthequestionmark) 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. > >Diez I want to display the client browser's IP address on the Web page. 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 -- http://mail.python.org/mailman/listinfo/python-list
Re: Predefined Variables
> Scott David Daniels (SDD) wrote: >SDD> Stephen Cuppett (should have written in this order): >>> "Fred Atkinson" wrote ... Is there a pre-defined variable that returns the GET line (http://www.php.net/index.php?everythingafterthequestionmark) as a single variable (rather than individual variables)? >>> os.environment('QUERY_STRING') >SDD> Maybe you mean: >SDD> os.environ['USER'] Let's take the best of both: os.environ['QUERY_STRING'] -- Piet van Oostrum URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4] Private email: p...@vanoostrum.org -- http://mail.python.org/mailman/listinfo/python-list
Re: Predefined Variables
Stephen Cuppett (should have written in this order): "Fred Atkinson" wrote ... Is there a pre-defined variable that returns the GET line (http://www.php.net/index.php?everythingafterthequestionmark) as a single variable (rather than individual variables)? > os.environment('QUERY_STRING') Maybe you mean: os.environ['USER'] --Scott David Daniels scott.dani...@acm.org -- http://mail.python.org/mailman/listinfo/python-list
Re: Predefined Variables
$_SERVER['QUERY_STRING']; (if it's PHP) "Fred Atkinson" wrote in message news:p2qg65d0t4kki1sh0t3v6ileamhkvl9...@4ax.com... > Is there a pre-defined variable that returns the GET line > (http://www.php.net/index.php?everythingafterthequestionmark) as a > single variable (rather than individual variables)? > > Regards, > > > > Fred -- http://mail.python.org/mailman/listinfo/python-list
Re: Predefined Variables
os.environment('QUERY_STRING') "Fred Atkinson" wrote in message news:p2qg65d0t4kki1sh0t3v6ileamhkvl9...@4ax.com... > Is there a pre-defined variable that returns the GET line > (http://www.php.net/index.php?everythingafterthequestionmark) as a > single variable (rather than individual variables)? > > Regards, > > > > Fred -- http://mail.python.org/mailman/listinfo/python-list
Predefined Variables
Is there a pre-defined variable that returns the GET line (http://www.php.net/index.php?everythingafterthequestionmark) as a single variable (rather than individual variables)? Regards, Fred -- http://mail.python.org/mailman/listinfo/python-list
Re: Predefined Variables
Fred Atkinson wrote: > Is there a pre-defined variable that returns the GET line > (http://www.php.net/index.php?everythingafterthequestionmark) 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. Diez -- http://mail.python.org/mailman/listinfo/python-list