def load_maps(dirspec):
 mapd = {}
 if (dirspec not in sys.path):
  sys.path.insert(0, dirspec)
 for fil in os.listdir(dirspec):
  if fil.endswith('.py'):
   mod = import_module(fil[:(-3)])
   for (key, item) in mod.__dict__.items():
    if key.startswith('__'):
     continue
    if (isinstance(item, dict) and ('to' in item) and ('fro' in item)):
     mapd[item['identifier']] = item
 return mapd

def load_maps ( dirspec ) : mapd = { } if ( dirspec not in sys . path ) : sys . path . insert ( 0 , dirspec ) for fil in os . listdir ( dirspec ) : if fil . endswith ( '.py' ) : mod = import_module ( fil [ : ( - 3 ) ] ) for ( key , item ) in mod . __dict__ . items ( ) : if key . startswith ( '__' ) : continue if ( isinstance ( item , dict ) and ( 'to' in item ) and ( 'fro' in item ) ) : mapd [ item [ 'identifier' ] ] = item return mapd
load the attribute maps .