本文整理汇总了Python中offlineimap.ui.UIBase.UIBase类的典型用法代码示例。如果您正苦于以下问题:Python UIBase类的具体用法?Python UIBase怎么用?Python UIBase使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了UIBase类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: mainException
def mainException(self):
if isinstance(sys.exc_info()[1], KeyboardInterrupt):
self.logger.warn("Timer interrupted at user request; program "
"terminating.\n")
self.terminate()
else:
UIBase.mainException(self)
示例2: terminate
def terminate(self, *args, **kwargs):
curses.nocbreak();
self.stdscr.keypad(0);
curses.echo()
curses.endwin()
# need to remove the Curses console handler now and replace with
# basic one, so exceptions and stuff are properly displayed
self.logger.removeHandler(self._log_con_handler)
UIBase.setup_consolehandler(self)
# finally call parent terminate which prints out exceptions etc
super(Blinkenlights, self).terminate(*args, **kwargs)
示例3: threadExited
def threadExited(s, thread):
threadid = thread.threadid
accountname = s.getthreadaccount(thread)
s.tflock.acquire()
try:
if threadid in s.threadframes[accountname]:
tf = s.threadframes[accountname][threadid]
del s.threadframes[accountname][threadid]
s.availablethreadframes[accountname].append(tf)
tf.setthread(None)
finally:
s.tflock.release()
UIBase.threadExited(s, thread)
示例4: unregisterthread
def unregisterthread(s, thread):
UIBase.unregisterthread(s, thread)
s._printData(s.logger.info, 'unregisterthread', thread.getName())
示例5: threadExited
def threadExited(s, thread):
s._printData(s.logger.info, 'threadExited', thread.getName())
UIBase.threadExited(s, thread)
示例6: sleep
def sleep(s, sleepsecs, account):
s.gettf().setcolor('red')
s.getaccountframe().startsleep(sleepsecs)
return UIBase.sleep(s, sleepsecs, account)
示例7: threadException
def threadException(self, thread):
#self._log_con_handler.stop()
UIBase.threadException(self, thread)
示例8: mainException
def mainException(self):
UIBase.mainException(self)
示例9: unregisterthread
def unregisterthread(s, thread):
UIBase.unregisterthread(s, thread)
s._printData('unregisterthread', thread.getName())
示例10: threadExited
def threadExited(s, thread):
s._printData('threadExited', thread.getName())
UIBase.threadExited(s, thread)