def DumpSchema():
 path = ('LDAP://%srootDSE' % server)
 rootdse = ADsGetObject(path)
 name = rootdse.Get('schemaNamingContext')
 path = (('LDAP://' + server) + name)
 print 'Binding to', path
 ob = ADsGetObject(path)
 nclasses = nattr = nsub = nunk = 0
 for child in ob:
  class_name = child.Class
  if (class_name == 'classSchema'):
   _DumpClass(child)
   nclasses = (nclasses + 1)
  elif (class_name == 'attributeSchema'):
   _DumpAttribute(child)
   nattr = (nattr + 1)
  elif (class_name == 'subSchema'):
   nsub = (nsub + 1)
  else:
   print 'Unknown class:', class_name
   nunk = (nunk + 1)
 if verbose_level:
  print 'Processed', nclasses, 'classes'
  print 'Processed', nattr, 'attributes'
  print 'Processed', nsub, "sub-schema's"
  print 'Processed', nunk, 'unknown types'

def DumpSchema ( ) : path = ( 'LDAP://%srootDSE' % server ) rootdse = ADsGetObject ( path ) name = rootdse . Get ( 'schemaNamingContext' ) path = ( ( 'LDAP://' + server ) + name ) print 'Binding to' , path ob = ADsGetObject ( path ) nclasses = nattr = nsub = nunk = 0 for child in ob : class_name = child . Class if ( class_name == 'classSchema' ) : _DumpClass ( child ) nclasses = ( nclasses + 1 ) elif ( class_name == 'attributeSchema' ) : _DumpAttribute ( child ) nattr = ( nattr + 1 ) elif ( class_name == 'subSchema' ) : nsub = ( nsub + 1 ) else : print 'Unknown class:' , class_name nunk = ( nunk + 1 ) if verbose_level : print 'Processed' , nclasses , 'classes' print 'Processed' , nattr , 'attributes' print 'Processed' , nsub , "sub-schema's" print 'Processed' , nunk , 'unknown types'
dumps the default dse schema .