From 0ee6ac171ea683ccc08aaa1cd4ce97d4fb1a2b0a 2006-11-02 13:57:45 From: vivainio Date: 2006-11-02 13:57:45 Subject: [PATCH] module completer now uses pkgutil.iter_modules() --- diff --git a/IPython/Extensions/ipy_stock_completers.py b/IPython/Extensions/ipy_stock_completers.py index f8da892..3beafc5 100755 --- a/IPython/Extensions/ipy_stock_completers.py +++ b/IPython/Extensions/ipy_stock_completers.py @@ -73,7 +73,9 @@ xmlrpclib zipfile""" def module_completer(self,event): """ Give completions after user has typed 'import' """ - return py_std_modules.split() + + import pkgutil + return [m[1] for m in pkgutil.iter_modules()] ip.set_hook('complete_command', module_completer, str_key = 'import')