Pull requests

#3 Merged
Repository
mforbes mforbes
Branch
default
Repository
robertkern robertkern
Branch
default

Add support for IPython cell blocks.

Author
  1. Michael Forbes
Reviewers
Description

This PR provides one additional fallback if the source file cannot be found - it tries to read the input from the IPython input history. This seems to work quite well for cell blocks, and allows profiling of functions defined in a notebook for example without requiring one to save the cells to a file.

Comments (2)

  1. Robert Kern repo owner

    Cool! We shouldn't need to pass around the IPython shell object. IPython helpfully stuffs linecache with the appropriate code. We just need to handle the actual-file case specially to use linecache.updatecache(filename) to make sure we have a fresh copy. Other than that, the rest of the code should work.