def check_python_version():
    """Checks the python version, exists if != 2.7."""
    python_major, python_minor = sys.version_info[:2]

    if python_major != 2 or python_minor != 7:
        sys.stderr.write("pyGenClean requires python 2.7")
        sys.exit(1)
Checks the python version, exists if != 2.7.