[IPython-dev] Full import completion for ipython

Olivier Lauzanne olauzanne at gmail.com
Thu Apr 19 16:42:55 EDT 2007


Here is a patch for the svn version of ipython that adds a full completion
for the imports.

With it you can get completion for commands like
'import xml.d'
'from xml.dom import '
or anything else like this.

To provide the completion for a module of the kind 'name' I look into all
the folders in the sys.path.
To provide the completion for a module of the kind 'name1.name2', I import
name1. It may have some side effects ... but anyway you're going to import
it aren't you ?

The patch modify the extensions. So to try it out you need to add an import
to your ipy_user_conf.py :
from IPython.Extensions import ipy_stock_completers

If you like it I may do a patch to integrate it directly in ipython, not
just in the extensions.

Hope you like it.
Olivier Lauzanne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20070419/0e08e1f0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: application/octet-stream
Size: 5854 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20070419/0e08e1f0/attachment.obj>


More information about the IPython-dev mailing list