[issue24971] os.environ.get() does not return the Environment Value in Linux

eryksun report at bugs.python.org
Mon Aug 31 20:28:04 CEST 2015


eryksun added the comment:

Did you mark the variable for export in your shell? For example:

    $ v=1
    $ python -c 'import os;print os.environ.get("v")'
    None

    $ export v
    $ python -c 'import os;print os.environ.get("v")'
    1

----------
nosy: +eryksun

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24971>
_______________________________________


More information about the Python-bugs-list mailing list