def getVersionFromFile(in_file):
    """ Gets the version from the given Styl\CSS file.

    Parameters:
    -----------
    in_file : str
        The file to check against. cannot be empty.

    Returns:
    -----------
    Returns the version specified in the line containing '@version' or -1 if not found."""

    version = -1
    versionFound = False

    with open(in_file, "r") as read_obj:
        for line in read_obj:
            # searching for the line that contains the '@version' string
            if line.find("@version ") >= 0:
                temp = line.replace("@version", "").replace(" ", "")
                if len(temp) > 0:
                    version = temp
                    versionFound = True
                break

    # print any error
    if not versionFound or version == -1:
        print("Did not find version in file '" + in_file + "'")

    return version