Пример #1
0
  def run(self, visit) :
    """ run walks through the menu using the keys, executing the supplied visit function as each item is visited

      the visit function will return a Item DOM object

    """
    visit(self.current)
    for key in presenter.read_key() :
       self.move(key)
       if self.current is None :
          exit()
       else :
          visit(self.current)
Пример #2
0
#!/usr/bin/python
import speak
import presenter

for key in presenter.read_key() :
   print key
   speak.say(key)