Environmental Variables

Fredrik Lundh fredrik at pythonware.com
Mon Mar 13 05:54:24 EST 2006


Sathyaish wrote:

> In which physical file are the python environmental variables located?
> I know I can access them using the:
>
>
> os.environ.get('PYTHONSTARTUP')
>
> or
>
> os.environ.get('PYTHONPATH')
>
>
> to get their values. But out of the program, if I need to look at them
> and alter their values, where do I find them? Are they the OS
> environmental variables as I suspect?

yes.

> If they are, then I'll find them with the other OS environ variables in My
> Computer->System->Properties->Advanced->Environmental Variables.

yes, provided that they've been set, and set via that dialogue (and not
by some startup script or other mechanism).

> But I checked that place and did not find any default values for them.

there are no default values for the variables you mention.

(as written, the environ.get call returns None if the variable is not set)

</F>






More information about the Python-list mailing list