用AI赚第一桶💰低成本搭建一套AI赚钱工具,源码可二开。 广告
### 导航 - [索引](../genindex.xhtml "总目录") - [模块](../py-modindex.xhtml "Python 模块索引") | - [下一页](syslog.xhtml "Unix syslog 库例程") | - [上一页](resource.xhtml "resource --- Resource usage information") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) » - zh\_CN 3.7.3 [文档](../index.xhtml) » - [Python 标准库](index.xhtml) » - [Unix 专有服务](unix.xhtml) » - $('.inline-search').show(0); | # [`nis`](#module-nis "nis: Interface to Sun's NIS (Yellow Pages) library. (Unix)") --- Interface to Sun's NIS (Yellow Pages) - - - - - - The [`nis`](#module-nis "nis: Interface to Sun's NIS (Yellow Pages) library. (Unix)") module gives a thin wrapper around the NIS library, useful for central administration of several hosts. Because NIS exists only on Unix systems, this module is only available for Unix. The [`nis`](#module-nis "nis: Interface to Sun's NIS (Yellow Pages) library. (Unix)") module defines the following functions: `nis.``match`(*key*, *mapname*, *domain=default\_domain*)Return the match for *key* in map *mapname*, or raise an error ([`nis.error`](#nis.error "nis.error")) if there is none. Both should be strings, *key* is 8-bit clean. Return value is an arbitrary array of bytes (may contain `NULL` and other joys). Note that *mapname* is first checked if it is an alias to another name. The *domain* argument allows overriding the NIS domain used for the lookup. If unspecified, lookup is in the default NIS domain. `nis.``cat`(*mapname*, *domain=default\_domain*)Return a dictionary mapping *key* to *value* such that ``` match(key, mapname)==value ``` . Note that both keys and values of the dictionary are arbitrary arrays of bytes. Note that *mapname* is first checked if it is an alias to another name. The *domain* argument allows overriding the NIS domain used for the lookup. If unspecified, lookup is in the default NIS domain. `nis.``maps`(*domain=default\_domain*)Return a list of all valid maps. The *domain* argument allows overriding the NIS domain used for the lookup. If unspecified, lookup is in the default NIS domain. `nis.``get_default_domain`()Return the system default NIS domain. The [`nis`](#module-nis "nis: Interface to Sun's NIS (Yellow Pages) library. (Unix)") module defines the following exception: *exception* `nis.``error`An error raised when a NIS function returns an error code. ### 导航 - [索引](../genindex.xhtml "总目录") - [模块](../py-modindex.xhtml "Python 模块索引") | - [下一页](syslog.xhtml "Unix syslog 库例程") | - [上一页](resource.xhtml "resource --- Resource usage information") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) » - zh\_CN 3.7.3 [文档](../index.xhtml) » - [Python 标准库](index.xhtml) » - [Unix 专有服务](unix.xhtml) » - $('.inline-search').show(0); | © [版权所有](../copyright.xhtml) 2001-2019, Python Software Foundation. Python 软件基金会是一个非盈利组织。 [请捐助。](https://www.python.org/psf/donations/) 最后更新于 5月 21, 2019. [发现了问题](../bugs.xhtml)? 使用[Sphinx](http://sphinx.pocoo.org/)1.8.4 创建。