摘要: import socketimport structimport fcntldef get_ip(iface='eth0'): """ Use Linux SIOCGIFADDR ioctl to get the IP for the interface. ref http://code.activ 阅读全文