Re: [python-win32] creating a long-running Python COM server

2006-09-17 Thread Mark Hammond
> I will write this up as a recipe in the Python Cookbook; any comments > on my code (attached)? The 'busy loop' looks ugly to my eyes. It can be solved by importing win32gui, then changing the Quit method to: def Quit(self): win32gui.PostQuitMessage(0) and the entire busy loop gets

Re: [python-win32] creating a long-running Python COM server

2006-09-15 Thread David Goodger
On 9/14/06, Mark Hammond <[EMAIL PROTECTED]> wrote: Basically, you must: * Arrange for your process to be started * In your process, create a COM server object - ie, create an object with the _public_methods_ etc attributes, then use win32com.server.wrap to wrap it * Call pythoncom.RegisterActive

Re: [python-win32] creating a long-running Python COM server

2006-09-14 Thread Mark Hammond
to have GetObject attach to your instance. Mark > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of David Goodger > Sent: Friday, 15 September 2006 6:22 AM > To: python-win32@python.org > Subject: Re: [python-win32] creating a long-

Re: [python-win32] creating a long-running Python COM server

2006-09-14 Thread David Goodger
I wrote: > I'm trying to figure out how to create a COM server as part of a > Python GUI app, such that an Excel client can connect to the *already > running* instance of the server in the app. IOW, I want Excel to talk > to the existing Python process, and not start a new one. This may clarify my