In the page http://pypi.python.org/pypi/websocket-client/0.4 the first snippet (the "Low Level API example") is very much like the client example in http://docs.python.org/library/socket.html#example.
What I'm interested in is if is there any possibility of making a TCP client that is even driven, like the "JavaScript websocket-like API example" on that first webpage, that executes actions when for an example a message arrives. How can I achieve this ? I found this example that uses twisted. Any other (better ?) ways to do it ?