MCPcopy Index your code
hub / github.com/python/cpython / writecode

Function writecode

Programs/freeze_test_frozenmain.py:10–18  ·  view source on GitHub ↗
(fp, mod, data)

Source from the content-addressed store, hash-verified

8
9
10def writecode(fp, mod, data):
11 print('unsigned char M_%s[] = {' % mod, file=fp)
12 indent = ' ' * 4
13 for i in range(0, len(data), 16):
14 print(indent, file=fp, end='')
15 for c in bytes(data[i:i+16]):
16 print('%d,' % c, file=fp, end='')
17 print('', file=fp)
18 print('};', file=fp)
19
20
21def dump(fp, filename, name):

Callers 1

dumpFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…