run.py 文件源码

python
阅读 40 收藏 0 点赞 0 评论 0

项目:app 作者: pythonfucku 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号