TCP server and client written in Python