return a value to shell script
Tom Wright
tew24 at spam.ac.uk
Wed Nov 12 08:09:21 EST 2008
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. The python script can return a value using
sys.exit(value)
HTH
--
I'm at CAMbridge, not SPAMbridge
More information about the Python-list
mailing list