Re: return a value to shell script

2008-11-14 Thread News123
of python script beginning of shell script #!/bin/sh num=2 text=`python numtotext.py $num` echo $num as text is $text end of shell script bye N devi thapa wrote: Hi, I am executing a python script in a shell script. The python script actually returns a value. So, can I get the return value

Re: return a value to shell script

2008-11-12 Thread Tom Wright
devi thapa wrote: I am executing a python script in a shell script. The python script actually returns a value. So, can I get the return value in a shell script? If yes, then help me out. Yes. The variable $? should be bound to the return value of the last foreground program to exit

Re: return a value to shell script

2008-11-12 Thread rishi pathak
Look at os._exit() On Wed, Nov 12, 2008 at 6:36 PM, devi thapa [EMAIL PROTECTED] wrote: Hi, I am executing a python script in a shell script. The python script actually returns a value. So, can I get the return value in a shell script? If yes, then help me out. Regards, Devi -- http

Re: return a value to shell script

2008-11-12 Thread Jeff McNeil
On Nov 12, 8:19 am, D'Arcy J.M. Cain [EMAIL PROTECTED] wrote: On Wed, 12 Nov 2008 13:09:21 + Tom Wright [EMAIL PROTECTED] wrote: devi thapa wrote: I am executing a python script in a shell script. The python script actually returns a value. So, can I get the return value

Re: return a value to shell script

2008-11-12 Thread Grant Edwards
On 2008-11-12, devi thapa [EMAIL PROTECTED] wrote: I am executing a python script in a shell script. The python script actually returns a value. So, can I get the return value in a shell script? If yes, then help me out. There are two ways to return something to a shell script. 1

Re: return a value to shell script

2008-11-12 Thread D'Arcy J.M. Cain
On Wed, 12 Nov 2008 13:09:21 + Tom Wright [EMAIL PROTECTED] wrote: devi thapa wrote: I am executing a python script in a shell script. The python script actually returns a value. So, can I get the return value in a shell script? If yes, then help me out. Yes. The variable

Re: return a value to shell script

2008-11-12 Thread Marco Bizzarri
On Wed, Nov 12, 2008 at 2:06 PM, devi thapa [EMAIL PROTECTED] wrote: Hi, I am executing a python script in a shell script. The python script actually returns a value. So, can I get the return value in a shell script? If yes, then help me out. Regards, Devi -- http://mail.python.org

return a value to shell script

2008-11-12 Thread devi thapa
Hi, I am executing a python script in a shell script. The python script actually returns a value. So, can I get the return value in a shell script? If yes, then help me out. Regards, Devi -- http://mail.python.org/mailman/listinfo/python-list