[Pythonmac-SIG] Round 2 with Leopard+Python

Christopher Barker Chris.Barker at noaa.gov
Fri Nov 2 20:53:40 CET 2007



Brian Granger wrote:

> But, in Leopard, sudo does not preserve environment variables:

> The solution currently is to install all packages to locations that
> don't require sudo to write to.

Or use "sudo -s", which starts a shell, then set your env vars:

$ sudo -s
$ export FOO=/tmp
$ python -c "import os; print os.environ['FOO']"

should work.

But I agree, a change like this in sudo behavior is going to cause a lot 
of problems!

-CHB



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov


More information about the Pythonmac-SIG mailing list