def _scan_plugins():
 pd = os.path.dirname(__file__)
 config_files = glob(os.path.join(pd, '_plugins', '*.ini'))
 for filename in config_files:
  (name, meta_data) = _parse_config_file(filename)
  plugin_meta_data[name] = meta_data
  provides = [s.strip() for s in meta_data['provides'].split(',')]
  valid_provides = [p for p in provides if (p in plugin_store)]
  for p in provides:
   if (not (p in plugin_store)):
    print ('Plugin `%s` wants to provide non-existent `%s`. Ignoring.' % (name, p))
  need_to_add_collection = (('imread_collection' not in valid_provides) and ('imread' in valid_provides))
  if need_to_add_collection:
   valid_provides.append('imread_collection')
  plugin_provides[name] = valid_provides
  plugin_module_name[name] = os.path.basename(filename)[:(-4)]

def _scan_plugins ( ) : pd = os . path . dirname ( __file__ ) config_files = glob ( os . path . join ( pd , '_plugins' , '*.ini' ) ) for filename in config_files : ( name , meta_data ) = _parse_config_file ( filename ) plugin_meta_data [ name ] = meta_data provides = [ s . strip ( ) for s in meta_data [ 'provides' ] . split ( ',' ) ] valid_provides = [ p for p in provides if ( p in plugin_store ) ] for p in provides : if ( not ( p in plugin_store ) ) : print ( 'Plugin `%s` wants to provide non-existent `%s`. Ignoring.' % ( name , p ) ) need_to_add_collection = ( ( 'imread_collection' not in valid_provides ) and ( 'imread' in valid_provides ) ) if need_to_add_collection : valid_provides . append ( 'imread_collection' ) plugin_provides [ name ] = valid_provides plugin_module_name [ name ] = os . path . basename ( filename ) [ : ( - 4 ) ]
scan the plugins directory for .