os.type()


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

【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.】

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