python profiling for a XML parser program

Paul Boddie paul at
Sat Sep 19 22:05:42 CEST 2009

On 19 Sep, 21:19, MacRules <MacRu... at> wrote:
> Is there a python profiler just like for C program?
> And tell me which functions or modules take a long time.
> Can you show me URL or link on doing this task?

Having already looked at combining Python profilers with KCachegrind
(as suggested by Andrew Dalke at EuroPython 2007), I discovered the
following discussion about the tools required:

I found the following script very convenient to generate profiler

You can then visualise the time spent by just passing the output file
to KCachegrind:

The map of time spent in each function is extremely useful, I find.


More information about the Python-list mailing list