[Twisted-Python] PB and multiple apps
Andrew Bennetts
andrew-twisted at puzzling.org
Sat Feb 15 02:43:17 MST 2003
On Sat, Feb 15, 2003 at 01:05:51AM -0500, Jeff Grimmett wrote:
>
> > Have you seen doc/examples/pbecho.py and
> > doc/examples/pbechoclient.py? They do pretty much exactly
> > this, i.e. a long-running server, and a one-shot
> > client:
>
> Yep, but there's that dreaded reactor.stop() in the client.
Well, if you don't want the client to stop, don't call reactor.stop(). I'm
not sure what you mean by "one-shot"; I thought you meant a program that was
run with the sole purpose of running a PB command and exiting.
> Good news: I figured out how to make it work. I've created a class that
> I use as a mix-in for my protocol classes to utilize. The down side is
> that I have to maintain two versions of the debugger OR put in some
> conditional code, but the upshot is that I can now do exactly what I
> needed to do with it.
[code snipped]
I can't see anything special about that, except that it doesn't call
reactor.stop(), which is what we've been saying all along :)
-Andrew.
More information about the Twisted-Python
mailing list