Newbie-question: Fetching web-address from the browser!
Jeremy Dillworth
jwdillworth at yahoo.com
Thu Sep 11 14:26:19 EDT 2003
os.environ is available, I've used it in CGI scripts on
WinNT and Win2k. Do you mean you literally tried
os.environ[''] (i.e. a blank key)?
Anyway, creating a file with the following code should
help:
---- snip
import cgi
cgi.test()
---- snip
then punch the address of the script into your browser and
you'll find the CGI module prints a nice report about
what's available in the environment.
Also, there is a reference to standard CGI environment
variables at: http://hoohoo.ncsa.uiuc.edu/cgi/env.html
(these should apply whether you're running IIS/Apache/etc)
--- dermoon <dermoon at hotmail.com> wrote:
> I want to fetch the address from the web-browser when it
> visits a page on my web-server.
>
> I use win2k on this server.
>
> On linux I used os.environ[''], but it seemes it's not available on
> win2k, is this correct?
>
> However, how do I get the address-string?
>
> Any help would be greatfully appreciated!
>
> -Chris
> --
> http://mail.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list