python 2.7 #!/usr/bin/env python # Python Network Programming Cookbook -- Chapter - # This program requires Python 2.7 or any later version import socket from binascii import hexlify def convert_ip4_address(): for ip_addr in ['127.0.0.1', '192.168.0.
代码: import socket host='www.163.com' ip=socket.gethostbyname(host) print('Ip of {} is {}'.format(host,ip)) 输出: C:\Users\horn1\Desktop\python\51-gethostip>python gethostip.py Ip of www.163.com is 219.232.42.124 2018年5月15日
xml: <?xml version='1.1' encoding='utf-8'?><!--this is a test about xml--><databaselist type='oracle'> <database userArea='suzhou'> <ip>10.192.128.88</ip> <name>'xiasam'</name> <pa