Show More
@@ -923,7 +923,7 class InteractiveShell(SingletonConfigurable, Magic): | |||
|
923 | 923 | # A table holding all the namespaces IPython deals with, so that |
|
924 | 924 | # introspection facilities can search easily. |
|
925 | 925 | self.ns_table = {'user_global':self.user_module.__dict__, |
|
926 | 'user_local':user_ns, | |
|
926 | 'user_local':self.user_ns, | |
|
927 | 927 | 'builtin':builtin_mod.__dict__ |
|
928 | 928 | } |
|
929 | 929 |
@@ -693,7 +693,7 Currently the magic system has the following functions:\n""" | |||
|
693 | 693 | return |
|
694 | 694 | |
|
695 | 695 | # default namespaces to be searched |
|
696 | def_search = ['user','builtin'] | |
|
696 | def_search = ['user_local', 'user_global', 'builtin'] | |
|
697 | 697 | |
|
698 | 698 | # Process options/args |
|
699 | 699 | opts,args = self.parse_options(parameter_s,'cias:e:',list_all=True) |
@@ -762,13 +762,15 class Inspector: | |||
|
762 | 762 | (name,ns_table.keys())) |
|
763 | 763 | |
|
764 | 764 | #print 'type_pattern:',type_pattern # dbg |
|
765 |
search_result = |
|
|
765 | search_result, namespaces_seen = set(), set() | |
|
766 | 766 | for ns_name in ns_search: |
|
767 | 767 | ns = ns_table[ns_name] |
|
768 | tmp_res = list(list_namespace(ns,type_pattern,filter, | |
|
769 | ignore_case=ignore_case, | |
|
770 | show_all=show_all)) | |
|
771 | search_result.extend(tmp_res) | |
|
772 | search_result.sort() | |
|
773 | ||
|
774 | page.page('\n'.join(search_result)) | |
|
768 | # Normally, locals and globals are the same, so we just check one. | |
|
769 | if id(ns) in namespaces_seen: | |
|
770 | continue | |
|
771 | namespaces_seen.add(id(ns)) | |
|
772 | tmp_res = list_namespace(ns, type_pattern, filter, | |
|
773 | ignore_case=ignore_case, show_all=show_all) | |
|
774 | search_result.update(tmp_res) | |
|
775 | ||
|
776 | page.page('\n'.join(sorted(search_result))) |
General Comments 0
You need to be logged in to leave comments.
Login now