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

Function genwincodec

Tools/unicode/genwincodec.py:43–57  ·  view source on GitHub ↗
(codepage)

Source from the content-addressed store, hash-verified

41 return enc2uni
42
43def genwincodec(codepage):
44 import platform
45 map = genwinmap(codepage)
46 encodingname = 'cp%d' % codepage
47 code = codegen("", map, encodingname)
48 # Replace first lines with our own docstring
49 code = '''\
50"""Python Character Mapping Codec %s generated on Windows:
51%s with the command:
52 python Tools/unicode/genwincodec.py %s
53"""#"
54''' % (encodingname, ' '.join(platform.win32_ver()), codepage
55 ) + code.split('"""#"', 1)[1]
56
57 print(code)
58
59if __name__ == '__main__':
60 import sys

Callers 1

genwincodec.pyFile · 0.85

Calls 4

codegenFunction · 0.90
genwinmapFunction · 0.85
joinMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…