def input_filter(self, input, raw_input):
if 'q' in input or 'Q' in input:
raise urwid.ExitMainLoop()
# handle other keystrokes
for k in input:
try:
self.wrap_keypress(k)
self.event = None
self.view.footer = None
except CalcEvent, e:
# display any message
self.event = e
self.view.footer = e.widget()
# remove all input from further processing by MainLoop
return []
评论列表
文章目录