Skip to content

Commit ad733e6

Browse files
committed
rename reader tool
1 parent c775235 commit ad733e6

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

tools/mpconfig_category_reader.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
filepath = '../py/circuitpy_mpconfig.mk'
2+
with open(filepath) as fp:
3+
line = fp.readline()
4+
cnt = 1
5+
fullbuild = []
6+
defon = []
7+
defoff = []
8+
while line:
9+
wordlist = line.split()
10+
if wordlist:
11+
if wordlist[-1] == "$(CIRCUITPY_FULL_BUILD)":
12+
fullbuild.append(wordlist[0])
13+
elif wordlist[-1] == "0":
14+
defoff.append(wordlist[0])
15+
elif wordlist[-1] == "1":
16+
defon.append(wordlist[0])
17+
line = fp.readline()
18+
cnt += 1
19+
20+
print(str(cnt) + " Lines Read\n")
21+
print("\nFULL BUILDS ------------------------")
22+
for string in fullbuild:
23+
print(string)
24+
25+
print("\nON BUILDS ------------------------")
26+
for string in defon:
27+
print(string)
28+
29+
print("\nOFF BUILDS ------------------------")
30+
for string in defoff:
31+
print(string)

0 commit comments

Comments
 (0)