跳转到主要内容

Python接口到POSIX getent命令族

项目描述

Python接口到POSIX getent命令族(getpwent, getgrent, getnetent等)

使用方法

以下是一些示例。

加载接口

>>> import getent

执行passwd查找

>>> print dict(getent.passwd('root'))
{'dir': '/root',
 'gecos': 'root',
 'gid': 0,
 'name': 'root',
 'password': 'x',
 'shell': '/bin/bash',
 'uid': 0}

执行group查找

>>> print dict(getent.group('root'))
{'gid': 0, 'members': [], 'name': 'root', 'password': 'x'}

错误

请使用GitHub的错误跟踪器报告错误或功能请求。

作者

项目详情


下载文件

下载适合您平台的文件。如果您不确定要选择哪个,请了解更多关于安装包的信息。

源代码发行版

getent-0.2.tar.gz (10.2 kB 查看哈希值)

上传时间: 源代码

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面