maze/bin/solve_maze.py

10 lines
173 B
Python

import sys
from maze import parse_maze
if len(sys.argv) == 2:
m = parse_maze(open(sys.argv[1], 'r').read())
else:
m = parse_maze(sys.stdin.read())
print m.solve()