~ubuntu-branches/ubuntu/maverick/python3.1/maverick

« back to all changes in this revision

Viewing changes to Doc/library/nis.rst

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-03-23 00:01:27 UTC
  • Revision ID: james.westby@ubuntu.com-20090323000127-5fstfxju4ufrhthq
Tags: upstream-3.1~a1+20090322
ImportĀ upstreamĀ versionĀ 3.1~a1+20090322

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
12
The :mod:`nis` module gives a thin wrapper around the NIS library, useful for
 
13
central administration of several hosts.
 
14
 
 
15
Because NIS exists only on Unix systems, this module is only available for Unix.
 
16
 
 
17
The :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
   The *domain* argument allows to override the NIS domain used for the lookup. If
 
30
   unspecified, lookup is in the default NIS domain.
 
31
 
 
32
 
 
33
.. function:: cat(mapname[, domain=default_domain])
 
34
 
 
35
   Return a dictionary mapping *key* to *value* such that ``match(key,
 
36
   mapname)==value``. Note that both keys and values of the dictionary are
 
37
   arbitrary arrays of bytes.
 
38
 
 
39
   Note that *mapname* is first checked if it is an alias to another name.
 
40
 
 
41
   The *domain* argument allows to override the NIS domain used for the lookup. If
 
42
   unspecified, lookup is in the default NIS domain.
 
43
 
 
44
 
 
45
.. function:: maps([domain=default_domain])
 
46
 
 
47
   Return a list of all valid maps.
 
48
 
 
49
   The *domain* argument allows to override the NIS domain used for the lookup. If
 
50
   unspecified, lookup is in the default NIS domain.
 
51
 
 
52
 
 
53
.. function:: get_default_domain()
 
54
 
 
55
   Return the system default NIS domain.
 
56
 
 
57
 
 
58
The :mod:`nis` module defines the following exception:
 
59
 
 
60
.. exception:: error
 
61
 
 
62
   An error raised when a NIS function returns an error code.
 
63