Skip to content

Instantly share code, notes, and snippets.

@KitWallace
Created August 18, 2012 01:03
Show Gist options
  • Save KitWallace/3383736 to your computer and use it in GitHub Desktop.
Save KitWallace/3383736 to your computer and use it in GitHub Desktop.
Execute actions in the yacht menu
#!/usr/bin/python
""" talking yacht
"""
import sys
import speak
# application specific imports
import time
from menu import *
def visit(item) :
action = item.getAttribute('action')
if action == "" :
text = item.getAttribute('title')
else :
text = eval(action)
speak.say(text)
print text
name = sys.argv[1]
menu = Menu(name)
menu.run(visit)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment