Client/server chat program
Paul Rubin
phr-n2001d at nightsong.com
Mon Dec 10 23:40:53 EST 2001
Jonathan Gardner <jgardn at alumni.washington.edu> writes:
> > The usual way to do this is use separate threads for reading input and
> > displaying messages.
>
> Errr... not necessarily. Note that this is a chat program - you'll
> want the seperate threads to work with each other. I find it easier
> to program this sort of thing with only one thread and one process
> that sees what can be done and does it without blocking.
You can do it either way. The Unix telnet client uses separate
processes, if I remember correctly. Yes, if you use threads, you do
have to synchronize some of their operations, but the threading
package provides ample mechanisms for that.
More information about the Python-list
mailing list