find_mod_objs

sknano.core.meta.find_mod_objs(modname, onlylocals=False)[source] [edit on github][source]

Returns all the public attributes of a module referenced by name.

Note

The returned list not include subpackages or modules of modname,nor does it include private attributes (those that beginwith ‘_’ or are not in __all__).

Parameters:
  • modname (str) – The name of the module to search.
  • onlylocals (bool) – If True, only attributes that are either members of modname OR one of its modules or subpackages will be included.
Returns:

  • localnames (list of str) – A list of the names of the attributes as they are named in the module modname .
  • fqnames (list of str) – A list of the full qualified names of the attributes (e.g., astropy.utils.misc.find_mod_objs). For attributes that are simple variables, this is based on the local name, but for functions or classes it can be different if they are actually defined elsewhere and just referenced in modname.
  • objs (list of objects) – A list of the actual attributes themselves (in the same order as the other arguments)