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() |
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() |
home = /usr/local/bin | |||||
include-system-site-packages = false | |||||
version = 3.7.0 |