os Python 中的 os 模块有什么用?
What os does the os module in Python use?
基本上,安装在Unix系统上的os模块会使用Unix命令行,还是标准化acros所有可以使用Python的操作系统?如果是这样,它使用什么类型的 os?
PyMOTW3 关于 os
模块声明
The os module provides a wrapper for platform specific modules such as
posix, nt, and mac. The API for functions available on all platforms
should be the same, so using the os module offers some measure of
portability. Not all functions are available on every platform,
however. Many of the process management functions described in this
summary are not available for Windows.
所以不要指望它能在任何可以使用 Python 的 操作系统上运行,除非您使用不同操作系统通用的子集。
基本上,安装在Unix系统上的os模块会使用Unix命令行,还是标准化acros所有可以使用Python的操作系统?如果是这样,它使用什么类型的 os?
PyMOTW3 关于 os
模块声明
The os module provides a wrapper for platform specific modules such as posix, nt, and mac. The API for functions available on all platforms should be the same, so using the os module offers some measure of portability. Not all functions are available on every platform, however. Many of the process management functions described in this summary are not available for Windows.
所以不要指望它能在任何可以使用 Python 的 操作系统上运行,除非您使用不同操作系统通用的子集。