#!/usr/bin/python3 import socket import traceback try: print(socket.gethostbyname('rrtest.zoo.lo')) client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) client_socket.settimeout(3) client_socket.connect(('rrtest.zoo.lo', 5000)) except socket.error as e: print('Cannot connect', e)