def init(self): self.__dict__['confobj'] = ConfigParser.RawConfigParser() self.__dict__['secobjs'] = {} conf_file = os.path.dirname(os.path.abspath(__file__))+'/config.ini' if not os.path.exists(conf_file): printer.exception('MiConfig.init --> Cannot load config file %s\n' % conf_file) self.load_from_file(conf_file)
def init(self): self.__dict__['confobj'] = ConfigParser.RawConfigParser() self.__dict__['secobjs'] = {} conf_file = os.path.dirname(os.path.abspath(__file__)) + '/config.ini' if not os.path.exists(conf_file): printer.exception( 'MiConfig.init --> Cannot load config file %s\n' % conf_file) self.load_from_file(conf_file)
def TestColorPrinter(): printer.i('Info test message\n') printer.d('Debug test message\n') printer.w('Warning test message\n') printer.e('Error test message\n') try: t = 1/0 except: printer.exception('Exception test message\n') printer.beep()
def TestColorPrinter(): printer.i('Info test message\n') printer.d('Debug test message\n') printer.w('Warning test message\n') printer.e('Error test message\n') try: t = 1 / 0 except: printer.exception('Exception test message\n') printer.beep()