[pywin32-checkins] pywin32/win32/Lib pywintypes.py,1.7,1.8
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: <mha...@us...> - 2004-02-05 23:44:36
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4301/win32/lib Modified Files: pywintypes.py Log Message: Don't try and use win32api to locate pywintypesxx.dll - it causes more trouble than it is worth, seeing as win32api depends on this module. Index: pywintypes.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/pywintypes.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** pywintypes.py 25 Nov 2003 10:26:23 -0000 1.7 --- pywintypes.py 5 Feb 2004 23:41:59 -0000 1.8 *************** *** 41,50 **** # Eeek - can't find on the path. Try "LoadLibrary", as it # has slightly different semantics than a simple sys.path search ! import win32api ! # Normal Python needs these files in a directory somewhere on ! # %PATH%, so let Windows search it out for us. As win32api ! # loads pywintypes, we can simple get the module after the import ! h = win32api.GetModuleHandle(filename) ! found = win32api.GetModuleFileName(h) # Python can load the module mod = imp.load_module(modname, None, found, --- 41,50 ---- # Eeek - can't find on the path. Try "LoadLibrary", as it # has slightly different semantics than a simple sys.path search ! # XXX - OK, we *don't* try LoadLibrary - if we can't find it, ! # there is an excellent change Windows can't find it, and ! # the attempt to bring in win32api *needs* Windows to find it. ! # If Windows can't find it, it displays a dialog trying to ! # import win32api, which is not what we want! ! raise ImportError, "Can not locate " + filename # Python can load the module mod = imp.load_module(modname, None, found, |