Python 获取计算机全名(fully qualified host name) import socket socket.getfqdn() socket.gethostname() 转载于:https://www.cnblogs.com/ibingshan/p/10220443.html