[IPython-dev] Highlight lines of code in code cells?

Mark Voorhies mark.voorhies at ucsf.edu
Mon Dec 2 19:22:27 EST 2013


On 12/02/2013 04:10 PM, Gabriel Becker wrote:
> On Mon, Dec 2, 2013 at 3:54 PM, Mark Voorhies <mark.voorhies at ucsf.edu>wrote:
>
>> On 12/02/2013 03:19 PM, Greg Wilson wrote:
>>
>>> Thanks,
>>> Greg
>>
>> Just started fiddling with this, using rmagic.py and cythonmagic.py as
>> references.
>>
>> Can anyone point me at documentation for getting at retrieving cell
>> content by
>> number and/or tag via the IPython shell instance?
>>
>
> I could be entirely off base here, but my understanding is that the IPython
> kernel (which provides the magics) used by the notebook doesn't have any
> concept of cells/the whole notebook in the way you are going to need them.

Looks like shell.history_manager.get_range works for cell numbers
(and that the "tags" that Greg mentioned aren't yet implemented).

--Mark





More information about the IPython-dev mailing list