py2exe COM server frustration

Thomas Heller theller at python.net
Thu Jun 12 13:05:46 EDT 2003


shi at imaging.robarts.ca (Shi Sherebrin) writes:

> hello,
> 
> I have spent today trying a number of different samples that I found,
> including the two listed on the py2exe
> homepage(http://aspn.activestate.com/ASPN/Mail/Message/543305,
> http://aspn.activestate.com/ASPN/Mail/Message/766627).  With the first
> I've gotten the closest to success (for the second I couldn't find any
> of the Agent* routines).  When I try running testCOMserver.py at the
> command line I am able to find the COM object using the Visual Studio
> OLE/COM browser, and to 'open' the item in the list to see the various
> sub-elements.  When I tried using py2exe to package the module,
> everything seemed to work (besides some warnings about modules not
> found such as win32dbg and I had to add the line "sys.frozen = 1", to
> avoid an error).  Registering worked ok, but when I tried to open the
> item in the OLE/COM browser, a console window appeared, doing nothing,
> and the system would just wait and wait, eventually timing out with
> some kind of CoCreation error.
> 
> I'm using build 151 (Python v2.1) of win32all, and v0.3.3 of py2exe. 
> I used 'vanilla' setup config files for py2exe.  I'd really appreciate
> any light anyone could shed on this matter.  All I want to do is make
> a COM object that can be called on a system that doesn't have Python
> installed.

Mark built support for McMillan installer into win32com.server,
and that broke the recipes I posted - I get exactly the same problems
you describe.

At the end of this post you find a changed sample that should work,
although I'm using Python2.2, win32all build 152 (?) on WinXP pro.
And the yet unreleased py2exe-0.4 ;-).

Let me know how it goes.

Thomas




More information about the Python-list mailing list