PATH environment variable

Fredrik Lundh fredrik at pythonware.com
Sun Nov 20 09:43:10 CET 2005


mirandacascade at yahoo.com wrote:

> Based on a search of other posts in this group, it appears as though
> os.environ['PATH'] is one way to obtain the PATH environment variable.
>
> My questions:
> 1) is it correct that os.environ['PATH'] contains the PATH environment
> variable?

yes.

> 2) are there other ways to obtain the PATH environment variable? if so,
> is one way of obtaining the PATH environment variable preferable to
> another way?

no.  using the environ variable is the preferred way to read environment
variables.

</F>






More information about the Python-list mailing list