Skip to content

sixty-north/exit-codes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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