Thank you, Will.
For anyone who is interested this is how I did it and it worked.
1) generate a .py file from an OLE TypeLibrary File.
You can do this with found in Lib\site-packages\win32com\client
First you need to know the name for the type library. You can find a list of registered libraries if you type in the command line:
> python -i
Write the name of the type library down (for example "Microsoft Excel 8.0 Object Library")
You generate a .py file from the command line, like this:
>python -o "" "Microsoft Excel 8.0 Object Library"
>python -o "D:\Temp\" "Microsoft Excel 8.0 Object Library"
if you want to use an absolute path
2) Take this .py file and move it where you have your script, to import it.
In your script you probably have something like this:
if wx.Platform == '__WXMSW__':
      from wx.lib.activexwrapper import MakeActiveXClass
      import win32com.client.gencache
      browserModule = win32com.client.gencache.EnsureModule('{05BFD3F1-6319-4F30-B752- C7A22889BCC4}', 0x0, 1, 0) 
"""is the browserModule that you are worried about, maybe it has another name in your script+ the big magic number comes from the acrobat library, so don't mind it"""
replace it with:
import wx
if wx.Platform == '__WXMSW__':
      from wx.lib.activexwrapper import MakeActiveXClass
      import excel  #in here you import the py file that you created with makepy
      browserModule = excel

"" <> wrote:
Hi Oana,

perhaps this will help:


Oana Ureche wrote:
> Hi All,
> I saw the same question was addressed before, but no specific answer.
> I wonder if anyone managed to find the answer.
> I create an executable for one of the demo of wxpython. The
> application is calling a function from a pdf module, for creating an
> PDF reader interface. After creating the executable and trying to run
> it, a log file is created:
> Traceback (most recent call last):
> File "", line 159, in ?
> File "", line 12, in __init__
> File "wx\lib\pdfwin.pyc", line 77, in __init__
> AttributeError: 'NoneType' object has no attribute 'WebBrowser'
> I guess I might have to be explicit about some libraries that py2exe
> does not know about?When running under python everything works. The
> executable arrises problems.
> I have python 2.4, windows xp sp2.
> Thanks in advance,
> ------------------------------------------------------------------------
> Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See
> how.
> ------------------------------------------------------------------------
> -------------------------------------------------------------------------
> This email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> ------------------------------------------------------------------------
> _______________________________________________
> Py2exe-users mailing list

Never miss a thing. Make Yahoo your homepage.