Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Platform-independent exit codes.

Project description

Python version Build Status

exit_codes

Platform-independent exit codes.

Python provides standard exit status codes for some platforms, but not all. This is technically, pedantically correct, but it makes it awkward to provide practical cross-platform exit statuses. This package takes the exit status codes defined in os for Unixes and make them available to the unwashed masses.

It’s simple to use:

from exit_codes import ExitCode

def main():
    if big_operation():
        # If your program exits normally, return OK
        return ExitCode.OK
    else:
        # Otherwise, return the appropriate error code
        return ExitCode.IO_ERR

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for exit-codes, version 1.3.0
Filename, size File type Python version Upload date Hashes
Filename, size exit_codes-1.3.0-py2.py3-none-any.whl (4.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size exit_codes-1.3.0.tar.gz (3.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page