[wxPython] Making .exe of a wxApp

Hi,

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?

Any help would be greatly appreciated,

Thanks,

William

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.

William,

I want to look after this.
Can you supply a simple script so that I can reproduce this?

Thanks,

Thomas

···

----- Original Message -----
From: "William Voll" <zdweeb@hotmail.com>
To: <wxpython-users@lists.wxwindows.org>
Sent: Wednesday, April 11, 2001 2:14 PM
Subject: [wxPython] Making .exe of a wxApp

Hi,

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?

Any help would be greatly appreciated,

Thanks,

William

> 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

...

Thanks Clark, I've added your answer to the wxPyWiki at
http://wxpython.org/cgi-bin/wiki/CreatingStandaloneExecutables. Feel free
to add more info to that page as needed.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!