[IPython-dev] Namespace pollution and a kernel panel
Sat Jun 16 02:13:55 CDT 2012
I do think we want to think more about a namespace browser. I can
also imagine that there would also be other "widgets" like this that
we would want to have. Some questions related to this:
* Do we want these to be welded into the notebook or do we want such
widgets to simply be regular python libraries that 2rd parties can
develop and plug into the notebook?
* Where would be put these. One obvious choice is to use a left
panel. I am not thrilled about this, but don't have any better ideas.
On Fri, Jun 15, 2012 at 1:31 PM, Bob McElrath <email@example.com> wrote:
> One of my long-standing complaints about notebook-style worksheets (Maple,
> Mathematica) is the large and hidden namespace of defined symbols. If one is
> not careful, it's easy to end up with some element of worksheet-state that is
> not what you think it is, and end up with garbage results. This can be very
> difficult to track down. And because worksheets are generally not executed top
> to bottom, it often results in difficult-to-reproduce errors.
> I discovered this today with IPython's notebook and gamma(), which turns out to
> be numpy.random.gamma() rather than the Euler Gamma function math.gamma() or
> This is because I ran ipython --pylab, but it highlights a bigger problem: how
> does the user know which symbols are defined? I have been thinking lately of an
> addition to the notebook interface: a side-panel showing everything
> defined/imported in the kernel. This would further allow the user to inspect
> the output of commands by clicking on kernel data structures, rather than
> wasting a cell just to print some output. Personally I always end up with very
> messy worksheets, because I insert a lot of print or plot commands, just to
> explore a data structure or function.
> Another possible use of such a thing would be a non-modifying cell: a cell that
> refuses to change the state of the kernel by modifying variables, but could be
> used to print/plot/explore existing data structures. Then when one has found
> the most desirable representation, that could be copied/moved to the worksheet.
> Perhaps there are other creative ways to avoid the user having to manage an
> approximation of the kernel state in their head.
> 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
> IPython-dev mailing list
Brian E. Granger
Cal Poly State University, San Luis Obispo
firstname.lastname@example.org and email@example.com
More information about the IPython-dev