Python获取主机名

import socket
print socket.gethostname()

 

posted @ 2018-01-02 20:15  413Xiaol  阅读(3455)  评论(0)    收藏  举报