Re: [Tutor] Document URI?

Magnus Lycka magnus at thinkware.se
Tue Dec 9 11:48:56 EST 2003


Chris Heisel wrote:
> Our server admin recently upgrade to Python2.3 and now Python is saying 
> that there is no 'DOCUMENT_URI' key.

Ok, but I'm not so sure those things are related... Whatever
version of Python you use, you are just reading the environment
variables provided by the operating system. The operating
system won't make different environment variables available
to a process depending on what version of Python you use.

If a change in the python installation caused a difference here,
it's a difference in how Python scripts are executed, not simply
a version change. Are you running the Python scripts as CGI scripts?
What else changed? OS? Web server? Configuration?
 
> Previously the os.environ['DOCUMENT_URI'] would return /foo/index.html 
> but now its saying there's no value...

Try printing out all the os.environ items from a CGI script.
I think I showed an example of how to do this here a week
or two ago...

-- 
Magnus Lycka, Thinkware AB
Alvans vag 99, SE-907 50 UMEA, SWEDEN
phone: int+46 70 582 80 65, fax: int+46 70 612 80 65
http://www.thinkware.se/  mailto:magnus at thinkware.se



More information about the Tutor mailing list