def __init__(self): c = Config() tasks = c.getConfig() for name in tasks.keys(): tasks[name]['thread'] = None tasks[name]['start'] = 0 self.tasks = tasks self.Logger = getLogger()
def __init__(self): self.file = None self.config_file = 'config.ini' if os.path.basename(sys.executable) == "python.exe": current_path = os.getcwd() else: current_path = os.path.dirname(sys.executable) config_file = os.path.join(current_path,self.config_file) self.Logger = getLogger() self.Logger.info("config file is:"+config_file) if os.path.isfile(config_file): self.file = config_file