def _toload_info(path, extrapath, _toload=None):
 if (_toload is None):
  assert isinstance(path, list)
  _toload = ({}, [])
 for fileordir in path:
  if (isdir(fileordir) and exists(join(fileordir, '__init__.py'))):
   subfiles = [join(fileordir, fname) for fname in listdir(fileordir)]
   _toload_info(subfiles, extrapath, _toload)
  elif (fileordir[(-3):] == '.py'):
   modname = _modname_from_path(fileordir, extrapath)
   _toload[0][modname] = fileordir
   _toload[1].append((fileordir, modname))
 return _toload

def _toload_info ( path , extrapath , _toload = None ) : if ( _toload is None ) : assert isinstance ( path , list ) _toload = ( { } , [ ] ) for fileordir in path : if ( isdir ( fileordir ) and exists ( join ( fileordir , '__init__.py' ) ) ) : subfiles = [ join ( fileordir , fname ) for fname in listdir ( fileordir ) ] _toload_info ( subfiles , extrapath , _toload ) elif ( fileordir [ ( - 3 ) : ] == '.py' ) : modname = _modname_from_path ( fileordir , extrapath ) _toload [ 0 ] [ modname ] = fileordir _toload [ 1 ] . append ( ( fileordir , modname ) ) return _toload
return a dictionary of <modname>: <modpath> and an ordered list of to load .