[IPython-User] statprof support?

Robert Kern robert.kern@gmail....
Wed Apr 11 09:40:29 CDT 2012

On 4/11/12 3:05 PM, Neal Becker wrote:
> Robert Kern wrote:
>> On 4/11/12 2:13 PM, Neal Becker wrote:
>>> I just noticed statprof on pypi.  Can I use it from ipython (easily)?
>> It looks like its interface is REPL-friendly no matter whether you are using
>> IPython or any other REPL.
> Which means??
> Sorry, I'm not familiar with ipython internals.  My question is, is there a
> simple way I can get ipython to use statprof instead of the standard profiler?
> I have installed the line_profiler, which adds an %lprun.  I was hoping for a
> %sprun.  But looking at the code for %lprun, it's not something I'd try to
> write.

Look at the documentation of statprof. It shows how to use it at a regular 
Python prompt. It should work exactly the same in IPython. It does not need a 
magic command.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco

More information about the IPython-User mailing list