Oct-21-2016, 04:37 PM
here is the code, some of it have been converted, so like it is not it will not run on ether one.
What way is the best to convert the code?

I try to edit this but could find a way.
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 as msg: print('Failed to create socket. Error code: {}'.format(str(msg))) sys.exit() print ('Socket Created') host = 'www.google.com' port = 80 try: remote_ip = socket.gethostbyname( host ) except socket.gaierror: #could not resolve print ('Hostname could not be resolved. Exiting') sys.exit() print ('Ip address of ') + host + ' is ' + remote_ip #Connect to remote server s.connect((remote_ip , port)) print ('Socket Connected to ') + host + ' on ip ' + remote_ipI think this part is the problem:
print ('Ip address of ') + host + ' is ' + remote_ip #Connect to remote server s.connect((remote_ip , port)) print ('Socket Connected to ') + host + ' on ip ' + remote_ipI been looking for a place that show the 2.7 commands = the 3.5, I have not found any thing like that yet.
What way is the best to convert the code?

I try to edit this but could find a way.