TCP echo client server implementation in Python