[IPython-user] help issues

Arnd Baecker arnd.baecker at web.de
Tue May 11 02:05:09 CDT 2004


Hi,

I just tested the current CVS version wrt to the help problems
(in connnection with scipy).
Most of the things I also saw to happen with a normal
python prompt (see my mail on scipy-user).
However the ones below seem to be IPython triggered.
I am not sure if it is worth tackling these already at
this point, i.e. as long as the other problems
with the normal python prompt exist, as the
solution on the IPython side might depend on the solution
taken there.

Best, Arnd

Examples
=========

Notice that due to Pearu's recent improvements on
the behaviour of help a very recent scipy CVS is necessary
to see the same results, I'd guess.

Case 1 (this works)
-------------------

help("scipy.integrate.odeint")
from scipy.integrate import odeint
help("scipy.integrate.odeint")

Case 2
------

  help("scipy.integrateMISPELLED.odeint")
  help("scipy.integrateMISPELLED.odeint")
gives:

In [1]: help("scipy.integrateMISPELLED.odeint")
/home/python/PYTHON_New/lib/python2.3/site-packages/scipy/pilutil.pyc No
module named PIL
no Python documentation found for 'scipy.integrateMISPELLED.odeint'


In [2]: help("scipy.integrateMISPELLED.odeint")
ppimport('scipy.integrateMISPELLED') caller locals:
__name__=__main__
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call
last)

/home/abaecker/<console>

/home/python/PYTHON_New/lib/python2.3/site.py in __call__(self, *args,
**kwds)
    307     def __call__(self, *args, **kwds):
    308         import pydoc
--> 309         return pydoc.help(*args, **kwds)
    310
    311 __builtin__.help = _Helper()

/home/python/PYTHON_New/lib/python2.3/site-packages/scipy_base/ppimport.py
in _scipy_pydoc_help_call(self, *args, **kwds)
    334     _old_pydoc_help_call = _pydoc.help.__class__.__call__
    335     def _scipy_pydoc_help_call(self,*args,**kwds):
--> 336         return _old_pydoc_help_call(self, *map(ppresolve,args),
**kwds)
    337     _pydoc.help.__class__.__call__ =
_new.instancemethod(_scipy_pydoc_help_call,
    338                                                          None,

/home/python/PYTHON_New/lib/python2.3/site-packages/scipy_base/ppimport.py
in ppresolve(a)
    307             if hasattr(a,'_ppimport_importer') or \
    308                    hasattr(a,'_ppimport_module'):
--> 309                 a = a._ppimport_module
    310             if hasattr(a,'_ppimport_attr'):
    311                 a = a._ppimport_attr

/home/python/PYTHON_New/lib/python2.3/site-packages/scipy_base/ppimport.py
in __getattr__(self, name)
    270             module = self.__dict__['_ppimport_module']
    271         except KeyError:
--> 272             module = self._ppimport_importer()
    273         return getattr(module, name)
    274

/home/python/PYTHON_New/lib/python2.3/site-packages/scipy_base/ppimport.py
in _ppimport_importer(self)
    246                         print '%s=%s' % (k,v)
    247             self.__dict__['_ppimport_exc_info'] = sys.exc_info()
--> 248             raise
    249
    250         assert isinstance(module,types.ModuleType),`module`

ImportError: No module named integrateMISPELLED


Case 3
------

help("scipy.integrateMISPELLED.odeint")
help("scipy.integrate.odeint")

Gives:

In [1]: help("scipy.integrateMISPELLED.odeint")
/home/python/PYTHON_New/lib/python2.3/site-packages/scipy/pilutil.pyc No
module named PIL
no Python documentation found for 'scipy.integrateMISPELLED.odeint'

In [2]: help("scipy.integrate.odeint")
ppimport('scipy.integrate.odeint') caller locals:
__name__=__main__
No module named odeint







More information about the IPython-user mailing list