[pywin32-checkins] pywin32 pywin32_postinstall.py,1.6,1.7
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: <mha...@us...> - 2004-01-20 23:09:20
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1:/tmp/cvs-serv29584 Modified Files: pywin32_postinstall.py Log Message: Nuke the "Modules" registry keys early win32all versions added. Index: pywin32_postinstall.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/pywin32_postinstall.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** pywin32_postinstall.py 3 Dec 2003 09:31:06 -0000 1.6 --- pywin32_postinstall.py 20 Jan 2004 23:09:17 -0000 1.7 *************** *** 106,109 **** --- 106,123 ---- pthfile.write(path + "\n") sys.path.append(path) + # It is possible people with old versions installed with still have + # pywintypes and pythoncom registered. We no longer need this, and stale + # entries hurt us. + for name in "pythoncom pywintypes".split(): + keyname = "Software\\Python\\PythonCore\\" + sys.winver + "\\Modules\\" + name + for root in _winreg.HKEY_LOCAL_MACHINE, _winreg.HKEY_CURRENT_USER: + try: + _winreg.DeleteKey(root, keyname + "\\Debug") + except WindowsError: + pass + try: + _winreg.DeleteKey(root, keyname) + except WindowsError: + pass # To be able to import win32api, PyWinTypesxx.dll must be on the PATH # We must be careful to use the one we just installed, not one already |