Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f1ac41fb
Commit
f1ac41fb
authored
Jul 28, 2000
by
Mark Hammond
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a type in the docstrings, and make the module Unicode aware.
parent
8d5d93c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
Lib/plat-win/winreg.py
Lib/plat-win/winreg.py
+8
-4
No files found.
Lib/plat-win/winreg.py
View file @
f1ac41fb
...
...
@@ -15,7 +15,7 @@ deleteKey( keyname )
delete a key if it exists
Note: deleteKey may not be recursive on all platforms.
>>> key=
crea
teKey( r"HKLM
\
SOFTWARE
\
Python
\
Tes
t
" )
>>> key=
dele
teKey( r"HKLM
\
SOFTWARE
\
Python
\
Tes
t
" )
RemoteKey( machine, top_level_key ):
open a key on another machine.
...
...
@@ -139,7 +139,7 @@ def _getName( item, nameFromNum ):
except
(
WindowsError
,
EnvironmentError
):
raise
IndexError
,
item
elif
type
(
item
)
==
StringType
:
elif
type
(
item
)
in
[
StringType
,
UnicodeType
]
:
keyname
=
item
else
:
raise
exceptions
.
TypeError
,
\
...
...
@@ -300,13 +300,17 @@ class RegKey:
if
regtype
:
typeint
=
regtype
.
intval
else
:
if
type
(
data
)
==
StringType
:
if
type
(
data
)
in
[
StringType
,
UnicodeType
]
:
typeint
=
_winreg
.
REG_SZ
elif
type
(
data
)
==
ListType
:
# XXX - _winreg currently only supports lists
# Also, probably should check each element is
# string/unicode.
typeint
=
_winreg
.
REG_MULTI_SZ
elif
type
(
data
)
==
IntType
:
typeint
=
_winreg
.
REG_DWORD
elif
type
(
data
)
==
array
.
ArrayType
:
typeint
=
_winreg
.
REG_BINARY
data
=
data
.
tostring
()
_winreg
.
SetValueEx
(
self
.
handle
,
valname
,
0
,
typeint
,
data
)
def
flush
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment