<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>35.14. nis — Interface to Sun’s NIS (Yellow Pages) — Python v2.6.6 documentation</title>
<link rel="stylesheet" href="../_static/default.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '2.6.6',
COLLAPSE_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="search" type="application/opensearchdescription+xml"
title="Search within Python v2.6.6 documentation"
href="../_static/opensearch.xml"/>
<link rel="author" title="About these documents" href="../about.html" />
<link rel="copyright" title="Copyright" href="../copyright.html" />
<link rel="top" title="Python v2.6.6 documentation" href="../index.html" />
<link rel="up" title="35. Unix Specific Services" href="unix.html" />
<link rel="next" title="35.15. syslog — Unix syslog library routines" href="syslog.html" />
<link rel="prev" title="35.13. resource — Resource usage information" href="resource.html" />
<link rel="shortcut icon" type="image/png" href="../_static/py.png" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../modindex.html" title="Global Module Index"
accesskey="M">modules</a> |</li>
<li class="right" >
<a href="syslog.html" title="35.15. syslog — Unix syslog library routines"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="resource.html" title="35.13. resource — Resource usage information"
accesskey="P">previous</a> |</li>
<li><img src="../_static/py.png" alt=""
style="vertical-align: middle; margin-top: -1px"/></li>
<li><a href="../index.html">Python v2.6.6 documentation</a> »</li>
<li><a href="index.html" >The Python Standard Library</a> »</li>
<li><a href="unix.html" accesskey="U">35. Unix Specific Services</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="module-nis">
<h1>35.14. <tt class="xref docutils literal"><span class="pre">nis</span></tt> — Interface to Sun’s NIS (Yellow Pages)<a class="headerlink" href="#module-nis" title="Permalink to this headline">¶</a></h1>
<p><em>Platforms: </em>Unix</p>
<p>The <tt class="xref docutils literal"><span class="pre">nis</span></tt> module gives a thin wrapper around the NIS library, useful for
central administration of several hosts.</p>
<p>Because NIS exists only on Unix systems, this module is only available for Unix.</p>
<p>The <tt class="xref docutils literal"><span class="pre">nis</span></tt> module defines the following functions:</p>
<dl class="function">
<dt id="nis.match">
<tt class="descclassname">nis.</tt><tt class="descname">match</tt><big>(</big><em>key</em>, <em>mapname</em><span class="optional">[</span>, <em>domain=default_domain</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#nis.match" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the match for <em>key</em> in map <em>mapname</em>, or raise an error
(<a title="nis.error" class="reference internal" href="#nis.error"><tt class="xref docutils literal"><span class="pre">nis.error</span></tt></a>) if there is none. Both should be strings, <em>key</em> is 8-bit
clean. Return value is an arbitrary array of bytes (may contain <tt class="docutils literal"><span class="pre">NULL</span></tt> and
other joys).</p>
<p>Note that <em>mapname</em> is first checked if it is an alias to another name.</p>
<p class="versionchanged">
<span class="versionmodified">Changed in version 2.5: </span>The <em>domain</em> argument allows to override the NIS domain used for the lookup. If
unspecified, lookup is in the default NIS domain.</p>
</dd></dl>
<dl class="function">
<dt id="nis.cat">
<tt class="descclassname">nis.</tt><tt class="descname">cat</tt><big>(</big><em>mapname</em><span class="optional">[</span>, <em>domain=default_domain</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#nis.cat" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a dictionary mapping <em>key</em> to <em>value</em> such that <tt class="docutils literal"><span class="pre">match(key,</span>
<span class="pre">mapname)==value</span></tt>. Note that both keys and values of the dictionary are
arbitrary arrays of bytes.</p>
<p>Note that <em>mapname</em> is first checked if it is an alias to another name.</p>
<p class="versionchanged">
<span class="versionmodified">Changed in version 2.5: </span>The <em>domain</em> argument allows to override the NIS domain used for the lookup. If
unspecified, lookup is in the default NIS domain.</p>
</dd></dl>
<dl class="function">
<dt id="nis.maps">
<tt class="descclassname">nis.</tt><tt class="descname">maps</tt><big>(</big><span class="optional">[</span><em>domain=default_domain</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#nis.maps" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a list of all valid maps.</p>
<p class="versionchanged">
<span class="versionmodified">Changed in version 2.5: </span>The <em>domain</em> argument allows to override the NIS domain used for the lookup. If
unspecified, lookup is in the default NIS domain.</p>
</dd></dl>
<dl class="function">
<dt id="nis.get_default_domain">
<tt class="descclassname">nis.</tt><tt class="descname">get_default_domain</tt><big>(</big><big>)</big><a class="headerlink" href="#nis.get_default_domain" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the system default NIS domain.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.5.</span></p>
</dd></dl>
<p>The <tt class="xref docutils literal"><span class="pre">nis</span></tt> module defines the following exception:</p>
<dl class="exception">
<dt id="nis.error">
<em class="property">exception </em><tt class="descclassname">nis.</tt><tt class="descname">error</tt><a class="headerlink" href="#nis.error" title="Permalink to this definition">¶</a></dt>
<dd>An error raised when a NIS function returns an error code.</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="resource.html"
title="previous chapter">35.13. <tt class="docutils literal"><span class="pre">resource</span></tt> — Resource usage information</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="syslog.html"
title="next chapter">35.15. <tt class="docutils literal docutils literal"><span class="pre">syslog</span></tt> — Unix syslog library routines</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../bugs.html">Report a Bug</a></li>
<li><a href="../_sources/library/nis.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" size="18" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../modindex.html" title="Global Module Index"
>modules</a> |</li>
<li class="right" >
<a href="syslog.html" title="35.15. syslog — Unix syslog library routines"
>next</a> |</li>
<li class="right" >
<a href="resource.html" title="35.13. resource — Resource usage information"
>previous</a> |</li>
<li><img src="../_static/py.png" alt=""
style="vertical-align: middle; margin-top: -1px"/></li>
<li><a href="../index.html">Python v2.6.6 documentation</a> »</li>
<li><a href="index.html" >The Python Standard Library</a> »</li>
<li><a href="unix.html" >35. Unix Specific Services</a> »</li>
</ul>
</div>
<div class="footer">
© <a href="../copyright.html">Copyright</a> 1990-2011, Python Software Foundation.
<br />
The Python Software Foundation is a non-profit corporation.
<a href="http://www.python.org/psf/donations/">Please donate.</a>
<br />
Last updated on Jul 20, 2011.
<a href="../bugs.html">Found a bug</a>?
<br />
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.6.
</div>
</body>
</html>
Copyright 2K16 - 2K18 Indonesian Hacker Rulez