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.
>>
>> anta...@kyoto ~ $ foo=BAR
>> anta...@kyoto ~ $ echo $foo
>> BAR
>> anta...@kyoto ~ $ python -c 'import os; print os.environ.get("foo")'
>> None
>> anta...@kyoto ~ $ export foo
>> anta...@kyoto ~ $ python -c 'import os; print os.environ.get("foo")'
>> BAR
> 
> I want only variables exported to Python processes.
> 

export -p

Petteri

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to