def read_version(): with open(os.path.join(os.path.dirname(__file__), 'pyplanet', '__init__.py')) as handler: return re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", handler.read(), re.M).group(1)