#!/usr/bin/env python
import socket
import sys


def main():
    message = sys.argv[1]
    port = 50000
    address = '127.0.0.1'
    client_socket = socket.socket(
        socket.AF_INET,
        socket.SOCK_STREAM,
        socket.IPPROTO_IP)
    client_socket.connect((address, port))
    client_socket.sendall(message)
    client_socket.shutdown(socket.SHUT_WR)

    return client_socket.recv(1024)

if __name__ == '__main__':
    print main()

@@ -40,16 +40,64 @@
 ort sys%0A
+import echo_server%0Afrom threading import Thread%0A
 %0A%0Adef ma
@@ -471,16 +471,70 @@
 ain__':%0A
+    t = Thread(target=echo_server.main)%0A    t.start()%0A
     prin

Add threading to allow for client and server to be run from a single script