def get_submodules(module_name):
 module_info = loaded_module_info(module_name)
 module_list = []
 try:
  submodules = module_info['submodules']
 except KeyError:
  logging.info(('Module %s is not loaded' % module_name))
 else:
  module_list = submodules
  for module in submodules:
   module_list += get_submodules(module)
 return module_list

def get_submodules ( module_name ) : module_info = loaded_module_info ( module_name ) module_list = [ ] try : submodules = module_info [ 'submodules' ] except KeyError : logging . info ( ( 'Module %s is not loaded' % module_name ) ) else : module_list = submodules for module in submodules : module_list += get_submodules ( module ) return module_list
get all submodules of the module .