[IPython-dev] IPythonInputSplitter.cell_magic_parts and InteractiveShell
benjaminrk at gmail.com
Wed Jun 20 00:58:29 EDT 2012
On Tue, Jun 19, 2012 at 9:54 PM, Jason Grout <jason-sage at creativetrax.com>wrote:
> I'm working on getting the 0.13beta1 to work with Sage. One problem is
> that the InteractiveShell code assumes that the input splitter has a
> .cell_magic_parts attribute (see line 2559 of
> IPython/core/interactiveshell.py). Now, this is not an attribute of
> InputSplitter, but is an attribute of IPythonInputSplitter. Do we have
> to depend on having this attribute, or should InteractiveShell first
> check for the existence of this attribute? In Sage, we have our own
> SageInputSplitter which inherits directly from InputSplitter, and so we
> don't have the .cell_magic_parts attribute.
> In other words, how decoupled do you want InteractiveShell and the
> IPythonInputSplitter subclass of InputSplitter?
I think we can just set InputSplitter.cell_magic_parts = None, so that it's
clearly defined as an unused part of the public input splitter api.
or we use getattr in InteractiveShell, but I think we generally try to
> IPython-dev mailing list
> IPython-dev at scipy.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev