Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #48651
| From | inq1ltd <inq1ltd@inqvista.com> |
|---|---|
| Subject | Re: os.putenv() has no effect |
| Date | 2013-06-18 13:24 -0400 |
| Organization | inqvista |
| References | <kpq32r$cdc$1@news.albasani.net> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3551.1371578736.3114.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
os.putenv() has no effect Johannes Bauer <dfnsonfsduifb@gmx.de> - 2013-06-18 18:49 +0200
Re: os.putenv() has no effect Johannes Bauer <dfnsonfsduifb@gmx.de> - 2013-06-18 19:48 +0200
Re: os.putenv() has no effect inq1ltd <inq1ltd@inqvista.com> - 2013-06-18 13:24 -0400
Re: os.putenv() has no effect Dave Angel <davea@davea.name> - 2013-06-18 14:09 -0400
Re: os.putenv() has no effect Johannes Bauer <dfnsonfsduifb@gmx.de> - 2013-06-18 20:12 +0200
Re: os.putenv() has no effect Johannes Bauer <dfnsonfsduifb@gmx.de> - 2013-06-18 20:16 +0200
Re: os.putenv() has no effect Skip Montanaro <skip@pobox.com> - 2013-06-18 13:22 -0500
Re: os.putenv() has no effect Terry Reedy <tjreedy@udel.edu> - 2013-06-18 16:31 -0400
csiph-web