def get_version(package):
    path = os.path.join(os.path.dirname(__file__), package, '__init__.py')
    with open(path, 'rb') as f:
        init_py = f.read().decode('utf-8')
    return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
Return package version as listed in `__version__` in `__init__.py`.
dataset/ETHPy150Open jonathanslenders/python-prompt-toolkit/setup.py/get_version