[SciPy-User] scipy.pkgload() error

Ralf Gommers ralf.gommers@googlemail....
Wed Aug 1 16:29:41 CDT 2012


On Tue, Jul 31, 2012 at 8:18 AM, Johann Rohwer <jr@sun.ac.za> wrote:

> On Monday 30 July 2012 22:29:40 Pauli Virtanen wrote:
> > 30.07.2012 21:52, Ralf Gommers kirjoitti:
> > [clip]
> >
> > > My proposal would be to delete pkgload from the scipy namespace.
> >
> > Or maybe have it do __import__('scipy.' + pkgname)
> > I had some old code that assumed pkgload would add the submodule to
> > the main namespace, so maybe trying to restore this could be one
> > option.
>

Since that currently doesn't work (also for released versions) and isn't
even any shorter to type than "from scipy import module", I don't really
see the point of that.

Alternatively, just remove it...
>
> I agree that
> scipy.pkgload('io')             and                     import scipy.io
> are probably not much different. However, I did find the convenience
> function
> scipy.pkgload()
> useful to load all the subpackages and it would be nice to have that
> option, although it's of course not a show stopper.
>

Reimplementing pkgload() which imports all modules seems fine to me, as
long as we document that it's meant for interactive usage only.

Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20120801/3f4d31ca/attachment.html 


More information about the SciPy-User mailing list