Skip to main content

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.

Source Distribution

exit_codes-1.3.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

exit_codes-1.3.0-py2.py3-none-any.whl (4.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file exit_codes-1.3.0.tar.gz.

File metadata

  • Download URL: exit_codes-1.3.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.8.0a3+

File hashes

Hashes for exit_codes-1.3.0.tar.gz
Algorithm Hash digest
SHA256 8fe3a056be6cbc530d59d9ad9bdc1771d8cff7d9ac7386a0c39b517a8ae52b3e
MD5 e4043dcb72b06c100565f3ea148b6bc6
BLAKE2b-256 f8201a8671601b459a8388185ee29f98cee5965a94aeaccc6b9c926f4afec4dc

See more details on using hashes here.

File details

Details for the file exit_codes-1.3.0-py2.py3-none-any.whl.

File metadata

  • Download URL: exit_codes-1.3.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.8.0a3+

File hashes

Hashes for exit_codes-1.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 09444844772043f9be22128856088792be0f91cdbe269af992b1338a5464dc85
MD5 da6734a410a48cc6f5853e72385d9e8a
BLAKE2b-256 fa075dc359aba858ec096bd9e72c4a214617c95da24553a736bcce7818a61486

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page