errno — system error codes¶
This module provides access to symbolic error codes for the OSError exception, along with the errorcode dictionary mapping numeric codes back to their symbolic names.
Constants¶
The error codes below are based on the ANSI C / POSIX standard; each is an integer whose symbolic name starts with E. These are the codes provided on the OpenMV Cam. An error code is usually accessed as exc.errno where exc is an instance of OSError. Usage example:
try:
os.mkdir("my_dir")
except OSError as exc:
if exc.errno == errno.EEXIST:
print("Directory already exists")