posix
This module provides access to operating system functionality that is
standardized by the C Standard and the POSIX standard (a thinly disguised
interface).
Do not import this module directly. Instead, import the
module os, which provides a portable version of this
interface. On , the os module provides a superset of
the posix interface. On non- operating systems the
posix module is not available, but a subset is always available
through the os interface. Once os is imported, there is
no performance penalty in using it instead of
posix.
os
The descriptions below are very terse; refer to the
corresponding manual entry for more information. Arguments
called path refer to a pathname given as a string.
Errors are reported as exceptions; the usual exceptions are given
for type errors, while errors reported by the system calls raise
posix.error, described below.
Module posix defines the following data items:
environ
A dictionary representing the string environment at the time
the interpreter was started.
For example,
posix.environ['HOME']
is the pathname of your home directory, equivalent to
getenv("HOME")
in C.
Modifying this dictionary does not affect the string environment
passed on by execv(), popen() or system(); if you
need to change the environment, pass environ to execve()
or add variable assignments and export statements to the command
string for system() or popen().