[IPython-dev] IPythonInputSplitter.cell_magic_parts and InteractiveShell

MinRK benjaminrk@gmail....
Tue Jun 19 23:58:29 CDT 2012


On Tue, Jun 19, 2012 at 9:54 PM, Jason Grout <jason-sage@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
avoid that.




>
> Thanks,
>
> Jason
> _______________________________________________
> IPython-dev mailing list
> IPython-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20120619/14984431/attachment.html 


More information about the IPython-dev mailing list