Hello,

I am trying to retrieve a linux environment variable using
os.environ.get, however it does not appear to be working properly. It
returns none for a variable that does, in fact exist.

# echo $HOSTTYPE
x86_64
# python
>>> import os
>>> print os.environ.get('HOSTTYPE')
None

If I do the same thing with a different variable (XILINX, in this
case), it works fine.

# echo $XILINX
/Xilinx
# python
>>> import os
>>> print os.environ.get('XILINX')
/Xilinx

Any thoughts on why it is behaving this way?

Thanks,
John

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to