comparison examples/file_dialog.py @ 42:585302e84c1f

fixed typo + added comment
author Goffi <goffi@goffi.org>
date Sun, 20 Feb 2011 00:37:54 +0100
parents 4da76342ae05
children 287ff3e1edd1
comparison
equal deleted inserted replaced
41:589e5e22f8f1 42:585302e84c1f
31 def cancel_cb(control): 31 def cancel_cb(control):
32 """This callback is called when user cancelled the dialog""" 32 """This callback is called when user cancelled the dialog"""
33 raise urwid.ExitMainLoop() 33 raise urwid.ExitMainLoop()
34 34
35 def test_quit(input): 35 def test_quit(input):
36 """We leave is user press 'esc'""" 36 """We leave if user press 'esc'"""
37 if input in ('esc',): 37 if input in ('esc',):
38 raise urwid.ExitMainLoop() 38 raise urwid.ExitMainLoop()
39 39
40 fd = FileDialog(ok_cb, cancel_cb) 40 fd = FileDialog(ok_cb, cancel_cb)
41 loop = urwid.MainLoop(fd, const_PALETTE, unhandled_input=test_quit) 41 loop = urwid.MainLoop(fd, const_PALETTE, unhandled_input=test_quit)