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
2017-09-16 18:14:04 +03:00

16 lines
278 B
Python

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