[issue16633] os.environ updates only one copy of env vars under Windows (GetEnvironmentVariable vs. getenv)

2013-01-17 Thread Jerome Dubois
Jerome Dubois added the comment: We encountered the same issue when upgrading our application's JRE from 1.5 to 1.6. We use a kind of grid, which has engines written in C, which uses an embedded JAVA JVM, which loads C dll. One of these uses python. Here is what happens: 1. C executable

[issue16633] os.environ updates only one copy of env vars under Windows (GetEnvironmentVariable vs. getenv)

2012-12-07 Thread Václav Šmilauer
New submission from Václav Šmilauer: On windows, environment variables exist in two copies: one is manipulated using win32 API (GetEnvironmentVariable, SetEnvironmentVariable), and another one is maintained by the C runtime (getenv, _putenv). This is explained in more depth in [1].

[issue16633] os.environ updates only one copy of env vars under Windows (GetEnvironmentVariable vs. getenv)

2012-12-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: I think the problem is: windows process can contain single shared win32 API and several CRT copies — one for Visual Studio 2008, other for VS 2010 etc. We cannot know which CRT version is used by particular extension, so I doubt we can initialize it properly.

[issue16633] os.environ updates only one copy of env vars under Windows (GetEnvironmentVariable vs. getenv)

2012-12-07 Thread Tim Golden
Tim Golden added the comment: Does the same problem obtain if you use os.putenv (which calls the crt putenv under the covers)? -- nosy: +tim.golden ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16633

[issue16633] os.environ updates only one copy of env vars under Windows (GetEnvironmentVariable vs. getenv)

2012-12-07 Thread Václav Šmilauer
Václav Šmilauer added the comment: I checked on Windows 7 64bit with python 2.7 (sorry, not python 3.3 installed here) with the script attached. Each line sets a variable using the method in the very left column, then it attempts to read it back using all methods. os.environ