[Ipython-tickets] [IPython] #196: import completer returns incomplete module list
IPython
ipython-tickets@scipy....
Fri Apr 11 02:59:10 CDT 2008
#196: import completer returns incomplete module list
---------------------+------------------------------------------------------
Reporter: brian1 | Owner: vivainio
Type: defect | Status: reopened
Priority: normal | Milestone:
Component: ipython | Version:
Severity: normal | Resolution:
Keywords: |
---------------------+------------------------------------------------------
Comment (by mc):
I looked further. And I've found that the following works for me. This
patch is against bzr trunk r103.
=== modified file 'IPython/Extensions/ipy_completers.py'
--- IPython/Extensions/ipy_completers.py 2008-04-09 22:13:04 +0000
+++ IPython/Extensions/ipy_completers.py 2008-04-11 07:51:42 +0000
@@ -12,6 +12,7 @@
import glob,os,shlex,sys
import inspect
from time import time
+from zipimport import zipimporter
ip = IPython.ipapi.get()
try:
@@ -86,6 +87,11 @@
if os.path.isdir(path):
folder_list = os.listdir(path)
+ elif path.endswith('.egg'):
+ try:
+ folder_list = [f for f in zipimporter(path)._files]
+ except:
+ folder_list = []
else:
folder_list = []
#folder_list = glob.glob(os.path.join(path,'*'))
--
Ticket URL: <http://ipython.scipy.org/ipython/ipython/ticket/196#comment:12>
IPython <http://ipython.scipy.org>
The IPython interactive Python system
More information about the Ipython-tickets
mailing list