On Tue, 2 Dec 2008 21:38:18 +0800, lei ren <[EMAIL PROTECTED]> wrote:
hello ,everybody:
  i am a new to use the twisted. i woul'd like to complete a WEBGAME with
it.but i have a problem for the twisted
i have complete the server ,and the simple client.but ,i want to the client
have more function. one is let the usr input some command to the server
but when i write the code ,i found it's hard ,if i want to get the user's
input with raw_input() in a while loop,but it will block to wait the user'
input
what can i do for this .use thread? of twisted have some more power feature
for the problem,,thank you every body

ps:the problem like a MUD game ,user can send the command to the server and
reveive the message from server .and the user can send command everytime


The way to read from stdin without blocking the reactor is to use
twisted.internet.stdio.StandardIO, a transport which lets a protocol
interact with standard in and standard out.

Jean-Paul

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to