摘要:
import psutil def get_disk_info(): content = "" for disk in psutil.disk_partitions(): if 'cdrom' in disk.opts or disk.fstype == '': continue disk_name 阅读全文
摘要:
import socket def get_host_ip(): """ 查询本机ip地址 :return: """ try: s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM) s.connect(('8.8.8.8',80)) ip=s.getso 阅读全文