Trees | Indices | Help |
|
---|
|
object --+ | Preferences
A class that allows Pythonic access to the mmpref library.
|
|||
|
|||
|
|||
|
|||
|
|||
constant |
|
||
int |
|
||
bool |
|
||
|
|||
str |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
dict |
|
||
|
|||
|
|||
Inherited from |
|
|||
|
Create a new Preferences object
|
Gets the type of data stored for this key.
|
Remove the key or group and its values. To remove a group and its associated keys, set type to NO_TYPE. If a group is set using beginGroup, the search will happen within the group. If a comment is set for the key, it will be removed automatically. The key matching the running platform is given higher preference over the general one.
|
Check for the presence of key. Check if the given key is available matching the give datatype. If beginGroup is called before this function, the given key will be searched for relative to the group. Keys specific to the running platform and non-platform specific keys attribute will be considered in the search. Note that the platform searched for the key is the running platform and not the platform set by beginOS.
|
Indicate the group for future key searches by appending group to the current group path. This group will be used for future group/key searches until endGroup is called. This is useful to avoid typing the common path again and again to query sets of keys. A product's keys can be grouped together under various paths. For instance, the SCRIPT product may have a PoseExplorer group, and that group may have Paths and Dialogs subgroups. One could access the 'import' key under the PoseExplorer/Paths group via: handler = Preferences(SCRIPTS) handler.beginGroup('PoseExplorer') handler.beginGroup('Paths') import_dir = handler.get('import') or: handler = PreferenceHandler(SCRIPTS) handler.beginGroup('PoseExplorer/Paths') import_dir = handler.get('import') or: handler = Preferences(SCRIPTS) import_dir = handler.get('PoseExplorer/Paths/import')
|
Get the current group set via the beginGroup method.
|
Remove the current group set via the beginGroup method from the group search path. The new group path will be the same as it was before the last invocation of beginGroup. |
Unset the group path so that searches begin at the top level for the product.
|
Set the OS. Future set() and set_x() commands will set OS-specific values for keys. Without calling this method, set() and set_x() will set non-OS-specific values. Keys specific to the running platform get higher preference in get functions. To stop setting platform specific key(s), use endOS.
|
Unset the OS. Future set() and set_x() commands will set non-OS-specific values for keys. Keys specific to the running platform get higher preference in get functions. |
Set the value of key. Note that the underlying library stores keys in a type specific way, but this function and the get function abstract that away. If key does not exist, it is created. If the group path has been set via beginGroup, it is honored. If the OS has been set via beginOS, it is honored. OS-specific key values get higher preference when searching for keys.
|
Get the value of key. Note that the underlying library stores keys in a type specific way, but this function and the set function abstract that away. If key does not exist, the value of the default argument is returned if it is given. If the key does not exist and default is not given, a KeyError is raised. If the group path has been set via beginGroup, it is honored. If the OS has been set via beginOS, it is honored. OS-specific key values get higher preference when searching for keys. The user-specific preference file is checked for the key first, then the default installation files are checked.
|
Get a dictionary of all preferences in the current group path. The dictionary keys will be preference names and the dictionary values will be preference values. Note that preference names will include the relative group path starting at the current group. If the OS has been set via beginOS, it is honored. OS-specific key values get higher preference when searching for keys.
|
Set a comment for the given key. If the group path has been set via beginGroup, it is honored. If the OS has been set via beginOS, it is honored. OS-specific key values get higher preference when searching for keys.
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Oct 26 01:00:02 2016 | http://epydoc.sourceforge.net |