[SciPy-user] help and lazy importer (again or still ?)

Arnd Baecker arnd.baecker at web.de
Wed May 5 10:48:01 CDT 2004


with yesterdays CVS version I came across the
following problem

>>> help ("scipy.integrate.odeint")
   [[ this works fine ]]
>>> from  scipy.integrate import odeint
>>> help ("scipy.integrate.odeint")
Traceback (m`ost recent call last):
  File "<stdin>", line 1, in ?
  File "/home/python/PYTHON_New//lib/python2.3/site.py", line 309, in
    return pydoc.help(*args, **kwds)
line 307, in _scipy_pydoc_help_call
    a = a._ppimport_module
line 270, in __getattr__
    module = self._ppimport_importer()
line 243, in _ppimport_importer
    module = __import__(name,None,None,['*'])
ImportError: No module named odeint

After importing (via `from  scipy.integrate import odeint`)
works (as expected).

Our students stumbled across this and complained
"There is no help for scipy.integrate.odeint" ;-).

I hope that there is an easy solution to this
(and that my question does not open a can of worms ... ;-)

And there is another (related?) one:

Python 2.3.3 (#1, May  3 2004, 16:38:25)
[GCC 3.3.3 (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> help("scipy.linalg")
  Help on instance of _ModuleLoader in scipy:
  scipy.linalg = <module 'scipy.linalg' from '/home/python/PYTHON...
    e-packages/scipy/linalg/__init__.pyc' [imported]>

Only on the second call to help("scipy.linalg")
one gets the expected documentation.



More information about the SciPy-user mailing list