Michael Hoffman wrote:

David Bear wrote:

How does one query the python environment, ie pythonhome


sys.prefix

 > pythonpath

sys.path

etc.


[...]
I suspect rather that the OP is looking for os.environ, as in:

[EMAIL PROTECTED] sholden]$ ENVAR=value
[EMAIL PROTECTED] sholden]$ export ENVAR
[EMAIL PROTECTED] sholden]$ python
Python 2.2.1 (#1, Aug 30 2002, 12:15:30)
[GCC 3.2 20020822 (Red Hat Linux Rawhide 3.2-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.environ["ENVAR"]
'value'


regards Steve -- Steve Holden http://www.holdenweb.com/ Python Web Programming http://pydish.holdenweb.com/ Holden Web LLC +1 703 861 4237 +1 800 494 3119 -- http://mail.python.org/mailman/listinfo/python-list

Reply via email to