PageRenderTime 22ms CodeModel.GetById 14ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/Doc/library/nis.rst

http://unladen-swallow.googlecode.com/
ReStructuredText | 68 lines | 39 code | 29 blank | 0 comment | 0 complexity | 20ed01bc83b841f9c259274891f035d3 MD5 | raw file
 1
 2:mod:`nis` --- Interface to Sun's NIS (Yellow Pages)
 3====================================================
 4
 5.. module:: nis
 6   :platform: Unix
 7   :synopsis: Interface to Sun's NIS (Yellow Pages) library.
 8.. moduleauthor:: Fred Gansevles <Fred.Gansevles@cs.utwente.nl>
 9.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
10
11
12The :mod:`nis` module gives a thin wrapper around the NIS library, useful for
13central administration of several hosts.
14
15Because NIS exists only on Unix systems, this module is only available for Unix.
16
17The :mod:`nis` module defines the following functions:
18
19
20.. function:: match(key, mapname[, domain=default_domain])
21
22   Return the match for *key* in map *mapname*, or raise an error
23   (:exc:`nis.error`) if there is none. Both should be strings, *key* is 8-bit
24   clean. Return value is an arbitrary array of bytes (may contain ``NULL`` and
25   other joys).
26
27   Note that *mapname* is first checked if it is an alias to another name.
28
29   .. versionchanged:: 2.5
30      The *domain* argument allows to override the NIS domain used for the lookup. If
31      unspecified, lookup is in the default NIS domain.
32
33
34.. function:: cat(mapname[, domain=default_domain])
35
36   Return a dictionary mapping *key* to *value* such that ``match(key,
37   mapname)==value``. Note that both keys and values of the dictionary are
38   arbitrary arrays of bytes.
39
40   Note that *mapname* is first checked if it is an alias to another name.
41
42   .. versionchanged:: 2.5
43      The *domain* argument allows to override the NIS domain used for the lookup. If
44      unspecified, lookup is in the default NIS domain.
45
46
47.. function:: maps([domain=default_domain])
48
49   Return a list of all valid maps.
50
51   .. versionchanged:: 2.5
52      The *domain* argument allows to override the NIS domain used for the lookup. If
53      unspecified, lookup is in the default NIS domain.
54
55
56.. function:: get_default_domain()
57
58   Return the system default NIS domain.
59
60   .. versionadded:: 2.5
61
62The :mod:`nis` module defines the following exception:
63
64
65.. exception:: error
66
67   An error raised when a NIS function returns an error code.
68