Default management of the psyplot_gui package
This module defines the necessary configuration parts for the psyplot gui
Classes:
|
RcParams for the psyplot-gui package. |
Data:
|
|
|
Functions:
|
Apply multiple validation functions |
|
Test if |
Validate that None is given |
|
|
Validate a string |
- class psyplot_gui.config.rcsetup.GuiRcParams(*args, **kwargs)[source]
Bases:
RcParams
RcParams for the psyplot-gui package.
Attributes:
Methods:
load_from_file
([fname])Update rcParams from user-defined settings
load_plugins
(*args, **kwargs)Load the plugins for the psyplot_gui MainWindow
- HEADER = 'Configuration parameters of the psyplot module\n\nYou can copy this file (or parts of it) to another path and save it as\npsyplotguirc.yml. The directory should then be stored in the PSYPLOTCONFIGDIR\nenvironment variable.'
- load_from_file(fname=None)[source]
Update rcParams from user-defined settings
This function updates the instance with what is found in fname
- Parameters:
fname (str) – Path to the yaml configuration file. Possible keys of the dictionary are defined by
config.rcsetup.defaultParams
. If None, theconfig.rcsetup.psyplot_fname()
function is used.
See also
dump_to_file
,psyplot_fname
- psyplot_gui.config.rcsetup.defaultParams = {'backend': ['psyplot', <function try_and_error.<locals>.validate>, 'Backend to use when using the graphical user interface. The current backend is used and no changes are made. Note that it is usually not possible to change the backend after importing the psyplot.project module. The default backend embeds the figures into the '], 'console.auto_set_mp': [True, <function validate_bool>, "If True, then the 'mp' variable in the console is automatically set when the current main project changes"], 'console.auto_set_sp': [True, <function validate_bool>, "If True, then the 'sp' variable in the console is automatically set when the current sub project changes"], 'console.connect_to_help': [True, <function validate_bool>, 'Whether the console shall be connected to the help_explorer or not'], 'console.start_channels': [True, <function validate_bool>, 'Start the different channels of the KernelClient'], 'content.load_tooltips': [True, <function validate_bool>, 'If True, a lazy load is performed on the arrays and data sets and their string representation is displayed as tool tip. This part of the data into memory. It is recommended to set this to False for remote data.'], 'fmt.sort_by_key': [True, <function validate_bool>, 'If True, the formatoptions in the Formatoptions widget are sorted by their formatoption key rather than by their name.'], 'help_explorer.online': [None, <function validate_bool_maybe_none>, 'Switch that controls whether the online functions of the help explorer shall be enabled. False implies that help_explorer.use_intersphinx is set to False'], 'help_explorer.render_docs_parallel': [True, <function validate_bool>, 'Boolean whether the html docs are rendered in a separate process'], 'help_explorer.use_intersphinx': [None, <function validate_bool_maybe_none>, 'Use the intersphinx extension and link to the online documentations of matplotlib, pyplot, psyplot, numpy, etc. when converting rst docstrings. The inventories are loaded when the first object is documented. If None, intersphinx is only used when `help_explorer.online` is True and you are not using windows'], 'help_explorer.use_webengineview': [True, <function validate_bool>, 'Enable the PyQt5.QtWebEngineWidgets.QWebEngineView which might not work under certain circumstances.'], 'main.listen_to_port': [True, <function validate_bool>, 'If True and the psyplot gui is already running, new files are opened in that gui'], 'main.open_files_port': [30124, <function _make_type_validator.<locals>.validate_int>, 'The port number used when new files are opened'], 'main.opengl': ['software', <function validate_str>, "The opengl implementation to use. Should be one of 'software', 'desktop', 'gles' or 'automatic'."], 'plugins.exclude': [[], <function try_and_error.<locals>.validate>, "The plugins to exclude from loading. Can be either 'all' to exclude all plugins or a list like in 'plugins.include'."], 'plugins.include': [None, <function try_and_error.<locals>.validate>, "The plugins to load. Can be either None to load all that are not explicitly excluded by the 'plugins.exclude' key or a list of plugins to include. List items can be either module names, plugin names or the module name and widget via '<module_name>:<widget>'"]}
dict
with default values and validation functions
- psyplot_gui.config.rcsetup.rcParams = {'backend': 'psyplot', 'console.auto_set_mp': True, 'console.auto_set_sp': True, 'console.connect_to_help': True, 'console.start_channels': True, 'content.load_tooltips': True, 'fmt.sort_by_key': True, 'help_explorer.online': None, 'help_explorer.render_docs_parallel': True, 'help_explorer.use_intersphinx': None, 'help_explorer.use_webengineview': True, 'main.listen_to_port': True, 'main.open_files_port': 30124, 'main.opengl': 'software', 'plugins.exclude': [], 'plugins.include': None}
RcParams
instance that stores default formatoptions and configuration settings.
- psyplot_gui.config.rcsetup.try_and_error(*funcs)[source]
Apply multiple validation functions
- Parameters:
*funcs – Validation functions to test
- Return type:
function
- psyplot_gui.config.rcsetup.validate_none(b)[source]
Validate that None is given
- Parameters:
b ({None, 'none'}) – None or string (the case is ignored)
- Return type:
None
- Raises: