New submission from Alexander Belopolsky:

Python defines some BSDish exit codes in the os module:

    EX_CANTCREAT = 73
    EX_CONFIG = 78
    EX_DATAERR = 65
    EX_IOERR = 74
    EX_NOHOST = 68
    EX_NOINPUT = 66
    EX_NOPERM = 77
    EX_NOUSER = 67
    EX_OK = 0
    EX_OSERR = 71
    EX_OSFILE = 72
    EX_PROTOCOL = 76
    EX_SOFTWARE = 70
    EX_TEMPFAIL = 75
    EX_UNAVAILABLE = 69
    EX_USAGE = 64

but these are documented as only available on UNIX and may not be portable 
across all flavors. 


POSIX [1] and C99 defines EXIT_SUCCESS and EXIT_FAILURE constants.  I propose 
adding those to sys.

Having these constants in sys will make them more discoverable because they 
will be next to sys.exit().


[1] http://pubs.opengroup.org/onlinepubs/009695399/functions/exit.html

----------
messages: 241949
nosy: belopolsky
priority: normal
severity: normal
status: open
title: Define EXIT_SUCCESS and EXIT_FAILURE constants in sys
type: enhancement

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24053>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to