def makeactions(actions_list): actions = {} actions['-'] = obj = EasyUtils.EMPTY_CLASS() obj.type = wx.ITEM_SEPARATOR for i in actions_list: obj = EasyUtils.EMPTY_CLASS() obj_id, obj.caption, obj.type, obj.shorttip, obj.longtip, obj.image, obj.funcname = i actions[obj_id] = obj return actions
def initlog(self): # import logging # self.log = log = logging.getLogger('EasyGuider') # hdlr = logging.FileHandler('EasyAdmin.log') # formatter = logging.Formatter('%(asctime)s [%(levelname)s] %(message)s') # hdlr.setFormatter(formatter) # log.addHandler(hdlr) # log.setLevel(logging.WARNING) self.log = log = EasyUtils.EMPTY_CLASS() def trace(): # message = traceback.format_exception(*sys.exc_info()) # log.error(''.join(message)) raise log.traceback = trace