| Python Library Reference |
Availability:Unix.
This module provides access to operating system functionality that isstandardized by the C Standard and the POSIX standard (a thinlydisguised Unix interface).
Do not import this module directly. Instead, import themoduleos, which provides aportable version of thisinterface. On Unix, theos module provides a superset oftheposix interface. On non-Unix operating systems theposix module is not available, but a subset is alwaysavailable through theos interface. Onceos isimported, there isno performance penalty in using it insteadofposix. In addition,os provides some additional functionality, such as automatically callingputenv() when an entry inos.environ is changed.
The descriptions below are very terse; refer to the correspondingUnix manual (or POSIX documentation) entry for more information.Arguments calledpath refer to a pathname given as a string.
Errors are reported as exceptions; the usual exceptions are given fortype errors, while errors reported by the system calls raiseerror (a synonym for the standard exceptionOSError), described below.
| Python Library Reference |