This commit is contained in:
Tu Quyen Tran Ngoc 2019-10-15 14:46:35 +02:00
commit 6f52a291bb
4 changed files with 31 additions and 0 deletions

13
clie_file.py Normal file
View File

@ -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
my_first_python.py Normal file
View File

15
serv_file.py Normal file
View File

@ -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()

3
venv/pyvenv.cfg Normal file
View File

@ -0,0 +1,3 @@
home = /usr/local/bin
include-system-site-packages = false
version = 3.7.0