##// END OF EJS Templates
module completer looks inside .egg zip files, close #196.
Ville M. Vainio -
Show More
@@ -12,6 +12,7 b' import IPython.ipapi'
12 import glob,os,shlex,sys
12 import glob,os,shlex,sys
13 import inspect
13 import inspect
14 from time import time
14 from time import time
15 from zipimport import zipimporter
15 ip = IPython.ipapi.get()
16 ip = IPython.ipapi.get()
16
17
17 try:
18 try:
@@ -86,6 +87,11 b' def moduleList(path):'
86
87
87 if os.path.isdir(path):
88 if os.path.isdir(path):
88 folder_list = os.listdir(path)
89 folder_list = os.listdir(path)
90 elif path.endswith('.egg'):
91 try:
92 folder_list = [f for f in zipimporter(path)._files]
93 except:
94 folder_list = []
89 else:
95 else:
90 folder_list = []
96 folder_list = []
91 #folder_list = glob.glob(os.path.join(path,'*'))
97 #folder_list = glob.glob(os.path.join(path,'*'))
@@ -2,6 +2,9 b''
2
2
3 * genutils.py: SList.grep supports 'field' argument
3 * genutils.py: SList.grep supports 'field' argument
4
4
5 * ipy_completers.py: module completer looks inside
6 .egg zip files (patch by mc). Close #196.
7
5 2008-04-09 Ville Vainio <vivainio@gmail.com>
8 2008-04-09 Ville Vainio <vivainio@gmail.com>
6
9
7 * deep_reload.py: do not crash on from __future__ import
10 * deep_reload.py: do not crash on from __future__ import
General Comments 0
You need to be logged in to leave comments. Login now