diff options
author | Georg Brandl <georg@python.org> | 2008-05-25 07:45:51 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-05-25 07:45:51 (GMT) |
commit | 38feaf0fef244879411f094a7e68f542a6771dea (patch) | |
tree | 632d870bad650ece1724111091a2b307759ea997 /Lib/platform.py | |
parent | 2cb57a40b28f4680a1433d4640d99f4b2efe7165 (diff) | |
download | cpython-38feaf0fef244879411f094a7e68f542a6771dea.zip cpython-38feaf0fef244879411f094a7e68f542a6771dea.tar.gz cpython-38feaf0fef244879411f094a7e68f542a6771dea.tar.bz2 |
#2879: rename _winreg to winreg.
Diffstat (limited to 'Lib/platform.py')
-rwxr-xr-x | Lib/platform.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/platform.py b/Lib/platform.py index d5cf623..415d83f 100755 --- a/Lib/platform.py +++ b/Lib/platform.py @@ -529,9 +529,9 @@ def _win32_getvalue(key,name,default=''): # Use win32api if available from win32api import RegQueryValueEx except ImportError: - # On Python 2.0 and later, emulate using _winreg - import _winreg - RegQueryValueEx = _winreg.QueryValueEx + # On Python 2.0 and later, emulate using winreg + import winreg + RegQueryValueEx = winreg.QueryValueEx try: return RegQueryValueEx(key,name) except: @@ -579,14 +579,14 @@ def win32_ver(release='',version='',csd='',ptype=''): # No emulation possible, so return the defaults... return release,version,csd,ptype else: - # Emulation using _winreg (added in Python 2.0) and + # Emulation using winreg (added in Python 2.0) and # sys.getwindowsversion() (added in Python 2.3) - import _winreg + import winreg GetVersionEx = sys.getwindowsversion - RegQueryValueEx = _winreg.QueryValueEx - RegOpenKeyEx = _winreg.OpenKeyEx - RegCloseKey = _winreg.CloseKey - HKEY_LOCAL_MACHINE = _winreg.HKEY_LOCAL_MACHINE + RegQueryValueEx = winreg.QueryValueEx + RegOpenKeyEx = winreg.OpenKeyEx + RegCloseKey = winreg.CloseKey + HKEY_LOCAL_MACHINE = winreg.HKEY_LOCAL_MACHINE VER_PLATFORM_WIN32_WINDOWS = 1 VER_PLATFORM_WIN32_NT = 2 VER_NT_WORKSTATION = 1 |