skip to navigation
skip to content

Not Logged In

getent 0.1

Python interface to the POSIX getent family of commands

Latest Version: 0.2

Python interface to the POSIX getent family of commands (getpwent, getgrent, getnetent, etc.)

Usage

Here a few examples.

Load the interface:

>>> import getent

Doing a passwd lookup:

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

Doing a group lookup:

>>> print dict(getent.group('root'))
{'gid': 0, 'members': [], 'name': 'root', 'password': 'x'}
 
File Type Py Version Uploaded on Size
getent-0.1.tar.gz (md5) Source 2011-12-09 4KB
  • Downloads (All Versions):
  • 12 downloads in the last day
  • 52 downloads in the last week
  • 316 downloads in the last month
  • Author: Wijnand Modderman-Lenstra
  • Keywords: getent group passwd shadow network alias host
  • License: MIT
  • Package Index Owner: tehmaze
  • DOAP record: getent-0.1.xml