def load_automata(path): graph_file = open(path, 'ro'); G = pgv.AGraph("".join(graph_file.readlines())) graph_file.close() return G