def set_loglevel(level): """Sets the application's logging severity level in configuration (defaults to logging.WARNING)""" config = get_config() acceptable_log_levels = available_log_levels.keys() if level is not None and level in acceptable_log_levels: config.set_app_option({'log level': level})
def migrate_user_path(self, new_user_path): """Sets the default user path to new_user_path, creating the path if necessary and copying system plugins. """ config = get_config() config.set_app_option({"User Path": os.path.normcase(new_user_path)}) self.check_user_path() self.copy_system_plugins()
def set_window_size(self, window_dimensions): """Writes the listed window dimensions to the default configuration file.""" config = get_config() config.set_app_option({"Window Size": window_dimensions})
def set_coords(self, coordinate_list): """Writes the specified coordinate list to the default configuration file.""" config = get_config() config.set_app_option({"Coordinates": coordinate_list})
def set_preview_state(self, preview_state): """Writes an entry into the configuration file indicating whether thumbnails should be enabled or disabled.""" config = get_config() config.set_app_option({"Enable Preview": preview_state})