1
0
mirror of https://github.com/undera/pylgbst.git synced 2020-11-18 19:37:26 -08:00
Lego-Boost-Python-Library/vernie/run_commands_file.py
Andrey Pohilko 06cfd9c419 Refactoring
2017-09-19 21:48:53 +03:00

16 lines
286 B
Python

from vernie import *
robot = Vernie()
robot.say("commands from file")
def confirmation(command):
robot.say(command[0])
with open("vernie.commands") as fhd:
for cmd in fhd.readlines():
sys.stdout.write("%s" % cmd)
robot.interpret_command(cmd, confirmation)