grp
index
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/grp.so
Module Docs

Access to the Unix group database.
 
Group entries are reported as 4-tuples containing the following fields
from the group database, in order:
 
  gr_name   - name of the group
  gr_passwd - group password (encrypted); often empty
  gr_gid    - numeric ID of the group
  gr_mem    - list of members
 
The gid is an integer, name and password are strings.  (Note that most
users are not explicitly listed as members of the groups they are in
according to the password database.  Check both databases to get
complete membership information.)

 
Classes
       
__builtin__.object
struct_group

 
class struct_group(__builtin__.object)
    grp.struct_group: Results from getgr*() routines.
 
This object may be accessed either as a tuple of
  (gr_name,gr_passwd,gr_gid,gr_mem)
or via the object attributes as named in the above tuple.
 
  Methods defined here:
__add__(...)
x.__add__(y) <==> x+y
__contains__(...)
x.__contains__(y) <==> y in x
__eq__(...)
x.__eq__(y) <==> x==y
__ge__(...)
x.__ge__(y) <==> x>=y
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__gt__(...)
x.__gt__(y) <==> x>y
__hash__(...)
x.__hash__() <==> hash(x)
__le__(...)
x.__le__(y) <==> x<=y
__len__(...)
x.__len__() <==> len(x)
__lt__(...)
x.__lt__(y) <==> x<y
__mul__(...)
x.__mul__(n) <==> x*n
__ne__(...)
x.__ne__(y) <==> x!=y
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__rmul__(...)
x.__rmul__(n) <==> n*x

Data descriptors defined here:
gr_gid
group id
gr_mem
group members
gr_name
group name
gr_passwd
password

Data and other attributes defined here:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
n_fields = 4
n_sequence_fields = 4
n_unnamed_fields = 0

 
Functions
       
getgrall(...)
getgrall() -> list of tuples
Return a list of all available group entries, in arbitrary order.
An entry whose name starts with '+' or '-' represents an instruction
to use YP/NIS and may not be accessible via getgrnam or getgrgid.
getgrgid(...)
getgrgid(id) -> (gr_name,gr_passwd,gr_gid,gr_mem)
Return the group database entry for the given numeric group ID.  If
id is not valid, raise KeyError.
getgrnam(...)
getgrnam(name) -> (gr_name,gr_passwd,gr_gid,gr_mem)
Return the group database entry for the given group name.  If
name is not valid, raise KeyError.