swingutils.preferences

This module provides helper classes and functions for accessing Java’s Preferences system.

class swingutils.preferences.PreferencesAdapter(node, key, default)

Represents the value of the given key in the given preferences node. The value attribute can be read, written to and deleted, which causes the appropriate action to be taken with the associated preferences node.

Parameters:
class swingutils.preferences.PreferencesNode(path, userMode)

Provides a pythonic interface (including dict-like access) to the preferences node at the given path. The preferred method of obtaining these is via getUserPrefs() or getSystemPrefs().

swingutils.preferences.getSystemPrefs(path)

Returns a preferences node from system-wide preferences for the given path.

Parameters:path – path to a preferences node (existing or not)
Returns:a dict-like preferences node
Return type:PreferencesNode
swingutils.preferences.getUserPrefs(path)

Returns a preferences node from current user’s preferences for the given path.

Parameters:path – path to a preferences node (existing or not)
Returns:a dict-like preferences node
Return type:PreferencesNode