def __init__(self, path):
        BaseConfig.__init__(self, config_path)
        # QObject.__init__()

        self.fileHash = hashlib.md5(str(self.keys).encode('utf-8')).hexdigest()
        self.watcher = QFileSystemWatcher([path])
        self.watcher.fileChanged.connect(self._on_file_changed)
Exemple #2
0
    def __init__(self, path):
        BaseConfig.__init__(self, CONFIG_PATH)
        # QObject.__init__()

        self.watcher = QFileSystemWatcher([os.path.dirname(path), path])
        self.watcher.fileChanged.connect(self._on_file_changed)
        self.watcher.directoryChanged.connect(self._on_file_changed)
Exemple #3
0
    def __init__(self, path):
        BaseConfig.__init__(self, CONFIG_PATH)
        # QObject.__init__()

        self.watcher = QFileSystemWatcher([os.path.dirname(path), path])
        self.watcher.fileChanged.connect(self._on_file_changed)
        self.watcher.directoryChanged.connect(self._on_file_changed)
Exemple #4
0
    def __init__(self):
        BaseConfig.__init__(self, config_path)
        # GObject.GObject.__init__()

        # TODO: Gio's monitoring is a bit slow
        f = Gio.File.new_for_path(config_path)
        self.monitor = f.monitor_file(0, None)
        self.monitor.connect("changed", self._on_file_changed)
Exemple #5
0
    def __init__(self):
        BaseConfig.__init__(self, config_path)
        # GObject.GObject.__init__()

        # TODO: Gio's monitoring is a bit slow
        f = Gio.File.new_for_path(config_path)
        self.monitor = f.monitor_file(0, None)
        self.monitor.connect("changed", self._on_file_changed)
Exemple #6
0
 def __init__(self, filename, root_dir, mod_dir_name):
     self.filename = filename
     self.root_dir = root_dir
     self.mod_dir_name = mod_dir_name
     self.mod_dir = os.path.abspath(os.path.join(self.filename, ".."))
     with open(filename, encoding="utf-8") as file:
         self.json = json.load(file)
     BaseConfig.__init__(self, self.json)