home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / MacHacksBug / Python 1.5.2c1 / Lib / test / test_grp.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2000-06-23  |  729 b   |  28 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 1.5)
  3.  
  4. '''Test script for the grp module
  5.    Roger E. Masse
  6. '''
  7. import grp
  8. verbose
  9. if verbose:
  10.     print 'Groups:'
  11.     for group in groups:
  12.         print group
  13.     
  14.  
  15. if not groups:
  16.     if verbose:
  17.         print 'Empty Group Database -- no further tests of grp module possible'
  18.     
  19. else:
  20.     group = grp.getgrgid(groups[0][2])
  21.     if verbose:
  22.         print 'Group Entry for GID %d: %s' % (groups[0][2], group)
  23.     
  24.     group = grp.getgrnam(groups[0][0])
  25.     if verbose:
  26.         print 'Group Entry for group %s: %s' % (groups[0][0], group)
  27.     
  28.