We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a2e9f2 commit de575c8Copy full SHA for de575c8
1 file changed
tools/make-frozen.py
@@ -1,4 +1,4 @@
1
-#!/usr/bin/env python
+#!/usr/bin/env python3
2
#
3
# Create frozen modules structure for MicroPython.
4
@@ -49,7 +49,11 @@ def module_name(f):
49
m = module_name(f)
50
print('"%s\\0"' % m)
51
data = open(sys.argv[1] + "/" + f, "rb").read()
52
- data = repr(data)[2:-1]
+ # Python2 vs Python3 tricks
53
+ data = repr(data)
54
+ if data[0] == "b":
55
+ data = data[1:]
56
+ data = data[1:-1]
57
data = data.replace('"', '\\"')
58
print('"%s"' % data)
59
print("};")
0 commit comments