Copyright (C) 2000-2012 |
GNU Info (python2.1-lib.info)Process ParametersProcess Parameters ------------------ These functions and data items provide information and operate on the current process and user. `environ' 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. 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 Note: Files and Directories). `ctermid()' Return the filename corresponding to the controlling terminal of the process. Availability: UNIX. `getegid()' Return the current process' effective group id. Availability: UNIX. `geteuid()' Return the current process' effective user id. Availability: UNIX. `getgid()' Return the current process' group id. Availability: UNIX. `getgroups()' Return list of supplemental group ids associated with the current process. Availability: UNIX. `getlogin()' Return the actual login name for the current process, even if there are multiple login names which map to the same user id. Availability: UNIX. `getpgrp()' Return the current process group id. Availability: UNIX. `getpid()' Return the current process id. Availability: UNIX, Windows. `getppid()' Return the parent's process id. Availability: UNIX. `getuid()' Return the current process' user id. Availability: UNIX. `getenv(varname[, value])' 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. `putenv(varname, value)' 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. 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'. `setegid(egid)' Set the current process's effective group id. Availability: UNIX. `seteuid(euid)' Set the current process's effective user id. Availability: UNIX. `setgid(gid)' Set the current process' group id. Availability: UNIX. `setpgrp()' 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. `setpgid(pid, pgrp)' Calls the system call `setpgid()'. See the UNIX manual for the semantics. Availability: UNIX. `setreuid(ruid, euid)' Set the current process's real and effective user ids. Availability: UNIX. `setregid(rgid, egid)' Set the current process's real and effective group ids. Availability: UNIX. `setsid()' Calls the system call `setsid()'. See the UNIX manual for the semantics. Availability: UNIX. `setuid(uid)' Set the current process' user id. Availability: UNIX. `strerror(code)' Return the error message corresponding to the error code in CODE. Availability: UNIX, Windows. `umask(mask)' Set the current numeric umask and returns the previous umask. Availability: UNIX, Windows. `uname()' 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. automatically generated by info2www version 1.2.2.9 |