Skip to content

Commit 483849a

Browse files
committed
Add document for CreateKeyEx
1 parent 913b21a commit 483849a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Doc/library/winreg.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ This module offers the following functions:
8585
See :ref:`above <exception-changed>`.
8686

8787

88-
.. function:: CreateKeyEx(key, sub_key, reserved=0, access=KEY_WRITE)
88+
.. function:: CreateKeyEx(key, sub_key, reserved=0, access=KEY_WRITE, options=0, create_only=False)
8989

9090
Creates or opens the specified key, returning a
9191
:ref:`handle object <handle-object>`.
@@ -101,6 +101,13 @@ This module offers the following functions:
101101
security access for the key. Default is :const:`KEY_WRITE`. See
102102
:ref:`Access Rights <access-rights>` for other allowed values.
103103

104+
*options* is an interger and can be zero or one of the predefined
105+
:ref:`REG_OPTION_* constants <hkey-constants>`.
106+
107+
*create_only* is a boolean.
108+
When set to True, a :exc:`FileExistsError`` will be raised
109+
if the key is already exists. Default is ``False``.
110+
104111
If *key* is one of the predefined keys, *sub_key* may be ``None``. In that
105112
case, the handle returned is the same key handle passed in to the function.
106113

0 commit comments

Comments
 (0)