Re: How do I include a shell variable in my script?
On Tue, 29 Jul 2008 07:53:53 -0700, laredotornado wrote: Hi, 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. java_home='/path/to/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 import os java_home = os.environ['JAVA_HOME'] ** Posted from http://www.teranews.com ** -- http://mail.python.org/mailman/listinfo/python-list
How do I include a shell variable in my script?
Hi, 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. java_home='/path/to/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 -- http://mail.python.org/mailman/listinfo/python-list
Re: How do I include a shell variable in my script?
On Tue, Jul 29, 2008 at 10:53 AM, laredotornado [EMAIL PROTECTED] wrote: Hi, 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. java_home='/path/to/java/home' import os java_home = os.environ['JAVA_HOME'] -- Jerry -- http://mail.python.org/mailman/listinfo/python-list