def edit(self, validate=None):
"""Edit in the widget window and collect the results."""
# Make the cursor visible and update the screen
curses.curs_set(1)
self.win.refresh()
while 1:
ch = self.win.getch()
if validate:
ch = validate(ch)
if not ch:
continue
if not self.do_command(ch):
break
self.win.refresh()
# Hide the cursor
curses.curs_set(0)
return self.gather()
评论列表
文章目录