Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c3dda00

Browse filesBrowse files
cclaussMylesBorins
authored andcommitted
tools: prepare tools/js2c.py for Python 3
PR-URL: #24798 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 7cac76c commit c3dda00
Copy full SHA for c3dda00

File tree

Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Open diff view settings
Collapse file

‎tools/js2c.py‎

Copy file name to clipboardExpand all lines: tools/js2c.py
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@
3737
import string
3838
import hashlib
3939

40+
try:
41+
xrange # Python 2
42+
except NameError:
43+
xrange = range # Python 3
44+
4045

4146
def ToCArray(elements, step=10):
4247
slices = (elements[i:i+step] for i in xrange(0, len(elements), step))

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.