In the doc: http://docs.micropython.org/en/latest/library/usys.html
I found information about the sys.atexit() function but I'm not able to import it with the latest firmware:
Code: Select all
MicroPython v1.15 on 2021-04-29; ESP32 module with ESP32
Type "help()" for more information.
>>> from usys import atexit
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: can't import name atexit
>>> import usys
>>> usys.atexit()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'atexit'
>>>