Show More
@@ -64,6 +64,10 def getRootModules(): | |||
|
64 | 64 | return [] |
|
65 | 65 | |
|
66 | 66 | modules += sys.builtin_module_names |
|
67 | ||
|
68 | #special modules that don't appear normally | |
|
69 | modules.extend(['xml']) | |
|
70 | ||
|
67 | 71 | modules = list(set(modules)) |
|
68 | 72 | if '__init__' in modules: |
|
69 | 73 | modules.remove('__init__') |
@@ -77,17 +81,18 def moduleList(path): | |||
|
77 | 81 | Return the list containing the names of the modules available in the given |
|
78 | 82 | folder. |
|
79 | 83 | """ |
|
84 | ||
|
80 | 85 | if os.path.isdir(path): |
|
81 | 86 | folder_list = os.listdir(path) |
|
82 | 87 | else: |
|
83 | 88 | folder_list = [] |
|
84 | 89 | #folder_list = glob.glob(os.path.join(path,'*')) |
|
85 |
folder_list = [p |
|
|
86 |
if os.path.exists(os.path.join(p |
|
|
87 |
or p |
|
|
88 |
or p |
|
|
89 | folder_list += folder_list | |
|
90 |
folder_list = [os.path.basename(p |
|
|
90 | folder_list = [p for p in folder_list \ | |
|
91 | if os.path.exists(os.path.join(p,'__init__.py'))\ | |
|
92 | or p[-3:] in ('.py','.so')\ | |
|
93 | or p[-4:] in ('.pyc','.pyo')] | |
|
94 | ||
|
95 | folder_list = [os.path.basename(p).split('.')[0] for p in folder_list] | |
|
91 | 96 | return folder_list |
|
92 | 97 | |
|
93 | 98 | def moduleCompletion(line): |
@@ -1,3 +1,7 | |||
|
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 | 5 | 2007-11-06 Ville Vainio <vivainio@gmail.com> |
|
2 | 6 | |
|
3 | 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