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

Function gencodecs

Tools/unicode/gencjkcodecs.py:57–65  ·  view source on GitHub ↗
(prefix)

Source from the content-addressed store, hash-verified

55""")
56
57def gencodecs(prefix):
58 for loc, encodings in codecs.items():
59 for enc in encodings:
60 code = TEMPLATE.substitute(ENCODING=enc.upper(),
61 encoding=enc.lower(),
62 owner=loc)
63 codecpath = os.path.join(prefix, enc + '.py')
64 with open(codecpath, 'w') as f:
65 f.write(code)
66
67if __name__ == '__main__':
68 import sys

Callers 1

gencjkcodecs.pyFile · 0.85

Calls 7

substituteMethod · 0.80
openFunction · 0.50
itemsMethod · 0.45
upperMethod · 0.45
lowerMethod · 0.45
joinMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…