<s> import sys , ldap , ldap . schema <EOL> schema_attrs = ldap . schema . SCHEMA_ATTRS <EOL> ldap . set_option ( ldap . OPT_DEBUG_LEVEL , <NUM_LIT:0> ) <EOL> ldap . _trace_level = <NUM_LIT:0> <EOL> subschemasubentry_dn , schema = ldap . schema . urlfetch ( sys . argv [ - <NUM_LIT:1> ] ) <EOL> schema_reverse = ldap . schema . SubSchema ( schema . ldap_entry ( ) ) <EOL> if subschemasubentry_dn is None : <EOL> print '<STR_LIT>' <EOL> sys . exit ( <NUM_LIT:1> ) <EOL> print '<STR_LIT>' , repr ( subschemasubentry_dn ) <EOL> for attr_type , schema_class in ldap . schema . SCHEMA_CLASS_MAPPING . items ( ) : <EOL> print '<STR_LIT:*>' * <NUM_LIT:20> , attr_type , '<STR_LIT:*>' * <NUM_LIT:20> <EOL> for element_id in schema . listall ( schema_class ) : <EOL> se_orig = schema . get_obj ( schema_class , element_id ) <EOL> se_reverse = schema_reverse . get_obj ( schema_class , element_id ) <EOL> print attr_type , str ( se_orig ) <EOL> print '<STR_LIT>' <EOL> inetOrgPerson = schema . get_obj ( ldap . schema . ObjectClass , '<STR_LIT>' ) <EOL> if not inetOrgPerson is None : <EOL> print inetOrgPerson . must , inetOrgPerson . may <EOL> print '<STR_LIT>' <EOL> try : <EOL> print schema . attribute_types ( <EOL> [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> ) <EOL> print schema . attribute_types ( <EOL> [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] , <EOL> attr_type_filter = [ <EOL> ( '<STR_LIT>' , [ <NUM_LIT:0> ] ) , <EOL> ( '<STR_LIT>' , range ( <NUM_LIT:2> ) ) , <EOL> ] <EOL> ) <EOL> except KeyError , e : <EOL> print '<STR_LIT>' , str ( e ) <EOL> drink = schema . get_obj ( ldap . schema . AttributeType , '<STR_LIT>' ) <EOL> if not drink is None : <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' , repr ( drink . names ) <EOL> print '<STR_LIT>' , repr ( drink . collective ) <EOL> schema . ldap_entry ( ) <EOL> print str ( schema . get_obj ( ldap . schema . MatchingRule , '<STR_LIT>' ) ) <EOL> print str ( schema . get_obj ( ldap . schema . MatchingRuleUse , '<STR_LIT>' ) ) <EOL> print str ( schema . get_obj ( ldap . schema . AttributeType , '<STR_LIT:name>' ) ) <EOL> print str ( schema . get_inheritedobj ( ldap . schema . AttributeType , '<STR_LIT>' , [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] ) ) </s>
