Exemple #1
0
    def option_change_log_level(self):
        """change the file logging.conf's logging level"""

        log_level = str(self.sender().text())

        IOTool.set_config_setting("level", log_level,
                                  os.path.join(ABS_PATH, "logging.conf"))

        logging.config.fileConfig(os.path.join(ABS_PATH, "logging.conf"))
Exemple #2
0
    def option_change_debug_state(self):
        """Togggle the debug state"""

        if self.DEBUG:
            self.option_display_normal_state()
            self.DEBUG = False

        else:
            self.option_display_debug_state()
            self.DEBUG = True

        #if DEBUG is false, the port list needs to be fetched
        self.refresh_ports_list()

        IOTool.set_config_setting(IOTool.DEBUG_ID,
                                  self.DEBUG,
                                  config_file_path=self.config_file)

        self.emit(SIGNAL("DEBUG_mode_changed(bool)"), self.DEBUG)
Exemple #3
0
    def file_save_config(self):
        """
        this function get the actual values of parameters and save them into the config file
        """
        script_fname = str(
            self.widgets['SciptWidget'].scriptFileLineEdit.text())
        IOTool.set_config_setting(IOTool.SCRIPT_ID, script_fname,
                                  self.config_file)

        output_path = os.path.dirname(
            self.widgets['OutputFileWidget'].get_output_fname()) + os.path.sep
        IOTool.set_config_setting(IOTool.SAVE_DATA_PATH_ID, output_path,
                                  self.config_file)

        if not self.instrument_connexion_setting_fname == "":
            IOTool.set_config_setting(IOTool.SETTINGS_ID,
                                      self.instrument_connexion_setting_fname,
                                      self.config_file)