asyncore module
Andrew Bennetts
andrew-pythonlist at puzzling.org
Fri Mar 14 20:07:09 EST 2003
On Fri, Mar 14, 2003 at 10:28:30AM -0600, sik0fewl wrote:
> Hey,
>
> Is asyncore ideal for programs with user input as well as sockets? It
> doesn't seem so with asyncore.loop() not returning until all sockets are
> closed, but maybe I'm missing something.
>
> Otherwise, threading seems like the way to go (not like there are any
> other ways to go).
Twisted can do this, using the twisted.internet.stdio module -- for
instance, Conch (Twisted's SSH implementation) uses this in its client.
You can also use curses with Twisted. There's a simple example of an IRC
client in doc/examples/cursesclient.py in the Twisted distribution.
http://twistedmatrix.com/
I recommend using Twisted rather than asyncore in general. It's a much
richer framework.
-Andrew.
More information about the Python-list
mailing list