Right. When pythonwin is called to create an Python binding
for a COM component, it generates a new python class and puts
this class in the gen_py directory (which magically appears).
I believe the problem is that the py2exe program doesn't expand
the Python path to include the deployment directory, otherwise
this directory would be found...
To work-aroud this problem, simply use the makepy program to
generate a python wrapper for the activeX component you have
(for example, IE Explorer). Then, rename this module file to
something more palatable (like ie.py). Then, instead of using
"ensure module" simply import the re-named file -- the imported
module is the class module.
For example, to make the IE ActiveX demo work...
1) Generate ie.py using makepy using the "-o" option
2) Replace the "ensure module" stuff in the demo code with...
from wxPython.wx import *
if wxPlatform == '__WXMSW__':
from wxPython.lib.activexwrapper import MakeActiveXClass
import ie5
browserModule = ie5
No other changes seem to be necessary.
Best,
Clark
···
On Wed, 11 Apr 2001, William Voll wrote:
I just recently created a wxapp that uses the ActiveXWrapper. I
want to make a .exe of it. I have tried py2exe but it gave me import
errors. I appears it can't find references to __init__.py modules.
I just recently created a wxapp that uses the ActiveXWrapper. I want to make a .exe of it.
I have tried py2exe but it gave me import errors. I appears it can't find references to __init__.py modules.
Has anyone had any luck creating an .exe of a wxapp that uses the ActiveXWrapper?
> I just recently created a wxapp that uses the ActiveXWrapper. I
> want to make a .exe of it. I have tried py2exe but it gave me import
> errors. I appears it can't find references to __init__.py modules.
Right. When pythonwin is called to create an Python binding
for a COM component, it generates a new python class and puts