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.2.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: exit_codes-1.2.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.2.0.tar.gz
Algorithm Hash digest
SHA256 ad762e123635e00c938aa229c56cd2c71327fa6717cf8845c78699ba6429e4b4
MD5 3d6a733b160cb50ce4bd369be1c61452
BLAKE2b-256 208ab90c27220ebed5ea1be6b574163ad0252efcef9feec7529a501d1bd0b348

See more details on using hashes here.

File details

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

File metadata

  • Download URL: exit_codes-1.2.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.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8389761571929e4dc9b0aa87910a048b4241607a47514e5465bef770dc5641bd
MD5 c7695f2c55f715e0580f6636ffc4a751
BLAKE2b-256 4b5780dd093fc34ba9e57cb17e8922101bb6e21632c947819e8c70e2cca55dd0

See more details on using hashes here.

Supported by

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