-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathboot.py
More file actions
26 lines (24 loc) · 745 Bytes
/
boot.py
File metadata and controls
26 lines (24 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# boot.py as provided by @Freenove in their esp32 ultimate starter kit
import uos as os
import uerrno as errno
iter = os.ilistdir()
IS_DIR = 0x4000
IS_REGULAR = 0x8000
while True:
try:
entry = next(iter)
filename = entry[0]
file_type = entry[1]
if filename == 'boot.py':
continue
else:
print("===============================")
print(filename,end="")
if file_type == IS_DIR:
print(", File is a directory")
print("===============================")
else:
print("\n===============================\n")
exec(open(filename).read(),globals())
except StopIteration:
break