while 1: try: reply = channel.recv ( 100 ) print print user," ---> ",reply print else: channel.send( raw_input("SERVER ---> "))