Client/server chat program

Paul Rubin phr-n2001d at nightsong.com
Mon Dec 10 17:18:54 EST 2001


"neuromorphus" <neuromorphus at yahoo.com> writes:
> The client program continuously asks for 'raw_input' from the user,and
> then sends the msg to the server to be broadcasted. However, I can't
> output messages to the terminal/console, if the client program is
> waiting for input. What happens is that after the client types a
> message. All previous output(of other users) are then flush to
> that client's screen. In other words, how do i get client input and
> display current messages to the client's screen without having to wait
> for the clients input. NOte: this is a terminal. 
> 
> Telnet does it some kinda way(it works perfect), but i'm trying to get
> my client to work the same way.

The usual way to do this is use separate threads for reading input and
displaying messages.



More information about the Python-list mailing list