py2exe problem

Jay Parlar jparlar at home.com
Mon Jul 23 16:04:41 EDT 2001


> 
> The problem is, if you don't give the -w switch,
> you will get the runtime error as well, but you probably cannot see it.
> 
> >
> > Traceback <most recent call last>:
> [Somehow the rest of the message didn't make it to c.l.p,
> but arrived in private mail]
> > .
> > .
> > .
> >    File "win32com\server\register.pyc", line 105 in _find_localserver_exe
> > "Runtime Error: Can not locate the program 'pythonw.exe' "
> >
> It seems you use the standard UseCommandline() function
> from win32com.server in your script. This will not work
> directly - as Duncan also has pointed out, I've posted
> a working example. Here's the same article under
> another URL: http://aspn.activestate.com/ASPN/Mail/Message/543305.

Well, I'm not useing UseCommandline() anywhere, but I was able to remove the Runtime error with help from that example. 
Now the .exe works on the target machine when I'm simply trying to register the COM server, but when I try run it in the GUI 
mode, I get a CoInitialize error. Just another thing to try to figure out, I guess.

> >
> >
> > > As Duncan Booth already suggested in his reply, it is generally
> > > a good idea to start by building a commnd line version even if
> > > you eventually will only be using a gui - you may not see
> > > tracebacks or error messages otherwise.
> > >
> > Hehe, well, I can see that traceback now. Any suggestions? py2exe won't let me have both the -c and -w options at 
the same time.
> 
> You don't need them at the same time: You can run a GUI in the console
> subsystem, but here you will always _have a console_ (sometimes called
> the 'annyoing dos window'.
> 

Thanks for all the help so far, I wouldn't have been able to get it to even where it is now without your suggestions.

Jay Parlar
----------------------------------------------------------------
Software Engineering III
McMaster University
Hamilton, Ontario, Canada

"Though there are many paths
At the foot of the mountain
All those who reach the top
See the same moon."




More information about the Python-list mailing list