os.hostname()


os.hostname()方法以字符串的形式返回操作系统的主机名.

The os.hostname() method returns the hostname of the operating system as a string.