I\'m trying to capture the resulting object of IPython Notebook magic function. Specifically %timeit
So the following code...
import tim
In the source file you linked to, the docstring shows the options for running the timeit magic function; one of which is returning an object result:
-o: return a TimeitResult that can be stored in a variable to inspect
the result in more details.
So, if you run
obj = %timeit -o somefunc()
obj
will reference the result object that was returned (hint: use tab completion on the object, that will show you the attributes it has).