def show(self):
t = threading.Thread(target=self.get_data,args=())
t.setDaemon(True)
t.start()
try:
mainwindow = curses.initscr()
curses.cbreak(); mainwindow.keypad(1); curses.noecho()
mainwindow.border(0)
mainwindow.refresh()
curses.start_color()
curses.init_pair(1, curses.COLOR_BLACK, curses.COLOR_GREEN)
(h,w)= mainwindow.getmaxyx()
l1= mainwindow.subwin(8,w/2,0,0)
l1.border(0)
t1 = threading.Thread(target=self._showdata,args=(l1,))
t1.setDaemon(True)
t1.start()
t1.join()
t.join()
mainwindow.addstr(h/2,w/2-15,"RUN OVER,PLEASE ENTER!",curses.color_pair(1))
mainwindow.getch()
finally:
curses.nocbreak(); mainwindow.keypad(0); curses.echo()
curses.endwin()
评论列表
文章目录