fixed websocket example for python3