[IPython-dev] Namespace pollution and a kernel panel
Fri Jun 15 20:32:18 CDT 2012
On Fri, Jun 15, 2012 at 5:24 PM, Bob McElrath <firstname.lastname@example.org>wrote:
> Dumb question...but how?
> In any case I'm going to stop using --pylab, and use '%pylab inline'
> The former makes the notebook not standalone -- it's dependent on whomever
> send it to knowing to start ipython with the --pylab option.
Yes, this was an artifact of the fact that the %pylab magic didn't
initially work in the kernel, which has since been fixed.
Among other things, PR 1954
any recommendation for starting with `--pylab` from the example notebooks,
because it's really not the best way to do it.
> Fernando Perez [email@example.com] wrote:
> > On Fri, Jun 15, 2012 at 1:31 PM, Bob McElrath <firstname.lastname@example.org>
> > > 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
> the tribe. If you try it, you will be lonely often, and sometimes
> But no price is too high to pay for the privilege of owning yourself."
> -- Friedrich Nietzsche
> IPython-dev mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev