[IPython-User] Feature suggestions to ipython notebook

Thomas Kluyver takowl@gmail....
Wed Sep 11 12:31:23 CDT 2013

On 11 September 2013 10:02, Aaron Meurer <asmeurer@gmail.com> wrote:

> > 5. Jump to the definition of a function (within the same notebook); a
> > function can be defined many times though.
> This is a hard problem in general, due to the dynamic nature of
> python. But libraries like Jedi do a pretty good job.

Actually, I think it might be fairly easy to jump to the *cell* where a
function was defined, which is probably good enough for most cases. Each
cell is executed with a different 'filename' containing its number within
the session, and code objects created in that cell record that filename:


So you could just parse out the prompt number, and find the corresponding
cell. Of course, that's not foolproof, e.g. if the cell is merged or split
after running it.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20130911/510fcf2d/attachment.html 

More information about the IPython-User mailing list