Example #1
0
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})
Example #2
0
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})
Example #3
0
 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()
Example #4
0
 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()
Example #5
0
 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})
Example #6
0
 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})
Example #7
0
 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})
Example #8
0
 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})
Example #9
0
 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})
Example #10
0
 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})