[Twisted-Python] Connect to a Perspective Broker from a VB App(using a python com server) (Pls disrigard previous one)

Jean-Paul Calderone exarkun at divmod.com
Wed Aug 23 08:00:16 MDT 2006


On Wed, 23 Aug 2006 14:38:11 +0100, Hermínio Miguel Sanches <hsanches at gmail.com> wrote:
>Hi,
>
>Apologies, please disregard the previous email - here is the good one.
>
>I need to connect to a PerspectiveBroker from a VB application.
>I did it with a com server in python, which works fine when the com client
>is also python code.
>All the calls must be synchronous to the com server.
>When Calling from VB it works fine every time if the function used from the
>com server don't use the reactor.
>
>The problem is that when I call (from the VB com client) the functions that
>uses the twisted reactor it performs well the first time but for the the
>second time it's called, it stalls. I have to kill the vb executable.
>The function from the test code is: testBroker()
>
>Please can you help me to shed some light on this? Should I do it another
>way? Bellow is the code that I am using.

It looks as though you are starting and stopping the reactor for each
call you make.  The reactor can only be started once, so each attempt
you make after the first fails.

I've never written a COM server so I can't suggest a different way to
architect this so as to avoid the problem.

Jean-Paul




More information about the Twisted-Python mailing list