Question - Returning exit codes

Gerrit Holl gerrit.holl at
Thu Jun 24 16:40:30 CEST 1999

On Thu, Jun 24, 1999 at 01:27:07PM +0000, sjoshi at 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.

"""example on using exit codes"""

import sys

def exit_with_code():
    number = input("What exit code do you want? ")

if __name__ == '__main__':

or easier:



The Dutch Linuxgames homepage:
Personal homepage:

Discoverb is a python program in Dutch and English which tests the words you
learned by asking it. Homepage:

More information about the Python-list mailing list