Environment inheritance under Windows NT

Bill Wilkinson yopen at my-deja.com
Sat Jun 26 17:47:27 EDT 1999


In article <Pine.SGI.3.95q.990621173009.142968O-100000 at masox202>,
  "Milton L. Hankins" <mlh at swl.msd.ray.com> wrote:
> Python doesn't seem to pick up the environment from its parent process
> under Windows NT.
>
> If I set an EV (environment variable) in the Windows NT System control
> panel applet, then run a command prompt and use the SET command to
change
> the variable's value, then run Python at that same command prompt,
> os.environ reflects the old (control panel) value of the EV.

yeah, bummer huh...
This has nothing to do with python, but with how NT handles environment
variables.

If you take a look after you change the variable using "set",
you will notice that there are actually two copies of your variable.
The new one can be changed on demand in the current window.

You can ease the pain a little by using the setx.exe utility that comes
with the resource kit.

I am sure there is somthing in the pythonwin extensions that would
handle this as well.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




More information about the Python-list mailing list