Code: Select all
>>> import _main
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named '_main'
>>>
Code: Select all
>>> import _main
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named '_main'
>>>
Support for FROZEN_DIR and FROZEN_MPY_DIR has been deprecated for some time and was finally removed in this release. Instead of these, FROZEN_MANIFEST can be used. The io.resource_stream() function is also removed, replaced by the pure Python version in micropython-lib.
The search order for importing frozen Python modules is now controlled by the ".frozen" entry in sys.path. This string is added by default in the second position in sys.path. User code should adjust sys.path depending on the desired behaviour. Putting ".frozen" first in sys.path will speed up importing frozen modules.
Code: Select all
>>> import sys
>>> sys.path
['/lib', '/fresh', '']
>>>
Code: Select all
>>> import sys
>>> sys.path
['', '.frozen', '/lib']
>>> import _main
>>>