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

Arnd Baecker arnd.baecker at web.de
Tue May 11 08:27:42 CDT 2004

Hi Pearu,

On Tue, 11 May 2004, Pearu Peterson wrote:
> > Case 3
> > ------
> >
> > from scipy.integrate import odeint
> >
> > def f(x):
> >    """doc string for f(x)"""
> >    return x*x
> >
> > >>> help(f)
> > [[gives the help on f and then, after returning from the pager: ]]
> > /home/python/PYTHON_New/lib/python2.3/site-packages/scipy/plt/interface.pyc
> > No module named wxPython
> > /home/python/PYTHON_New/lib/python2.3/site-packages/scipy/plt/__init__.pyc
> > No module named wxPython
> >
> > >From a user perspective I would not have thought to see this here ;-)
> I wouldn't disable these messages yet as they are informative for users
> who try to use scipy.plt module (that will not work without wxPython) as
> well as they appear only once. Maybe these messages should appear as
> warnings, though, then one can disable them using python warnings system..

I am not fully convinced ;-): If a user asks for help on a function
which does not contain anything related to scipy or wxPython
he will will be confused about the message and will
have a hard time to find out where the complaint comes from.
Somehow the invocation of "help" on f triggers to import
the scipy stuff and that's where the warning comes from
(Hope this is the right explanation).

In addition, there is (from the users perspective) no place where
scipy.plt is called. Wouldn't it be better to defer any complaints
about a missing wxPython (and PIL in other situations)
when scipy.plt is actually used?
(Ensuring the availability of wxPython/PIL is more a thing
of the installation than that it should pop on every import of scipy,
I think.)
((Honestly, normally I would not see these messages anyway
as I have PIL and wxPython installed, but not for these tests;-))

> > Sorry for being a pain here, but maybe you (again) have a solution for
> > the above points.
> No problem at all. Your feedback is very much appreciated. Keep sending
> bug reports also in future;-)

I will ;-)

> There is also Scipy bugtracker, http://www.scipy.org/bugtracker, that
> might be the place to save bugreports. Unfortunately, from the developers
> point of view, it is pain to use the current Roundup: almost all issues
> that I have fixed there and set 'resolved', have appeared as 'chatting'
> again after few days, either because of some bug in Roundup itself or
> because of some 'anonymous' user who cannot stand 'resolved' issues:(

Some people seem to have just too much time.

> Hopefully 'anonymous' users will be disabled in Roundup someday..

Whenever this works properly just let me know, and I will post there
if you prefer that.

Many thanks,


More information about the SciPy-user mailing list