[Tutor] trouble setting the environment
Kent Johnson
kent37 at tds.net
Thu Apr 21 22:49:15 CEST 2005
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:kent37 at tds.net]
> Sent: Thursday, April 21, 2005 13:20
> Cc: tutor at 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
>
More information about the Tutor
mailing list