| 452 | # Traverse all module directories underneath globals |
| 453 | # to see if something is defined |
| 454 | def _makenamedict(module='numpy'): |
| 455 | module = __import__(module, globals(), locals(), []) |
| 456 | thedict = {module.__name__:module.__dict__} |
| 457 | dictlist = [module.__name__] |
| 458 | totraverse = [module.__dict__] |
| 459 | while True: |
| 460 | if len(totraverse) == 0: |
| 461 | break |
| 462 | thisdict = totraverse.pop(0) |
| 463 | for x in thisdict.keys(): |
| 464 | if isinstance(thisdict[x], types.ModuleType): |
| 465 | modname = thisdict[x].__name__ |
| 466 | if modname not in dictlist: |
| 467 | moddict = thisdict[x].__dict__ |
| 468 | dictlist.append(modname) |
| 469 | totraverse.append(moddict) |
| 470 | thedict[modname] = moddict |
| 471 | return thedict, dictlist |
| 472 | |
| 473 | |
| 474 | def _info(obj, output=None): |