On ven, 2010-12-31 at 12:41 +0100, Krzysztof Jakubczyk wrote:
> Hi,
> I've created import hook for wx.lib.activex (e.g. used by
> wx.lib.iewin). The problem is that in nonfrozen application the
> wx.lib.activex generates comtypes.gen.myole4ax library using comtypes.
> In frozen this isn't done. If you don't execute application from sources
> this module is not generated so pyInstaller during build doesn't include
> it. My import hook simply impors wx.lib.activex so that
> comtypes.gen.myole4ax is generated and then during pyInstaller build
> process can be included.
Thanks.
The policy for import hooks is never to import a 3rd-party module
directly, so not to alter the PyInstaller's process in any way. We've
been hit hard with side effects in the past, so we want to play safe.
The correct solution for this case is to use
hookutils.exec_statement("import comtypes.gen.myole4ax") (you can import
hookutils of course since that's PyInstaller's code).
Can you verify if it still works?
Thanks!
--
Giovanni Bajo :: Develer S.r.l.
[email protected] :: http://www.develer.com
Blog: http://giovanni.bajo.it
Last post: Compile-time Function Execution in D
--
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.