def get_stash_version(corepath):
    """
    Find and return the current StaSh version.
    :param corepath: path to the 'core.py' file in the StaSh root directory
    :type corepath: str
    :return: the StaSh version defined in the corepath
    :rtype: str
    """
    with open(corepath, "r") as fin:
        for line in fin:
             if line.startswith("__version__"):
                 version = ast.literal_eval(line.split("=")[1].strip())
                 return version
    raise Exception("Could not find StaSh version in file '{f}'", f=corepath)

    Find and return the current StaSh version.
    :param corepath: path to the 'core.py' file in the StaSh root directory
    :type corepath: str
    :return: the StaSh version defined in the corepath
    :rtype: str
    
setup.py