apptools.preferences.preferences module¶
The default implementation of a node in a preferences hierarchy.
-
class
apptools.preferences.preferences.
Preferences
(**traits)[source]¶ Bases:
traits.has_traits.HasTraits
The default implementation of a node in a preferences hierarchy.
-
add_preferences_listener
(listener, path='')[source]¶ Add a listener for changes to a node’s preferences.
-
flush
()[source]¶ Force any changes in the node to the backing store.
This includes any changes to the node’s descendants.
-
get
(path, default=None, inherit=False)[source]¶ Get the value of the preference at the specified path.
-
load
(file_or_filename=None)[source]¶ Load preferences from a file.
This is a merge operation i.e. the contents of the file are added to the node.
This implementation uses ‘ConfigObj’ files.
-
remove_preferences_listener
(listener, path='')[source]¶ Remove a listener for changes to a node’s preferences.
-