Home | History | Annotate | Download | only in library
      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 
      9 .. moduleauthor:: Fred Gansevles <Fred.Gansevles (a] cs.utwente.nl>
     10 .. sectionauthor:: Moshe Zadka <moshez (a] zadka.site.co.il>
     11 
     12 --------------
     13 
     14 The :mod:`nis` module gives a thin wrapper around the NIS library, useful for
     15 central administration of several hosts.
     16 
     17 Because NIS exists only on Unix systems, this module is only available for Unix.
     18 
     19 The :mod:`nis` module defines the following functions:
     20 
     21 
     22 .. function:: match(key, mapname, domain=default_domain)
     23 
     24    Return the match for *key* in map *mapname*, or raise an error
     25    (:exc:`nis.error`) if there is none. Both should be strings, *key* is 8-bit
     26    clean. Return value is an arbitrary array of bytes (may contain ``NULL`` and
     27    other joys).
     28 
     29    Note that *mapname* is first checked if it is an alias to another name.
     30 
     31    The *domain* argument allows overriding the NIS domain used for the lookup. If
     32    unspecified, lookup is in the default NIS domain.
     33 
     34 
     35 .. function:: cat(mapname, domain=default_domain)
     36 
     37    Return a dictionary mapping *key* to *value* such that ``match(key,
     38    mapname)==value``. Note that both keys and values of the dictionary are
     39    arbitrary arrays of bytes.
     40 
     41    Note that *mapname* is first checked if it is an alias to another name.
     42 
     43    The *domain* argument allows overriding 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    The *domain* argument allows overriding the NIS domain used for the lookup. If
     52    unspecified, lookup is in the default NIS domain.
     53 
     54 
     55 .. function:: get_default_domain()
     56 
     57    Return the system default NIS domain.
     58 
     59 
     60 The :mod:`nis` module defines the following exception:
     61 
     62 .. exception:: error
     63 
     64    An error raised when a NIS function returns an error code.
     65 
     66