MCPcopy Create free account
hub / github.com/PyTables/PyTables / get_version

Function get_version

doc/source/conf.py:7–18  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

5
6
7def get_version(filename):
8 import re
9
10 with open(filename) as fd:
11 data = fd.read()
12
13 mobj = re.search(
14 r"""^__version__\s*=\s*(?P<quote>['"])(?P<version>.*)(?P=quote)""",
15 data,
16 re.MULTILINE,
17 )
18 return mobj.group("version")
19
20
21# -- Project information -----------------------------------------------------

Callers 1

conf.pyFile · 0.85

Calls 2

searchMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected