[Tutor] using shell environment variables

D-Man dsh8290@rit.edu
Fri, 8 Sep 2000 12:02:59 -0400


I don't have the documentation in front of me at the moment, but I believe in
the os or the sys module there are routines for accessing and maniputlating the
environemnt.  Check the Library Reference.

-D

On Fri, 08 Sep 2000 11:35:47 Wes Bateman wrote:
> How can one use environment variables that the shell has?  I am trying to
> rewrite a single section of a co-worker's bash script to run in python
> instead.  In order to accomplish this though, I need to be able to access
> environment variables that he has set and was passing to the smaller bash
> script that I'm trying to replace.
> 
> Just for an example, the $PATH variable in the shell.  I need more than
> the path for my actual script, but an example using $PATH or anything else
> would help me out quite a bit :)
> 
> Thanks! :)
> 
> Wes
> 
> 
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://www.python.org/mailman/listinfo/tutor