PATH environment variable

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

mirandacascade at 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?


> 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


More information about the Python-list mailing list