os.putenv() has no effect

inq1ltd inq1ltd at inqvista.com
Tue Jun 18 13:24:50 EDT 2013


On Tuesday, June 18, 2013 06:49:31 PM Johannes Bauer wrote:
> Hi group,
> 
> I've tracked down a bug in my application to a rather strange
> phaenomenon: os.putenv() doesn't seem to have any effect on my platform
> 
> (x86-64 Gentoo Linux, Python 3.2.3):
> >>> os.getenv("PATH")
> 
> '/usr/joebin:/usr/local/bin:/usr/bin:/bin:/usr/games/bin:/usr/sbin:/sbin:~/b
> in'
> >>> os.putenv("PATH", "/")
> >>> os.getenv("PATH")
> 
> '/usr/joebin:/usr/local/bin:/usr/bin:/bin:/usr/games/bin:/usr/sbin:/sbin:~/b
> in'
> >>> os.getenv("FOO")
> >>> os.putenv("FOO", "BAR")
> >>> os.getenv("FOO")
> 
> Does anybody know why this would happen or what I could be doing wrong?
> Help is greatly appreciated.
> 
> Thanks in advance,
> Johannes
> 
> 
if you are trying to add a dir to a linux path you need 
to understand how to add or change environment variables. 
research this;
  $ export PATH= $PATH: ???/???/???

jd
inqvista.com


 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130618/49d2ae02/attachment.html>


More information about the Python-list mailing list