def exec_file(path):
    """Execute a python file and return the `globals` dictionary."""
    namespace = {}
    with open(path, 'rb') as f:
        exec(f.read(), namespace, namespace)
    return namespace