When you are familiar with Python os and platform package You may wonder how to use it on ESP32 in MicroPython. Because this doesn’t work:
>>> os.name
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute 'name'
>>> import platform
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'platform'
UOS for the rescue
uos is a port of the standard Python packages os and platform to MicroPython.
You can use it by importing the package like this
import uos
One handy function is uname:
uos.uname()
It gives you information about your system in my case about the esp32 and the microPython version: