[IPython-User] --pylab and numpy

Fernando Perez fperez.net@gmail....
Thu Nov 24 01:06:28 CST 2011


Hi Tom,

On Wed, Nov 23, 2011 at 10:33 PM, Tom Bennett
<tom.bennett@mail.zyzhu.net> wrote:
> I noticed something odd. If I start ipython with --pylab, I find that it is
> as if it automatically executes the following:
>
> from numpy import *
> import numpy as np
>
> I wonder if there is any way to instruct it not to do this.

indeed it does precisely that, and similarly imports all of
matpltolib.  You can prevent the 'import *' statements by setting in
your config file

c.InteractiveShellApp.pylab_import_all = False

Cheers,

f


More information about the IPython-User mailing list