[IPython-user] ipython 0.7.3 vs. django (python 2.5)

Robert Kern robert.kern@gmail....
Sun Apr 1 16:40:01 CDT 2007

Patricio Olivares wrote:
> Hi,
> I'm trying ipython 0.7.3 with django on a python 2.5 install.
> When ipython try to index the modules (for example when I type "import
> <TAB>"), I get a traceback from django. See <http://pastebin.ca/420048>.
> The steps I did were:
> - install a fresh python 2.5 release from sources on /tmp/yo
> - install ipython 0.7.3 (using /tmp/yo/bin/python setup.py install)
> - install django from svn
> (<http://code.djangoproject.com/svn/django/trunk/>). The release 0.9.6
> gives the error too.
> All of this on ubuntu dapper. After entering ipython and doing "import
> <TAB>" or "from <TAB>" I got the traceback.
> Django has some weird setting requirements so maybe there's a way
> to exclude it from the scanning?

I had too many problems with other packages, too, so I've turned off that
particular feature. It uses the standard library function
pkgutil.walk_packages() which has some unfortunate (and for my use,
unacceptable) side effects. Note this paragraph in its docstring:

    Note that this function must import all *packages* (NOT all
    modules!) on the given path, in order to access the __path__
    attribute to find submodules.

No, there's no real way to exclude a package except by using something other
than pkgutil.walk_packages().

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

More information about the IPython-user mailing list