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

Function writecode

Tools/freeze/makefreeze.py:77–85  ·  view source on GitHub ↗
(fp, mod, data)

Source from the content-addressed store, hash-verified

75# The array is called M_<mod>.
76
77def writecode(fp, mod, data):
78 print('unsigned char M_%s[] = {' % mod, file=fp)
79 indent = ' ' * 4
80 for i in range(0, len(data), 16):
81 print(indent, file=fp, end='')
82 for c in bytes(data[i:i+16]):
83 print('%d,' % c, file=fp, end='')
84 print('', file=fp)
85 print('};', file=fp)

Callers 1

makefreezeFunction · 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…