def iter_modules(modules_directory=MODULES_DIR):
 modules = index_modules(modules_directory)
 modules = map((lambda x: ''.join(['routersploit.modules.', x])), modules)
 for path in modules:
  try:
   (yield import_exploit(path))
  except RoutersploitException:
   pass

def iter_modules ( modules_directory = MODULES_DIR ) : modules = index_modules ( modules_directory ) modules = map ( ( lambda x : '' . join ( [ 'routersploit.modules.' , x ] ) ) , modules ) for path in modules : try : ( yield import_exploit ( path ) ) except RoutersploitException : pass
yields for all submodules on path .