[IPython-user] how to use line_profiler, %lprun
Mon Feb 9 17:30:31 CST 2009
I can't figure out how to use %lprun.
kernprof from the os command line works fine.
I have the two set-up lines in ipy_user_conf.py
I have script, say:
which is saved as test.py
%lprun -f foo test.py
no, that's not it.
the docstring has "<expression>" in it, not
"<name-of-script-to-profile>", so maybe
%lprun -f foo import test
but that's not it either.
I added the @profile decorator. No, not yet
does work with the decorator)
What's the right thing to do?
More information about the IPython-user