jetzt kommt die fehlermeldung invalid syntax eine stelle der ip wird als fehlerhaft befunden
ich nutze python 3.3.2
Code: Alles auswählen
import socket
import subprocess
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((xxx.xxx.xxx.xxx, 50000))
try:
while True:
nachricht = "Verbunden"
s.send(nachricht)
antwort = s.recv(1024)
if antwort == shutdown
subprocess.call(["shutdown.exe", "-f", "-s", "-t", "30"])
finally:
s.close()
mfg fanto