kopia lustrzana https://github.com/micropython/micropython-lib
f3cfc52ab0
With the dependencies captured in manifest.py, several packages in python-stdlib were still unix-only due to direct or transitive dependencies on unix-only or ffi modules. Or they just make no sense to run on microcontroller targets. In a few cases (e.g. base64) where possible, the unix dependency could be removed. Updates manifest.py to use the `unix_ffi=True` arg to `require()` for these libraries. Rename re-pcre to re now that unix-ffi is effectively its own namespace. Update unix-ffi/README.md, and strengthen the wording that the unix libraries are unmaintained. Signed-off-by: Jim Mussared <jim.mussared@gmail.com> |
||
---|---|---|
.. | ||
_libc | ||
_markupbase | ||
argparse | ||
cgi | ||
email.charset | ||
email.encoders | ||
email.errors | ||
email.feedparser | ||
email.header | ||
email.internal | ||
email.message | ||
email.parser | ||
email.utils | ||
fcntl | ||
ffilib | ||
getopt | ||
gettext | ||
glob | ||
html.entities | ||
html.parser | ||
http.client | ||
machine | ||
multiprocessing | ||
os | ||
pwd | ||
pyb | ||
re | ||
select | ||
signal | ||
socket | ||
sqlite3 | ||
test.support | ||
time | ||
timeit | ||
tty | ||
ucurses | ||
unittest | ||
urllib.parse | ||
README.md |
README.md
Unix-specific libraries
These are libraries that will only run on the Unix port of MicroPython, or are too big to be used on microcontrollers. There is some limited support for the Windows port too.
Note: This directory is unmaintained.
Background
The libraries in this directory provide additional CPython compatibility using the host operating system's native libraries.
This is implemented either by accessing the libraries directly via libffi, or by using built-in modules that are only available on the Unix port.
In theory, this allows you to use MicroPython as a more complete drop-in replacement for CPython.
Usage
To use a unix-specific library, pass unix_ffi=True
to require()
in your
manifest file.
require("os", unix_ffi=True) # Use the unix-ffi version instead of python-stdlib.