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

2006-09-14 Thread David Goodger
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. BTW, I know very little about

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

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

2006-09-14 Thread Mark Hammond
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.RegisterActiveObject passing it this object. That should be enough

[python-win32] Re: How to implement a COM interface (that is not part

2006-09-14 Thread Roger Upole
Ken Channing wrote: Hi -- the COM object I'm working on has a number of methods I am able to use fairly well by following the various win32com examples around. However, one of the methods' arguments takes a callback that implements an interface (I'm new to win COM terminology but I think

[python-win32] iTunes 7 vs Juice: ugly!

2006-09-14 Thread Garth T Kidd
Ladies and gentlemen of the jury, I throw myself on your mercy. Can anyone help me nut out what happened to the COM interface to iTunes with the iTunes 7 upgrade? iface = iTunes.Application iTunes = win32com.client.dynamic.Dispatch(iface) iTunes.Stop() ... used to work just fine.

Re: [python-win32] iTunes 7 vs Juice: ugly!

2006-09-14 Thread David Nicolson
Hi Garth, I've been developing a py2exe app that dispatches a COM object since iTunes 4 and I've seen this problem a bit. I'm not exactly sure what causes it, I think in certain circumstances the iTunes installer can fail to register the type library. Reinstalling iTunes usually solves the