How do I include a shell variable in my script?
toby at tobiah.org
Wed Jul 30 21:42:42 CEST 2008
On Tue, 29 Jul 2008 07:53:53 -0700, laredotornado wrote:
> I'm running a Python script on a Solaris 9 machine, invoking the
> Python script from ksh, if that matters. There is an enviornment
> variable, $JAVA_HOME, that I would like to include in my script,
> replacing "/path/to/java/home'" with the value of $JAVA_HOME.
> How do I do this? If I need to pass a command line argument, so be
> it, but I figure there is a more direct way to get the value.
> Thanks, - Dave
java_home = os.environ['JAVA_HOME']
** Posted from http://www.teranews.com **
More information about the Python-list