[pywin32-checkins] pywin32/win32/Lib pywintypes.py,1.5,1.6
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: <mha...@us...> - 2003-10-31 23:47:49
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv30595/win32/lib Modified Files: pywintypes.py Log Message: For frozen programs, if a sys.path entry is a file, look in its directory. pythoncom now simply re-uses pywintypes logic rather than duplicating it. Index: pywintypes.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/pywintypes.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pywintypes.py 31 Oct 2003 03:11:13 -0000 1.5 --- pywintypes.py 31 Oct 2003 23:47:46 -0000 1.6 *************** *** 1,5 **** # Magic utility that "redirects" to pywintypesxx.dll ! def __import(modname): # *sigh* - non-admin installs will not have pywintypesxx.dll in the # system directory, so 'import win32api' will fail looking --- 1,5 ---- # Magic utility that "redirects" to pywintypesxx.dll ! def __import_pywin32_system_module__(modname, globs): # *sigh* - non-admin installs will not have pywintypesxx.dll in the # system directory, so 'import win32api' will fail looking *************** *** 20,23 **** --- 20,27 ---- # then we try and load the DLL from our sys.path for look in sys.path: + # If the sys.path entry is a (presumably) .zip file, use the + # directory + if os.path.isfile(look): + look = os.path.dirname(look) found = os.path.join(look, filename) if os.path.isfile(found): *************** *** 38,43 **** mod = imp.load_module(modname, None, found, ('.dll', 'rb', imp.C_EXTENSION)) # and fill our namespace with it. ! globals().update(mod.__dict__) - __import("pywintypes") - del __import --- 42,47 ---- mod = imp.load_module(modname, None, found, ('.dll', 'rb', imp.C_EXTENSION)) # and fill our namespace with it. ! globs.update(mod.__dict__) ! ! __import_pywin32_system_module__("pywintypes", globals()) |