Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
f8a39e3b
Commit
f8a39e3b
authored
Jun 03, 2015
by
Paul Sokolovsky
Browse files
tools/make-frozen.py: Handle trailing slash in argument more reliably.
parent
0e6c89a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/make-frozen.py
View file @
f8a39e3b
...
...
@@ -26,16 +26,14 @@ def module_name(f):
modules
=
[]
root
=
sys
.
argv
[
1
]
root
=
sys
.
argv
[
1
]
.
rstrip
(
"/"
)
root_len
=
len
(
root
)
if
root
[
-
1
]
!=
"/"
:
root_len
+=
1
for
dirpath
,
dirnames
,
filenames
in
os
.
walk
(
root
):
for
f
in
filenames
:
fullpath
=
dirpath
+
"/"
+
f
st
=
os
.
stat
(
fullpath
)
modules
.
append
((
fullpath
[
root_len
:],
st
))
modules
.
append
((
fullpath
[
root_len
+
1
:],
st
))
print
(
"#include <stdint.h>"
)
print
(
"const uint16_t mp_frozen_sizes[] = {"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment