Re: calling ksh script from python

2005-06-08 Thread Magnus Lycka
[EMAIL PROTECTED] wrote: > thanks for your input... > well I just find out that modifying environment through ksh call is not > possible (can't get the new evironment back to python). I thought about this a few days ago. Can't you copy it like this: import os env_rows = os.popen('. some.script

Re: calling ksh script from python

2005-06-04 Thread Sven Mascheck
(fup'2 set) In comp.unix.shell Donn Cave wrote: > Portability [ksh] > "echo" seems to mimic the behavior of sh on its host platform. Rather: both usually mimic echo(1) - some shells even inspect PATH (e.g. /usr/ucb/, /usr/5bin/ vs. /usr/bin/) and act accordingly. -- http://mail.python.org/mailma

Re: calling ksh script from python

2005-06-03 Thread Donn Cave
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > thanks for your input... > well I just find out that modifying environment through ksh call is not > possible (can't get the new evironment back to python). I think the > best thing to do is to translate all my ksh to pure python... I tho

Re: calling ksh script from python

2005-06-03 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Thorsten Kampe <[EMAIL PROTECTED]> wrote: > * Cameron Laird (2005-06-02 18:08 +0100) > > In article <[EMAIL PROTECTED]>, > > Donn Cave <[EMAIL PROTECTED]> wrote: > >>Meanwhile, it might be worthwhile to reconsider the use > >>of ksh here, if you have any choice in

Re: calling ksh script from python

2005-06-03 Thread Thorsten Kampe
* Cameron Laird (2005-06-02 18:08 +0100) > In article <[EMAIL PROTECTED]>, > Donn Cave <[EMAIL PROTECTED]> wrote: >>Meanwhile, it might be worthwhile to reconsider the use >>of ksh here, if you have any choice in the matter. Ksh >>is fine for interactive use, but has some unfortunate >>flaws as a

Re: calling ksh script from python

2005-06-03 Thread ronan_boisard
thanks for your input... well I just find out that modifying environment through ksh call is not possible (can't get the new evironment back to python). I think the best thing to do is to translate all my ksh to pure python... I thought that I could re-use some stufff, but I guest I'm going to tran

Re: calling ksh script from python

2005-06-02 Thread Donn Cave
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Cameron Laird) wrote: > In article <[EMAIL PROTECTED]>, > Donn Cave <[EMAIL PROTECTED]> wrote: > . > . > . > >Meanwhile, it might be worthwhile to reconsider the use > >of ksh her

Re: PYSH? (was:Re: calling ksh script from python)

2005-06-02 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Paul McNett <[EMAIL PROTECTED]> wrote: . . . >I keep wondering how difficult it would be to make a Python shell that >exposes all of Python but also includes some builtin commands such as >cd,

Re: PYSH? (was:Re: calling ksh script from python)

2005-06-02 Thread Fernando Perez
Paul McNett wrote: > Cameron Laird wrote: >> Infidel. While I sure feel that way about csh(1), it >> surprises me you'd criticize ksh(1) so. 'Fact, 'mong >> all the *sh-s, I *recommend* ksh for programming. May- >> be the two of us see things differently. > > I keep wondering how difficult it

PYSH? (was:Re: calling ksh script from python)

2005-06-02 Thread Paul McNett
Cameron Laird wrote: > Infidel. While I sure feel that way about csh(1), it > surprises me you'd criticize ksh(1) so. 'Fact, 'mong > all the *sh-s, I *recommend* ksh for programming. May- > be the two of us see things differently. I keep wondering how difficult it would be to make a Python shel

Re: calling ksh script from python

2005-06-02 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Donn Cave <[EMAIL PROTECTED]> wrote: . . . >Meanwhile, it might be worthwhile to reconsider the use >of ksh here, if you have any choice in the matter. Ksh >is fine for interactive use, but has

Re: calling ksh script from python

2005-06-02 Thread Donn Cave
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: ... > I call it from python like that: > -- begin --- > import commands > commands.getstatusoutput('. toto.env') > -- end --- > > but it always return an error saying: > sh: TOTO_ENV=/home/home: is not an identifier > > doesn anyone know w

calling ksh script from python

2005-06-02 Thread ronan_boisard
hi all, I'm trying to call ksh script from python. I have a file (toto.env) with a scirpt looking like: -- begin --- #!/bin/ksh # export TOTO_ENV=/home/toto -- end --- I call it from python like that: -- begin --- import commands commands.getstatusoutput('. toto.env') -- end --- but it always r