MCPcopy Create free account
hub / github.com/boostorg/build / edit

Function edit

v2/engine/bump_version.py:25–35  ·  view source on GitHub ↗
(file, *replacements)

Source from the content-addressed store, hash-verified

23
24
25def edit(file, *replacements):
26 print(" '%s'..." % file)
27 f = open(file, 'r')
28 text = f.read()
29 f.close()
30 for (source, target) in replacements:
31 text, n = re.compile(source, re.MULTILINE).subn(target, text)
32 assert n > 0
33 f = open(file, 'w')
34 f.write(text)
35 f.close()
36
37
38def make_edits(ver):

Callers 1

make_editsFunction · 0.85

Calls 2

readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected