Esempio n. 1
0
 def __init__(self, target = None):
     if target != None:
         self.results = ncPirate.pSearch(target)
     else:
         self.results = []
     self.size = len(self.results)
     self.pos = 0
     self.display_range = 0
     self.height, self.width = screen.getmaxyx()
Esempio n. 2
0
    def new_search(self):
        curses.echo()
        curses.curs_set(1)
        search_window = curses.newwin( 5, 40, self.height // 2 - 5, self.width // 3 )
        search_window.box()
        search_window.addstr( 1 , 2, "Enter Search Query: (35 char max)" )
        search_window.refresh()

        target = search_window.getstr(3, 2, 35)
        self.results = ncPirate.pSearch(target)
        self.size = len(self.results)
        
        curses.curs_set(0)
        curses.noecho()
        del search_window
        screen.clear()
        self.draw_topbar()