From: Russell E. O. <ro...@ce...> - 2006-02-28 00:56:18
|
My python code has the standard code from <http://starship.python.net/crew/theller/moin.cgi/WinShell> to import win32com.shell in a way that works with py2exe. It works fine py2exe 0.6.3. However, it fails with py2exe 0.6.4 -- I'm warned that the module might be missing, and the warning is right: it cannot be imported by the packaged code (even on a system that has win32com installed). Any idea what's going on? I've appended the code. This code is in the module that actually imports win32com.shell, but I've also tried putting the same code in setup.py (which is how the example has it) and it still fails. -- Russell import modulefinder import win32com for p in win32com.__path__[1:]: modulefinder.AddPackagePath("win32com", p) for extra in ["win32com.shell"]: __import__(extra) m = sys.modules[extra] for p in m.__path__[1:]: modulefinder.AddPackagePath(extra, p) from win32com.shell import shell, shellcon ... |