[IPython-dev] Namespace pollution and a kernel panel

Bob McElrath bob+ipython at mcelrath.org
Fri Jun 15 20:24:09 EDT 2012

Dumb question...but how?

In any case I'm going to stop using --pylab, and use '%pylab inline' instead.
The former makes the notebook not standalone -- it's dependent on whomever I
send it to knowing to start ipython with the --pylab option.

Fernando Perez [fperez.net at gmail.com] wrote:
> On Fri, Jun 15, 2012 at 1:31 PM, Bob McElrath <bob+ipython at mcelrath.org> wrote:
> > This is because I ran ipython --pylab, but it highlights a bigger problem: how
> > does the user know which symbols are defined?
> This is slightly orthogonal to the rest of the discussion, but you can
> configure ipython to *not* do 'from numpy import *' when --pylab is
> given, and to only provide the names 'numpy, matplotlib, pyplot, np,
> plt' in your namespace and nothing else.  That gives you the plotting
> support (including backend integration and gui/inline support),
> without any further pollution of the namespace.
Cheers, Bob McElrath

"The individual has always had to struggle to keep from being overwhelmed by
the tribe.  If you try it, you will be lonely often, and sometimes frightened.
But no price is too high to pay for the privilege of owning yourself." 
    -- Friedrich Nietzsche

More information about the IPython-dev mailing list