Back to index

python3.2  3.2.2
Public Member Functions
grp.Group Class Reference

List of all members.

Public Member Functions

def __init__
def __len__
def __getitem__
def __setattr__
def __repr__
def __cmp__

Detailed Description

Definition at line 102 of file grp.py.


Constructor & Destructor Documentation

def grp.Group.__init__ (   self,
  name,
  passwd,
  gid,
  mem 
)

Definition at line 103 of file grp.py.

00103 
00104     def __init__(self, name, passwd, gid, mem):
00105         self.__dict__['gr_name'] = name
00106         self.__dict__['gr_passwd'] = passwd
00107         self.__dict__['gr_gid'] = gid
00108         self.__dict__['gr_mem'] = mem
00109         self.__dict__['_record'] = (self.gr_name, self.gr_passwd,
00110                                     self.gr_gid, self.gr_mem)

Here is the caller graph for this function:


Member Function Documentation

def grp.Group.__cmp__ (   self,
  other 
)

Definition at line 123 of file grp.py.

00123 
00124     def __cmp__(self, other):
00125         this = str(self._record)
00126         if this == other:
00127             return 0
00128         elif this < other:
00129             return -1
00130         else:
00131             return 1
00132 
00133 
00134 # read the whole file, parsing each entry into tuple form
# with dictionaries to speed recall by GID or group name

Here is the caller graph for this function:

def grp.Group.__getitem__ (   self,
  key 
)

Definition at line 114 of file grp.py.

00114 
00115     def __getitem__(self, key):
00116         return self._record[key]

def grp.Group.__len__ (   self)

Definition at line 111 of file grp.py.

00111 
00112     def __len__(self):
00113         return 4

def grp.Group.__repr__ (   self)

Definition at line 120 of file grp.py.

00120 
00121     def __repr__(self):
00122         return str(self._record)

def grp.Group.__setattr__ (   self,
  name,
  value 
)

Definition at line 117 of file grp.py.

00117 
00118     def __setattr__(self, name, value):
00119         raise AttributeError('attribute read-only: %s' % name)


The documentation for this class was generated from the following file: