##// END OF EJS Templates
add xml to root module list. Closes \#196
vivainio -
Show More
@@ -62,8 +62,12 b' def getRootModules():'
62 print
62 print
63 ip.db['rootmodules'] = []
63 ip.db['rootmodules'] = []
64 return []
64 return []
65
65
66 modules += sys.builtin_module_names
66 modules += sys.builtin_module_names
67
68 #special modules that don't appear normally
69 modules.extend(['xml'])
70
67 modules = list(set(modules))
71 modules = list(set(modules))
68 if '__init__' in modules:
72 if '__init__' in modules:
69 modules.remove('__init__')
73 modules.remove('__init__')
@@ -77,17 +81,18 b' def moduleList(path):'
77 Return the list containing the names of the modules available in the given
81 Return the list containing the names of the modules available in the given
78 folder.
82 folder.
79 """
83 """
84
80 if os.path.isdir(path):
85 if os.path.isdir(path):
81 folder_list = os.listdir(path)
86 folder_list = os.listdir(path)
82 else:
87 else:
83 folder_list = []
88 folder_list = []
84 #folder_list = glob.glob(os.path.join(path,'*'))
89 #folder_list = glob.glob(os.path.join(path,'*'))
85 folder_list = [path for path in folder_list \
90 folder_list = [p for p in folder_list \
86 if os.path.exists(os.path.join(path,'__init__.py'))\
91 if os.path.exists(os.path.join(p,'__init__.py'))\
87 or path[-3:] in ('.py','.so')\
92 or p[-3:] in ('.py','.so')\
88 or path[-4:] in ('.pyc','.pyo')]
93 or p[-4:] in ('.pyc','.pyo')]
89 folder_list += folder_list
94
90 folder_list = [os.path.basename(path).split('.')[0] for path in folder_list]
95 folder_list = [os.path.basename(p).split('.')[0] for p in folder_list]
91 return folder_list
96 return folder_list
92
97
93 def moduleCompletion(line):
98 def moduleCompletion(line):
@@ -1,3 +1,7 b''
1 2007-11-08 Ville Vainio <vivainio@gmail.com>
2 * ipy_completer.py (import completer): assume 'xml' module exists.
3 Do not add every module twice anymore. Closes #196.
4
1 2007-11-06 Ville Vainio <vivainio@gmail.com>
5 2007-11-06 Ville Vainio <vivainio@gmail.com>
2
6
3 * Prompts.py: Do not update _oh and _123 when do_full_cache is not
7 * Prompts.py: Do not update _oh and _123 when do_full_cache is not
General Comments 0
You need to be logged in to leave comments. Login now