[pypy-issue] [issue1518] setting PYTHONINSPECT during a script run won't start interactive mode in pypy

Amaury Forgeot d Arc tracker at bugs.pypy.org
Tue Jun 18 14:17:00 CEST 2013


Amaury Forgeot d Arc <amauryfa at gmail.com> added the comment:

os.putenv() calls the libc function.
To start interactive mode, CPython calls the libc function getenv(), and retrieve the value.

OTOH in pypy we use the applevel os.getenv() which reads os.environ, which was built from a 
snapshot of the environment at interpreter startup.

The solution could be to access the *RPython-level* os.environ[]: this one calls the libc 
getenv() on each item access (thanks to the magic in ll_os_environ.py)
Maybe expose this as posix._getenv(), and use it in app_main.py.

tag:easy

----------
nosy: +amaury
status: unread -> chatting

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1518>
________________________________________


More information about the pypy-issue mailing list