import os from pathlib import Path def getProjectBase() -> Path: return Path(os.path.realpath(__file__)).parent.parent def readFirstLine(file: Path) -> str: """ :param file: Path to file :return: first line of file """ with open(file, "r") as f: return f.readline()