[IPython-dev] [sympy] Re: using reST for representing the notebook cells+text
Robert Kern
robert.kern@gmail....
Wed Feb 24 09:49:56 CST 2010
On Wed, Feb 24, 2010 at 01:52, Brian Granger <ellisonbg.net@gmail.com> wrote:
> In many respects it seems almost perfect. But, one day recently I was
> thinking about how successful Mathematica's notebook continues to be. So I
> began to look more at the Mathematica notebook format. Amazingly, the
> Mathematica notebook format is a plain text file that itself is *valid
> Mathematica code*.
The problem with transferring this to Python is that Mathematica's
language is a very Lispy one. ExpressionCell[] contains the actual
expression, not a string representing a Mathematica expression. You
can't do that with Python. You would have to put the Python code into
strings. You just have a "dumb" tree structure with text leaf nodes.
At that point, you might as well use XML to describe the exact same
structure. With XML, you can push it across to other languages,
JavaScript being the hugely important player here. Certainly, you are
going to have a Python API that will represent that tree of text nodes
as Python objects, but I just don't see the point of making the repr()
of that be the lingua franca format of the notebook file. It's just a
wasted opportunity.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the IPython-dev
mailing list