Guido van Rossum | f643e3f | 1997-04-02 06:06:03 +0000 | [diff] [blame] | 1 | \chapter{Unix Specific Services} |
Fred Drake | 710c035 | 1998-02-18 15:47:17 +0000 | [diff] [blame] | 2 | \label{unix} |
Guido van Rossum | 5fdeeea | 1994-01-02 01:22:07 +0000 | [diff] [blame] | 3 | |
| 4 | The modules described in this chapter provide interfaces to features |
Guido van Rossum | 6bb1adc | 1995-03-13 10:03:32 +0000 | [diff] [blame] | 5 | that are unique to the \UNIX{} operating system, or in some cases to |
Guido van Rossum | ecde781 | 1995-03-28 13:35:14 +0000 | [diff] [blame] | 6 | some or many variants of it. Here's an overview: |
| 7 | |
| 8 | \begin{description} |
| 9 | |
| 10 | \item[posix] |
Fred Drake | 710c035 | 1998-02-18 15:47:17 +0000 | [diff] [blame] | 11 | --- The most common \POSIX{} system calls (normally used via module |
| 12 | \module{os}). |
Guido van Rossum | ecde781 | 1995-03-28 13:35:14 +0000 | [diff] [blame] | 13 | |
| 14 | \item[posixpath] |
Fred Drake | 65b32f7 | 1998-02-09 20:27:12 +0000 | [diff] [blame] | 15 | --- Common \POSIX{} pathname manipulations (normally used via \code{os.path}). |
Guido van Rossum | ecde781 | 1995-03-28 13:35:14 +0000 | [diff] [blame] | 16 | |
| 17 | \item[pwd] |
Fred Drake | 710c035 | 1998-02-18 15:47:17 +0000 | [diff] [blame] | 18 | --- The password database (\function{getpwnam()} and friends). |
Guido van Rossum | ecde781 | 1995-03-28 13:35:14 +0000 | [diff] [blame] | 19 | |
| 20 | \item[grp] |
Fred Drake | 710c035 | 1998-02-18 15:47:17 +0000 | [diff] [blame] | 21 | --- The group database (\function{getgrnam()} and friends). |
Guido van Rossum | ecde781 | 1995-03-28 13:35:14 +0000 | [diff] [blame] | 22 | |
Guido van Rossum | 5c6e373 | 1996-04-10 16:18:20 +0000 | [diff] [blame] | 23 | \item[crypt] |
Fred Drake | 710c035 | 1998-02-18 15:47:17 +0000 | [diff] [blame] | 24 | --- The \cfunction{crypt()} function used to check \UNIX{} passwords. |
Guido van Rossum | 5c6e373 | 1996-04-10 16:18:20 +0000 | [diff] [blame] | 25 | |
Guido van Rossum | ecde781 | 1995-03-28 13:35:14 +0000 | [diff] [blame] | 26 | \item[dbm] |
| 27 | --- The standard ``database'' interface, based on \code{ndbm}. |
| 28 | |
| 29 | \item[gdbm] |
| 30 | --- GNU's reinterpretation of dbm. |
| 31 | |
| 32 | \item[termios] |
Fred Drake | 65b32f7 | 1998-02-09 20:27:12 +0000 | [diff] [blame] | 33 | --- \POSIX{} style tty control. |
Guido van Rossum | ecde781 | 1995-03-28 13:35:14 +0000 | [diff] [blame] | 34 | |
Fred Drake | 4b3f031 | 1996-12-13 22:04:31 +0000 | [diff] [blame] | 35 | \item[TERMIOS] |
Fred Drake | 710c035 | 1998-02-18 15:47:17 +0000 | [diff] [blame] | 36 | --- The symbolic constants required to use the \module{termios} module. |
Fred Drake | 4b3f031 | 1996-12-13 22:04:31 +0000 | [diff] [blame] | 37 | |
Guido van Rossum | ecde781 | 1995-03-28 13:35:14 +0000 | [diff] [blame] | 38 | \item[fcntl] |
Fred Drake | 710c035 | 1998-02-18 15:47:17 +0000 | [diff] [blame] | 39 | --- The \function{fcntl()} and \function{ioctl()} system calls. |
Guido van Rossum | ecde781 | 1995-03-28 13:35:14 +0000 | [diff] [blame] | 40 | |
| 41 | \item[posixfile] |
| 42 | --- A file-like object with support for locking. |
| 43 | |
Fred Drake | ae0cd0b | 1996-12-19 12:20:54 +0000 | [diff] [blame] | 44 | \item[resource] |
| 45 | --- An interface to provide resource usage information on the current |
| 46 | process. |
| 47 | |
Fred Drake | 4b3f031 | 1996-12-13 22:04:31 +0000 | [diff] [blame] | 48 | \item[syslog] |
Fred Drake | 63a0c37 | 1996-12-16 22:12:33 +0000 | [diff] [blame] | 49 | --- An interface to the \UNIX{} \code{syslog} library routines. |
Fred Drake | 4b3f031 | 1996-12-13 22:04:31 +0000 | [diff] [blame] | 50 | |
Guido van Rossum | f6a7b44 | 1998-02-11 22:58:55 +0000 | [diff] [blame] | 51 | \item[stat] |
| 52 | --- Constants and functions for interpreting the results of |
Fred Drake | 710c035 | 1998-02-18 15:47:17 +0000 | [diff] [blame] | 53 | \function{os.stat()}, \function{os.lstat()} and \function{os.fstat()}. |
Guido van Rossum | f6a7b44 | 1998-02-11 22:58:55 +0000 | [diff] [blame] | 54 | |
| 55 | \item[commands] |
Fred Drake | 710c035 | 1998-02-18 15:47:17 +0000 | [diff] [blame] | 56 | --- Wrapper functions for \function{os.popen()}. |
Guido van Rossum | f6a7b44 | 1998-02-11 22:58:55 +0000 | [diff] [blame] | 57 | |
Guido van Rossum | ecde781 | 1995-03-28 13:35:14 +0000 | [diff] [blame] | 58 | \end{description} |