well, it's just a crude port of the java adamac web socket client currently, it does not support the wss scheme (..I am just plain ignorant in python) and is blocking. But at least works :) ..feel free to modify/reuse the code as you wish, but if you improve it just throw me a push request!
The websocket3.py file contains the client code to be used for python3 (since they changed some stuff related to strings and unicode)