[issue1159] os.getenv() not updated after external module uses C putenv()

2014-09-21 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue1159] os.getenv() not updated after external module uses C putenv()

2014-02-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue1159] os.getenv() not updated after external module uses C putenv()

2014-02-03 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue1159] os.getenv() not updated after external module uses C putenv()

2013-06-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: FYI, PyPy recently got bitten by this: https://bugs.pypy.org/issue1518 A posix.libc_getenv() function could be a solution. -- nosy: +amaury.forgeotdarc ___ Python tracker

[issue1159] os.getenv() not updated after external module uses C putenv()

2013-06-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: The problem is the 'putenv' and 'getenv' appear to be parallel, and seem to be documented as being parallel "Set the environment variable named key to the string value." "Return the value of the environment variable key if it exists," but they are not. Getenv ac

[issue1159] os.getenv() not updated after external module uses C putenv()

2010-09-18 Thread Mark Lawrence
Mark Lawrence added the comment: Can someone please comment on whether or not this issue is still valid. -- nosy: +BreamoreBoy resolution: postponed -> ___ Python tracker ___ __

[issue1159] os.getenv() not updated after external module uses C putenv()

2009-02-11 Thread Jason R. Coombs
Jason R. Coombs added the comment: As a workaround, could you use ctypes to pull the environment back into the python context? For example: http://paste.turbogears.org/paste/34734 -- nosy: +jaraco ___ Python tracker

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-18 Thread Sean Reifschneider
Changes by Sean Reifschneider: -- priority: -> normal resolution: -> postponed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-14 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: > Robert Ancell added the comment: > > draghuram, unfortunately while os.putenv() can be fixed to be > symmetrical any putenv call from a C module cannot, for example: Hi Robert, I understood the problem from your very first report. I brought up putenv() n

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-13 Thread Robert Ancell
Robert Ancell added the comment: I've attached proof-of-concept showing how os.environ would ideally work. It'll only work in Posix, etc etc. Reading into it more there are a lot of general issues with environments and memory allocation which is why I suspect Python doesn't use putenv... See put

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-13 Thread Robert Ancell
Robert Ancell added the comment: draghuram, unfortunately while os.putenv() can be fixed to be symmetrical any putenv call from a C module cannot, for example: If you make an extension: #include PyObject *putenvC(PyObject *module, PyObject *args) { int result; if (!PyArg_ParseTuple(arg

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-13 Thread Stefan Sonnenberg-Carstens
Stefan Sonnenberg-Carstens added the comment: I'd like to see perl/ruby behaviour: an dict (os.environ), nothing more (perl %ENV,ruby $ENV). Get rid of setenv/putenv at all. 3.0a1 has even more: There is os.environ (a dict), os.[put|get]env() and os.environ.putenv() _

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-13 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: > Stefan Sonnenberg-Carstens added the comment: > > > As per the document and my simple test (on Linux), os.putenv() does > > not update os.environ. I think, it should update it. > What would be the benefit ? Symmetrical behaviour. When os.getenv() returns

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-13 Thread Stefan Sonnenberg-Carstens
Stefan Sonnenberg-Carstens added the comment: > As per the document and my simple test (on Linux), os.putenv() does > not update os.environ. I think, it should update it. What would be the benefit ? -- nosy: +pythonmeister __ Tracker <[EMAIL PROTECTED]> <

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-13 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: On 9/13/07, Robert Ancell <[EMAIL PROTECTED]> wrote: > The Python os.getenv() function accesses an Python dictionary which is > mirroring the process environment. This dictionary is populated when the > interpreter starts and updated when os.environ.__seti

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-13 Thread Raghuram Devarakonda
Changes by Raghuram Devarakonda: -- nosy: +draghuram __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-13 Thread Martin v. Löwis
Martin v. Löwis added the comment: Ignore my comment - I see now that you are talking about os.getenv. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-13 Thread Martin v. Löwis
Martin v. Löwis added the comment: I can't see a bug here. If you want the current C library value of the environment variable, just use os.getenv, not os.environ. -- nosy: +loewis __ Tracker <[EMAIL PROTECTED]>

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-13 Thread Robert Ancell
New submission from Robert Ancell: The Python os.getenv() function accesses an Python dictionary which is mirroring the process environment. This dictionary is populated when the interpreter starts and updated when os.environ.__setitem__() or os.putenv() are called. However if the python program