forked from adafruit/circuitpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge MicroPython 1.13 into CircuitPython
- Loading branch information
Showing
484 changed files
with
13,058 additions
and
5,214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,34 @@ | ||
:mod:`errno` -- system error codes | ||
:mod:`uerrno` -- system error codes | ||
=================================== | ||
|
||
.. module:: errno | ||
.. module:: uerrno | ||
:synopsis: system error codes | ||
|
||
|see_cpython_module| :mod:`cpython:errno`. | ||
|see_cpython_module| :mod:`python:errno`. | ||
|
||
This module provides access to symbolic error codes for `OSError` exception. | ||
A particular inventory of codes depends on :term:`MicroPython port`. | ||
|
||
Constants | ||
--------- | ||
|
||
.. data:: EEXIST, EAGAIN, etc. | ||
|
||
Error codes, based on ANSI C/POSIX standard. All error codes start with | ||
"E". Errors are usually accessible as ``exc.args[0]`` | ||
"E". As mentioned above, inventory of the codes depends on | ||
:term:`MicroPython port`. Errors are usually accessible as ``exc.args[0]`` | ||
where ``exc`` is an instance of `OSError`. Usage example:: | ||
|
||
try: | ||
os.mkdir("my_dir") | ||
uos.mkdir("my_dir") | ||
except OSError as exc: | ||
if exc.args[0] == errno.EEXIST: | ||
if exc.args[0] == uerrno.EEXIST: | ||
print("Directory already exists") | ||
|
||
.. data:: errorcode | ||
|
||
Dictionary mapping numeric error codes to strings with symbolic error | ||
code (see above):: | ||
|
||
>>> print(errno.errorcode[uerrno.EEXIST]) | ||
>>> print(uerrno.errorcode[uerrno.EEXIST]) | ||
EEXIST |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.