[Sofaswitch-svn] [commit] r420 - sofaswitch/trunk/server
Author: derek Date: Thu Jun 12 23:12:30 2008 New Revision: 420 Modified: sofaswitch/trunk/server/client.py Log: tidy up the command line handler to do things like up-arrow correctly, and to have a prompt symbol. Modified: sofaswitch/trunk/server/client.py ============================================================================== --- sofaswitch/trunk/server/client.py (original) +++ sofaswitch/trunk/server/client.py Thu Jun 12 23:12:30 2008 @@ -6,7 +6,7 @@ # See the description in server.py on how you use this program. # -import socket, os, sys, thread +import readline, socket, os, sys, thread if len(sys.argv) < 3: print "Syntax: client.py myId destination_host" @@ -35,7 +35,7 @@ thread.start_new(report_incoming,()) while True: - value = sys.stdin.readline() + value = raw_input("> ") value = value.strip() if value == 'end': sys.exit()
participants (1)
-
SofaSWITCH SVN