Python NameError: name 'name' is not defined [closed]
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I am doing socket programming in python and finding a message. This is my code..... import socket def Main(): host = '127.0.0.1' port = 5000 s = socket.socket() s.bind((host,port)) s.listen(2) c, addr = s.accept() print "Connecton from : " + str(addr) while True: data = c.recv(1024) if not data: break print