#!/usr/bin/env python3 import toyrobot def feed_file(filename: str, robot: toyrobot.Robot): with open(filename) as f: for line in f: line = line.strip() print(line) robot.interpret_command(line) def main(): print('a)') feed_file('example_a.txt', toyrobot.Robot(6, 6)) print() print('b)') feed_file('example_b.txt', toyrobot.Robot(6, 6)) print() print('c)') feed_file('example_c.txt', toyrobot.Robot(6, 6)) print() print('d)') feed_file('example_d.txt', toyrobot.Robot(6, 6)) print() if __name__ == "__main__": main()