Simple websockets implementation in Python