概要
少しずつ更新。
Python3とmicropythonでプログラミングする上で
困った点・解決した点を下記に記載。
比較前提
- Python 3.7
- micropython 1.1.2
相違点
- FTPライブラリが使えない
- micropythonではFTPLibが標準では使えない。
- SpotlightKid氏のmicropython-ftplibを使用する
- micropythonではFTPLibが標準では使えない。
-
zfillが使えない
-
0パディングでよく使用するzfillがmicropythonでは使用できない
- zfill関数を実装する
def zfill(s, width): if len(s) < width: return ("0" * (width - len(s))) + s else: return s
-