TenjintShell.
all_ns_refs
Get a list of references to all the namespace dictionaries in which IPython might store a user-created object.
Note that this does not include the displayhook, which also caches objects from the output.