@@ -0,0 +1,13 @@ | |||
import socket | |||
eingabe = input("Bitte etwas eingeben: ") | |||
s = socket.socket() | |||
host = socket.gethostname() | |||
port = 12345 | |||
s.connect((host, port)) | |||
s.send(eingabe.encode('utf-8')) | |||
s.close() |
@@ -0,0 +1,15 @@ | |||
import socket | |||
s = socket.socket() | |||
host = socket.gethostname() | |||
port = 12345 | |||
s.bind((host, port)) | |||
s.listen() | |||
while True: | |||
(connection, addr) = s.accept() | |||
bytes = s.recv(1024) | |||
print(bytes.decode('utf-8')) | |||
connection.close() |
@@ -0,0 +1,3 @@ | |||
home = /usr/local/bin | |||
include-system-site-packages = false | |||
version = 3.7.0 |