(self)
Waiting an input and run a proper method according to type of input
Waiting an input and run a proper method according to type of input
Waiting an input and run a proper method according to type of input
def input_stream(self):
        """Waiting an input and run a proper method according to type of input"""
        while True:
            self.search(self.query)
            self.display()

            ch = self.search_window.getch()
            if curses.ascii.isprint(ch):
                self.write(ch)
                self.reset_top()
            elif ch in (curses.ascii.BS, curses.ascii.DEL, curses.KEY_BACKSPACE):
                self.delete()
                self.reset_top()
            elif ch == curses.KEY_UP:
                self.scroll(self.UP)
            elif ch == curses.KEY_DOWN:
                self.scroll(self.DOWN)
            elif ch == curses.KEY_LEFT:
                self.paging(self.UP)
            elif ch == curses.KEY_RIGHT:
                self.paging(self.DOWN)
            elif ch in (curses.ascii.LF, curses.ascii.NL):
                self.open_link()
            elif ch == curses.ascii.ESC:
                break
def input_stream ( self ) : while True : self . search ( self . query ) self . display ( ) ch = self . search_window . getch ( ) if curses . ascii . isprint ( ch ) : self . write ( ch ) self . reset_top ( ) elif ch in ( curses . ascii . BS , curses . ascii . DEL , curses . KEY_BACKSPACE ) : self . delete ( ) self . reset_top ( ) elif ch == curses . KEY_UP : self . scroll ( self . UP ) elif ch == curses . KEY_DOWN : self . scroll ( self . DOWN ) elif ch == curses . KEY_LEFT : self . paging ( self . UP ) elif ch == curses . KEY_RIGHT : self . paging ( self . DOWN ) elif ch in ( curses . ascii . LF , curses . ascii . NL ) : self . open_link ( ) elif ch == curses . ascii . ESC : break