MCPcopy Create free account
hub / github.com/cztomczak/cefpython / get_version_from_file

Function get_version_from_file

tools/common.py:457–465  ·  view source on GitHub ↗
(header_file)

Source from the content-addressed store, hash-verified

455
456
457def get_version_from_file(header_file):
458 with open(header_file, "rU") as fp:
459 contents = fp.read() # no need to decode() as "rU" specified
460 ret = dict()
461 matches = re.findall(r'^#define (\w+) "?([^\s"]+)"?', contents,
462 re.MULTILINE)
463 for match in matches:
464 ret[match[0]] = match[1]
465 return ret
466
467
468def get_msvs_for_python(vs_prefix=False):

Callers 2

get_prebuilt_nameFunction · 0.85
get_cefpython_versionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected