PyEval_SetProfile usage ?

Salman Malik salmanmk at
Fri Jul 6 23:40:08 CEST 2012

Hi All,

I have used the Python's C-API to call some Python code in my c code and now I want to know how much time does my Python part of the program takes. I came across the PyEval_SetProfile API and am not sure how to use it. Do I need to write my own profiling function? 

Any pointer to examples or how to's will be much appreciated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list