Skip to content

sixty-north/exit-codes

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

About

Platform-independent exit codes for Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages