import socket
s = socket.socket()
host = socket.gethostname()
port = 61233
s.bind((host, port))
s.listen()

(connection, addr) = s.accept()
print("Verbindung von ", addr)
while True:
    data = connection.recv(1024).decode()
    #print("Data = %s" % (data))
    #data = "hi"
    connection.send(data.upper().encode())
connection.close()