os.type()


返回 uname(3) 返回的操作系统名称。 例如,它在 Linux 上返回 'Linux',在 macOS 上返回 'Darwin',在 Windows 上返回 'Windows_NT'

有关在各种操作系统上运行 uname(3) 的输出的其他信息,请参阅 https://en.wikipedia.org/wiki/Uname#Examples

Returns the operating system name as returned by uname(3). For example, it returns 'Linux' on Linux, 'Darwin' on macOS, and 'Windows_NT' on Windows.

See https://en.wikipedia.org/wiki/Uname#Examples for additional information about the output of running uname(3) on various operating systems.