On 6/18/2013 12:49 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/ga
> Does anybody know why this would happen or what I could be doing wrong?
os.putenv will only affect the environment in subprocesses. Consider
this session fragment:
% python
Python 2.7.2 (default, Oct 17 2012, 03:11:33)
[GCC 4.4.6 [TWW]] on sunos5
Type "help", "copyright", "credits" or "license
On 18.06.2013 20:12, Johannes Bauer wrote:
> I am extremely certain that I found that passage, but can't find it
> right now anymore (probably staring right at it and can't find it still) :-/
Obviously, yes:
Note
On some platforms, including FreeBSD and Mac OS X, setting environ may
cause memory
On 18.06.2013 20:09, Dave Angel wrote:
> In other words, you shouldn't use putenv(), but instead modify os.environ.
Huh... this is surprising to me. Because I actually looked it up in the
manual and vaguely remember that there stood that os.environ is just a
copy of the environment variables at i
On 06/18/2013 12:49 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/g
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:/u
On 18.06.2013 19:24, inq1ltd wrote:
> if you are trying to add a dir to a linux path you need
> to understand how to add or change environment variables.
Yeah, about this; I actually am fully aware of what I'm doing.
> research this;
> $ export PATH= $PATH: ???/???/???
You really couldn't h