Hi,
I'm having following problem with wx and comtypes. I'm using
wx.lib.iewin.IEHtmlWindow. There is an except hook for wx.lib.iewin:
hiddenimports = ['myole4ax', 'stdole',
'_00020430_0000_0000_C000_000000000046_0_2_0',
'_99AB80C4_5E19_4FD5_B3CA_5EF62FC3F765_0_1_0']
When running Build.py comtypes generates some files to
site-packages\comtypes\gen - which are later included by pyInstaller to
the binary. This is fragment that includes comtypes.gen package data
when running ArcfhiveViewer :
'comtypes.gen': (True, 2143269L, 103),
'comtypes.gen.SHDocVw': (False, 16313L, 250),
'comtypes.gen._00020430_0000_0000_C000_000000000046_0_2_0': (False,
408083L,
3276),
'comtypes.gen._99AB80C4_5E19_4FD5_B3CA_5EF62FC3F765_0_1_0': (False,
993143L,
2871),
'comtypes.gen._EAB22AC0_30C1_11CF_A7EB_0000C05BAE0B_0_1_1': (False,
411359L,
13177),
'comtypes.gen.myole4ax': (False, 1498577L, 255),
When I execute build application on a clean machine, some modules are
generated by comtypes.client._generate at first run in
temp/comtypes_cache/<app> directory - e.g. comtypes.gen.MSHTML module is
being generated. (Comtypes can generate something dynamically). Later
import of the module is executed. Let's trace execution in iu.py.
importHook() is called
doimport() is called, comtypes.gen has __path__ set (it includes the
temp/comtypes_cache/<app> directory where generated modules are stored)
so PathImportDirector.getmod is used to load the module.
PathImportDirector.getmod() - owner is properly found - the
temp/comtypes_cache/<app> directory
DirOwner.getmod() - case is found - caseOk is executed
caseOk - listdir() is executed
listdir() - unfortunatelly the directory is present in cache - it's
content is loaded from cache, not from current directory state
Unfortunatelly later import of this module fails.
When I start my application another time - the module is already
generated (because temp is not cleared) and import succeeds - directory
contains the file.
Solution: I think we should be able to somehow mark that the directory
content for comtypes.gen module should be always read from disk - not
cached.
PS.
I'm not sure that packages from comtypes.gen should be included in build
archive - does comtypes content depend on time/machine?? If yes it
should be always generated.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pyinstaller?hl=en
-~----------~----~----~----~------~----~------~--~---