[Tutor] using shell environment variables

Denis Frere denis@aragne.com
Fri, 8 Sep 2000 17:58:52 +0200


Le Fri, Sep 08, 2000 at 10:35:47AM -0500, Wes Bateman pianota:
> How can one use environment variables that the shell has?

>>> import os
>>> for el in os.environ.keys():
	print el, os.environ[el]

That should do.

Have a nice week-end.
-- 
Denis FRERE
P3B    : Club Free-Pytho-Linuxien Caroloregien http://www.p3b.org
Aragne : Internet - Reseaux - Formations  http://www.aragne.com