def _ensure_loaded(start_path):
 for (root, folder, files) in os.walk(start_path):
  for phile in fnmatch.filter(files, '*.py'):
   path = os.path.join(root, phile)
   try:
    __import__(path.replace('/', '.')[:(-3)], globals(), locals())
   except Exception:
    pass

def _ensure_loaded ( start_path ) : for ( root , folder , files ) in os . walk ( start_path ) : for phile in fnmatch . filter ( files , '*.py' ) : path = os . path . join ( root , phile ) try : __import__ ( path . replace ( '/' , '.' ) [ : ( - 3 ) ] , globals ( ) , locals ( ) ) except Exception : pass
loads everything in a given path .