Tested with script from https://pypi.python.org/pypi/websocket-client:
from websocket import create_connection ws = create_connection("ws://echo.websocket.org/") print "Sending 'Hello, World'..." ws.send("Hello, World") print "Sent" print "Receiving..." result = ws.recv() print "Received '%s'" % result ws.close()
Tested with script from https:/ /pypi.python. org/pypi/ websocket- client:
from websocket import create_connection connection( "ws://echo. websocket. org/")
ws = create_
print "Sending 'Hello, World'..."
ws.send("Hello, World")
print "Sent"
print "Receiving..."
result = ws.recv()
print "Received '%s'" % result
ws.close()