# Pastebin aNVtD5AT try: s.connect((HOST,PORT)) except TypeError: s.connect((socket.gethostbyname(HOST),PORT))