MicroPython 库

Python 标准库和微型库

下面的库继承自 MicroPython。它们类似于具有相同名称的标准 Python 库。它们实现了相应标准 Python 库的子集或变体。

CircuitPython 的长期目标是使用 Python 标准库在 CircuitPython 中编写的代码无需更改即可在 CPython 上运行。

这些库在具有有限闪存的 CircuitPython 版本上未启用,通常在非 Express 版本上: binascii, errno, json, re

这些库当前未在任何 CircuitPython 版本中启用,但可能在未来启用,u 前缀删除: uctypes, uhashlib, uzlib

string 库中省略的函数

由于闪存有限,在小型构建(通常是非 Express)上未启用一些字符串操作: string.center(), string.partition(), string.splitlines(), string.reversed()

CircuitPython/MicroPython 特定的库

以下库中提供了特定于 CircuitPython/MicroPython 实现的功能。这些库可能会在未来版本的 CircuitPython 中发生重大变化或被删除。