On Mar 23, 2012, at 1:26 PM, Brad Allen wrote:

> Thanks, Glyph. In that case maybe the Python subprocess docs need not
> single out SystemRoot, but instead plaster a big warning around the
> use of the 'env' parameter.

I agree.  I'm glad that my bitter experience here might be useful to someone in 
the future - all those late nights trying desperately to get my unit tests to 
run on some newly configured, slightly weird buildbot didn't go to waste :).

> The "Note" section could instead state something like: "In most cases,
> the child process will need many of the same environment variables as
> the current process. Usually the safest course of action is to build
> the env dict to contain all the same keys and values from os.environ.
> For example... <insert Glyph's examples here>"

I think including all the examples might be overstating the case.  It is 
probably best to say that other operating systems, vendors, and integration 
tools may set necessary environment variables that there is no way for you to 
be aware of in advance, unless you are an expert sysadmin on every platform 
where you expect your code to run, and that many of these variables are 
required for libraries to function properly, both libraries bundled with python 
and those from third parties.

-glyph
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to