Setting UNIX environment with a Python script

Grant Edwards grante at visi.com
Mon Mar 11 21:25:57 EST 2002


In article <pan.2002.03.12.11.14.20.48643.1649 at zip.com.au>, Cameron Hutchison wrote:

> What you need to do instead is have your python program print on stdout
> the name of the ora_env file to source. Then you invoke your python
> script from your shell login script like this (bourne style shell
> assumed):
> 
> eval "source ora_env.`get_ora_name`"

Another common method is to have your Python program write the
shell commands to stdout, then execute them with something like

eval `myPythonProgram`

-- 
Grant Edwards                   grante             Yow!  I'm having fun
                                  at               HITCHHIKING to CINCINNATI
                               visi.com            or FAR ROCKAWAY!!



More information about the Python-list mailing list