IPython Notebook previous cell content

ipython, jupyter-notebook

Solution

I didn't find how to get the previous content cell in a cell.

But I found another solution, creating a custom magic notebook function to capture the cell content and work with that.

Problem

Is it possible in an IPython-Notebook cell to get the previous (above) cell content ? I can see previous output with %capture magic function but I don't find how to get the previous cell content.

Original source