Gentoo Archives: gentoo-dev

From: "Petteri R├Ąty" <betelgeuse@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Locale check in python_pkg_setup()
Date: Sat, 31 Jul 2010 20:24:23
Message-Id: 4C5486B6.7040408@gentoo.org
In Reply to: Re: [gentoo-dev] Locale check in python_pkg_setup() by Arfrever Frehtes Taifersar Arahesis
On 07/31/2010 11:10 PM, Arfrever Frehtes Taifersar Arahesis wrote:
>> >> If the variable is set but not exported then it is local to the shell >> env. When bash goes to exec() python the local shell variables are >> not in the env; so os.environ() will not contain them. >> >> antarus@kyoto ~ $ foo=BAR >> antarus@kyoto ~ $ echo $foo >> BAR >> antarus@kyoto ~ $ python -c 'import os; print os.environ.get("foo")' >> None >> antarus@kyoto ~ $ export foo >> antarus@kyoto ~ $ python -c 'import os; print os.environ.get("foo")' >> BAR > > I want only variables exported to Python processes. >
export -p Petteri

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] Locale check in python_pkg_setup() Arfrever Frehtes Taifersar Arahesis <Arfrever@g.o>