Esempio n. 1
0
    def __init__(self):
        # file does not exist --> copy the initial file
        if not os.path.isfile(conf_file):
            print("config file should be at: %s" % conf_file)
            copy(init_file, conf_path)

        self.settings = setting.Settings(conf_file)
Esempio n. 2
0
    def __init__(self):
        # if config dir does not exist --> create
        if not os.path.exists(conf_path):
            os.makedirs(conf_path)

        # file does not exist --> copy the initial file
        if not os.path.isfile(conf_file):
            copy(init_file, conf_path)

        self.settings = setting.Settings(conf_file)
Esempio n. 3
0
    def __init__(self):
        # file does not exist --> copy the initial file
        if not os.path.isfile(conf_file):
            copy(init_file, conf_path)

        self.settings = setting.Settings(conf_file)
Esempio n. 4
0
 def __init__(self):
     self.filename = os.path.join(os.path.expanduser("~/PlebNet"), PATH_TO_FILE)
     self.settings = setting.Settings(self.filename)
     self.settings.load()