A mapping object representing the string environment. For example,
environ['HOME'] is the pathname of your home directory (on some
platforms), and is equivalent to getenv("HOME") in C.
If the platform supports the putenv() function, this
mapping may be used to modify the environment as well as query the
environment. putenv() will be called automatically when
the mapping is modified. Note:
On some platforms, including
FreeBSD and Mac OS X, setting environ may cause memory leaks.
Refer to the system documentation for putenv.
If putenv() is not provided, this mapping may be passed to
the appropriate process-creation functions to cause child processes to
use a modified environment.
chdir(path)
getcwd()
These functions are described in ``Files and Directories'' (section
6.1.4).
Return the effective group id of the current process. This
corresponds to the `set id' bit on the file being executed in the
current process.
Availability: Unix.
Return the value of the environment variable varname if it
exists, or value if it doesn't. value defaults to
None.
Availability: most flavors of Unix, Windows.
Set the environment variable named varname to the string
value. Such changes to the environment affect subprocesses
started with os.system(), popen() or
fork() and execv().
Availability: most flavors of Unix, Windows.
Note:
On some platforms, including FreeBSD and Mac OS X,
setting environ may cause memory leaks.
Refer to the system documentation for putenv.
When putenv() is
supported, assignments to items in os.environ are automatically
translated into corresponding calls to putenv(); however,
calls to putenv() don't update os.environ, so it is
actually preferable to assign to items of os.environ.
Set the list of supplemental group ids associated with the current
process to groups. groups must be a sequence, and each
element must be an integer identifying a group. This operation is
typical available only to the superuser.
Availability: Unix.
New in version 2.2.
Calls the system call setpgrp() or setpgrp(0,
0) depending on which version is implemented (if any). See the
Unix manual for the semantics.
Availability: Unix.
Calls the system call
setpgid() to set the process group id of the process with
id pid to the process group with id pgrp. See the Unix
manual for the semantics.
Availability: Unix.
Return a 5-tuple containing information identifying the current
operating system. The tuple contains 5 strings:
(sysname, nodename, release, version,
machine). Some systems truncate the nodename to 8
characters or to the leading component; a better way to get the
hostname is socket.gethostname()or even
socket.gethostbyaddr(socket.gethostname()).
Availability: recent flavors of Unix.