Ertl, John wrote:
Kent,

Good idea except that the environment that needs to be set depends on the
answers to some of the input that I get in the Python program.   Nothing is
ever easy here.

Maybe you could write a Python program that asks the questions, then spawns a shell task which sets the correct environment and runs another Python program that does the rest of the work?


Or, a ksh wrapper that sources the right program then outputs its environment to a .py file that you can import to get the config?

Just don't give me credit for the idea, I don't want to have anything to do 
with it :-)

Kent

-----Original Message-----
From: Kent Johnson [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 21, 2005 13:20
Cc: tutor@python.org
Subject: Re: [Tutor] trouble setting the environment

Ertl, John wrote:

All,

I have program and init I want to "source" a .ksh file to set some
environment variables and then use those variables in my program.

Is this possible? I vaguely remember something about the system env and

the

interpreters env being separate after the interpreter starts up.


What about making a shell file that sources your ksh file, then starts
python?

Kent


_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Reply via email to