DSwin.py 文件源码

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

项目:Otop 作者: fcbarclo 项目源码 文件源码
def Wintbs(self):
                y = self.WinOtopData[self.ID_PAD_TBS][1]
                x = self.WinOtopData[self.ID_PAD_TBS][2]
                nlines = self.WinOtopData[self.ID_PAD_TBS][3]
                hsize = len(self.Vtbsdata_head)
        self.tbs_head = 'Tablespace - max five used'

                Ltmp=(self.ID_PAD_TBS,y,x,nlines,hsize)
                self.padrefreshcoord.append(Ltmp)

                try:
                        self.tbspad = curses.newpad(y+nlines+3,x+hsize+2)
                        self.tbswinbox = curses.newwin( nlines+3, hsize+3, y, x)
                except Exception as err:
                        self.tbspad =-1
                        self.WinPrintError("Wintbs curses Error:"+str(err) )
                finally:
                        try:
                                if not self.WinCheckThreadAlive(self.idthtbs):
                                        self.idthtbs = threading.Thread(target=self._WintbsshowTH,name='tbsTH')
                                        self.idthtbs.setDaemon(True)
                                        self.thConfig.append((self.ID_PAD_TBS,1))
                                else:
                                        self.lockvideo.acquire()
                                        self.tbspad.addstr(1,1,self.Vtbsdata_head,self.CYANONBLACK)
                                        self.tbspad.addstr(2,2,"waiting refresh..." ,self.GREENONBLACK)
                                        self.tbspad.refresh(1,0,y+1,x+1,y+nlines+1,x+hsize)
                                        self.lockvideo.release()

                        except Exception as err:
                                self.tbspad =-10
                                self.WinPrintError("Wintbs thrd Error:"+str(err) )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号