File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,27 @@ This module offers the following functions:
173173 See :ref: `above <exception-changed >`.
174174
175175
176+ .. function :: DeleteTree(key, sub_key=None)
177+
178+ Deletes the specified key and all its subkeys and values recursively.
179+
180+ *key * is an already open key, or one of the predefined
181+ :ref: `HKEY_* constants <hkey-constants >`.
182+
183+ *sub_key * is a string that names the subkey to delete. If ``None ``,
184+ deletes all subkeys and values of the specified key.
185+
186+ This function deletes a key and all its descendants. If *sub_key * is
187+ ``None ``, all subkeys and values of the specified key are deleted.
188+
189+ If the function succeeds, the entire key tree is removed.
190+ If the function fails, an :exc: `OSError ` exception is raised.
191+
192+ .. audit-event :: winreg.DeleteTree key,sub_key winreg.DeleteTree
193+
194+ .. versionadded :: next
195+
196+
176197.. function :: DeleteValue(key, value)
177198
178199 Removes a named value from a registry key.
You can’t perform that action at this time.
0 commit comments