Runtime and Context Modules
errno
Names numeric operating-system error codes and maps available numbers back to symbolic names. Constants vary by operating system; use symbolic names rather than hardcoded integers. OSError subclasses may be selected based on the errno value.
Formal Syntax & Structure
python syntaxpython
import errnoReturn Value
module
Module namespace available through import; import is a statement, not a value-returning expression.
Working Example
Example Snippetpython
import errnoerror = OSError(errno.ENOENT, "missing")print(type(error).__name__)