On Wed, 12 Nov 2008 13:09:21 +0000 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 $? 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)
That may be true for some shells but not all. The correct answer to the OP's question is - check the documentation for your specific shell or ask on a group dedicated to the shell you are using. -- D'Arcy J.M. Cain <[EMAIL PROTECTED]> | Democracy is three wolves http://www.druid.net/darcy/ | and a sheep voting on +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list