examples: Fix Python coding style

This commit is contained in:
Roland Dobai
2018-12-04 08:32:48 +01:00
parent a36d714d1a
commit 57c54f96f1
36 changed files with 645 additions and 561 deletions

View File

@@ -9,9 +9,9 @@
import socket
import sys
# ----------- Config ----------
# ----------- Config ----------
IP_VERSION = 'IPv4'
PORT = 3333;
PORT = 3333
# -------------------------------
if IP_VERSION == 'IPv4':
@@ -30,7 +30,7 @@ except socket.error as msg:
sys.exit(1)
print('Socket created')
try:
sock.bind(('', PORT))
print('Socket binded')
@@ -45,7 +45,8 @@ except socket.error as msg:
while True:
data = conn.recv(128)
if not data: break
if not data:
break
data = data.decode()
print('Received data: ' + data)
reply = 'OK: ' + data