[Python-Dev] is this a bug? no environment variables
Glenn Linderman
v+python at g.nevcal.com
Mon Nov 22 06:40:22 CET 2010
In reviewing my notes from my experimentations with CGIHTTPServer
(Python2.6) and then http.server (Python 3.2a4), I note one behavior I
haven't reported as a bug, nor do I know where to start to figure it
out, other than experimentally.
The experiment: launching CGIHTTPServer without environment variables,
by the simple expedient of using a batch file to unset all the existing
environment variables, and then launching Python2.6 with CGIHTTPServer.
So it failed early: random.py fails at line 110 (Python 2.6).
I suppose it is possible that some environment variables are used by
Python directly (but I can't seem to find a documented list of them)
although I would expect that usage to be optional, with fall-back
defaults when they don't exist. I suppose it is even possible that some
Windows APIs might depend on some environment variables, but I expected
that the registry had replaced such usage completely, by now, with the
environment variables mostly being a convenience tool for batch files,
or for optional, temporary alteration of particular settings.
If anyone knows of documentation listing what environment variables are
required by Python on Windows, I would appreciate a pointer, searches
and doc browsing having not turned it up.
I'll attempt to recreate the test situation later this week with Python
3.2a4, if no one responds, but the only debug technique I can think of
is to slowly remove environment variables until I find the minimum set
required to run http.server successfully for my tests with CGI files.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20101121/1ce9bb85/attachment.html>
More information about the Python-Dev
mailing list