Back to index

python3.2  3.2.2
Public Member Functions
pwd.Passwd 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 121 of file pwd.py.


Constructor & Destructor Documentation

def pwd.Passwd.__init__ (   self,
  name,
  passwd,
  uid,
  gid,
  gecos,
  dir,
  shell 
)

Definition at line 122 of file pwd.py.

00122 
00123     def __init__(self, name, passwd, uid, gid, gecos, dir, shell):
00124         self.__dict__['pw_name'] = name
00125         self.__dict__['pw_passwd'] = passwd
00126         self.__dict__['pw_uid'] = uid
00127         self.__dict__['pw_gid'] = gid
00128         self.__dict__['pw_gecos'] = gecos
00129         self.__dict__['pw_dir'] = dir
00130         self.__dict__['pw_shell'] = shell
00131         self.__dict__['_record'] = (self.pw_name, self.pw_passwd,
00132                                     self.pw_uid, self.pw_gid,
00133                                     self.pw_gecos, self.pw_dir,
00134                                     self.pw_shell)

Here is the caller graph for this function:


Member Function Documentation

def pwd.Passwd.__cmp__ (   self,
  other 
)

Definition at line 147 of file pwd.py.

00147 
00148     def __cmp__(self, other):
00149         this = str(self._record)
00150         if this == other:
00151             return 0
00152         elif this < other:
00153             return -1
00154         else:
00155             return 1
00156 
00157 
00158 # read the whole file, parsing each entry into tuple form
# with dictionaries to speed recall by UID or passwd name

Here is the caller graph for this function:

def pwd.Passwd.__getitem__ (   self,
  key 
)

Definition at line 138 of file pwd.py.

00138 
00139     def __getitem__(self, key):
00140         return self._record[key]

def pwd.Passwd.__len__ (   self)

Definition at line 135 of file pwd.py.

00135 
00136     def __len__(self):
00137         return 7

def pwd.Passwd.__repr__ (   self)

Definition at line 144 of file pwd.py.

00144 
00145     def __repr__(self):
00146         return str(self._record)

def pwd.Passwd.__setattr__ (   self,
  name,
  value 
)

Definition at line 141 of file pwd.py.

00141 
00142     def __setattr__(self, name, value):
00143         raise AttributeError('attribute read-only: %s' % name)


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