File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Replace built-in os module.
2+ from uos import *
3+
4+ # Provide optional dependencies (which may be installed separately).
5+ try :
6+ from . import path
7+ except ImportError :
8+ pass
File renamed without changes.
Original file line number Diff line number Diff line change 1212print (f"{ sys .version = } " )
1313print (f"{ sys .implementation = } " )
1414
15- # Patch (u)os module so os .path works like in CPython - do this before starting apps
16- #import os as _os
17- #import path as _path
18- #_os.path = _path
19- # sys.modules["os"] = _os
20- # sys.modules["uos"] = _os
15+ # Ensure os .path is available before starting apps.
16+ # internal_filesystem/lib/os/__init__.py provides a pure-Python os package
17+ # (from micropython-lib) that wraps uos and exposes os.path.
18+ import os as _os
19+ sys .modules ["os" ] = _os
20+ sys .modules ["uos" ] = _os
2121
2222print ("Free space on root filesystem:" )
2323import os
4242 time .sleep (5 ) # sleep so the user has time to connect to serial console
4343 sys .print_exception (e ) # print it after the sleep so user can see it on serial console
4444 print ("MicroPythonOS exiting." )
45-
You can’t perform that action at this time.
0 commit comments