Compatibility Utility

The compat module provides data, functions and classes whose interfaces have changed with newer Python versions, or which are not available on all operating systems supported by xobox. This allows using the most recent interface of these functions and classes within the xobox code, without hacking around all along the code. Therefore, this module centralises all the dirty hacks which become necessary when the Python standard library does not provide its own compatibility layer.

Constants

xobox.utils.compat.EX_OK = 0

Exit code that means no error occurred.

xobox.utils.compat.EX_USAGE = 64

Exit code that means the command was used incorrectly, such as when the wrong number of arguments are given.

xobox.utils.compat.EX_DATAERR = 65

Exit code that means the input data was incorrect.

xobox.utils.compat.EX_NOINPUT = 66

Exit code that means an input file did not exist or was not readable.

xobox.utils.compat.EX_NOUSER = 67

Exit code that means a specified user did not exist.

xobox.utils.compat.EX_NOHOST = 68

Exit code that means a specified host did not exist.

xobox.utils.compat.EX_UNAVAILABLE = 69

Exit code that means that a required service is unavailable.

xobox.utils.compat.EX_SOFTWARE = 70

Exit code that means an internal software error was detected.

xobox.utils.compat.EX_OSERR = 71

Exit code that means an operating system error was detected, such as the inability to fork or create a pipe.

xobox.utils.compat.EX_OSFILE = 72

Exit code that means some system file did not exist, could not be opened, or had some other kind of error.

xobox.utils.compat.EX_CANTCREAT = 73

Exit code that means a user specified output file could not be created.

xobox.utils.compat.EX_IOERR = 74

Exit code that means that an error occurred while doing I/O on some file.

xobox.utils.compat.EX_TEMPFAIL = 75

Exit code that means a temporary failure occurred. This indicates something that may not really be an error, such as a network connection that couldn’t be made during a retryable operation.

xobox.utils.compat.EX_PROTOCOL = 76

Exit code that means that a protocol exchange was illegal, invalid, or not understood.

xobox.utils.compat.EX_NOPERM = 77

Exit code that means that there were insufficient permissions to perform the operation (but not intended for file system problems).

xobox.utils.compat.EX_CONFIG = 78

Exit code that means that some kind of configuration error occurred.

xobox.utils.compat.EX_NOTFOUND = 16

Exit code that means something like “an entry was not found”.