def notify(): global BASEPATH count = 0 db = shelve.open(os.path.join(BASEPATH,'configs','msgdb.db')) for key in db: count += len(db[key]) if count>0: notifier.osd("您有 %d 条新消息" % count)
def do_notify(self): notifier.osd(self.quickview_title, None, self.level)