|
wslwinreg
|
Registry key helper class. More...
Public Member Functions | |
| __init__ (self, root_key, subkey, access) | |
| Initialize the class. | |
| __enter__ (self) | |
| Enable enter/exit functionality. | |
| __exit__ (self, exception_type, exception_value, traceback) | |
| Release resources on class release. | |
| close (self) | |
| Release existing key, if any. | |
| open_subkey (self, subkey, access=None) | |
| Open a sub key. | |
| get_subkeys (self) | |
| Return the list of all of the sub key names. | |
| get_value (self, value_name=None) | |
| Read a value from a registry key. | |
| get_all_values (self) | |
| Return a dict of all key name and associated values. | |
| __getitem__ (self, subkey) | |
| Call open_subkey() with subscript. | |
| __iter__ (self) | |
| Iterator of the sub keys. | |
Public Attributes | |
| key = root_key | |
| Key handle of opened key. | |
| access = access | |
| Access used to open this key, used as default to open sub keys. | |
Registry key helper class.
Manage entries in a registy key by using indexing and scanning.
| wslwinreg.WinRegKey.__init__ | ( | self, | |
| root_key, | |||
| subkey, | |||
| access ) |
Initialize the class.
| root_key | Root key enumeration |
| subkey | String or None for name of sub key |
| access | Access flags to pass to OpenKeyEx() |
| wslwinreg.WinRegKey.__exit__ | ( | self, | |
| exception_type, | |||
| exception_value, | |||
| traceback ) |
Release resources on class release.
| exception_type | Ignored |
| exception_value | Ignored |
| traceback | Ignored |
| wslwinreg.WinRegKey.__getitem__ | ( | self, | |
| subkey ) |
Call open_subkey() with subscript.
Uses the access flags from this key to open the sub key.
| subkey | Requested sub key. |
| wslwinreg.WinRegKey.__iter__ | ( | self | ) |
Iterator of the sub keys.
Call get_subkeys() and encapsulate the value in an iter()
| wslwinreg.WinRegKey.get_all_values | ( | self | ) |
Return a dict of all key name and associated values.
| wslwinreg.WinRegKey.get_subkeys | ( | self | ) |
Return the list of all of the sub key names.
Iterate over all of the sub keys and place their names in a list. Return the list. Unicode is properly handled.
| wslwinreg.WinRegKey.get_value | ( | self, | |
| value_name = None ) |
Read a value from a registry key.
| value_name | String of the name of the value, None for default. |
| wslwinreg.WinRegKey.open_subkey | ( | self, | |
| subkey, | |||
| access = None ) |
Open a sub key.
| subkey | Name of the subkey to open |
| access | Desired access to the subkey. |