Oct-17-2016, 09:21 PM
This works great in 2.7, does not work in 3.5. I hope some one can tell me why?
Thank you
import socket #for sockets import sys #for exit try: #create an AF_INET, STREAM socket (TCP) s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) except socket.error, msg: print ('Failed to create socket. Error code: ') + str(msg[0]) + ' , Error message : ' + msg[1] sys.exit(); print ('Socket Created')Line 7 is the problem I think
Thank you