[Tutor] trouble setting the environment

Ertl, John john.ertl at fnmoc.navy.mil
Thu Apr 21 23:01:17 CEST 2005


Kent,

Like you allude ...a bit too much "what the heck is that" going on.  I will
give a few other things a try...I may just have to have the program run and
get the info then stop and have the user source the correct .ksh then run
another py program.  (basically the same thing but manually).

Thanks,

John Ertl  

-----Original Message-----
From: Kent Johnson [mailto:kent37 at tds.net]
Sent: Thursday, April 21, 2005 13:49
Cc: tutor at python.org
Subject: Re: [Tutor] trouble setting the environment

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
>

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


More information about the Tutor mailing list