Question - Returning exit codes

Michael Muller proteus at cloud9.net
Thu Jun 24 10:46:20 EDT 1999


sjoshi at ingr.com wrote:
> 
> Hello All
>    I'm calling my python program from a perl script using the system
> command. I was wondering what would be the best way to return exit
> codes from my python script so that they can be intercepted in the perl
> program.
> 
> thanks
> Sunit
> 
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.

   import sys
   sys.exit(1) # replace 1 with your exit code of choice

=============================================================================
michaelMuller = proteus at cloud9.net | http://www.cloud9.net/~proteus
-----------------------------------------------------------------------------
Government, like dress, is the badge of lost innocence; the palaces of
kings
are built on the ruins of the bowers of paradise. - Thomas Paine
=============================================================================




More information about the Python-list mailing list