"Serdar Tumgoren" <[email protected]> wrote

I was wondering -- is there a way to "watch" a program execute by
piping a report of its actions to standard output or to a file?

There are tools for doing that - Look! - is one I know that works for C++ and Java but I don;t know iof any freware ones or that work for Python.

Basically, I'd like to see the order that functions/methods are
executing as they happen, along with how long each one takes.

You can run it in any debugger and use the step into/step over buttons to walk through the code. But it is extremely tiresome! One of my colleagues once spent nearly two weeks stepping though some undocumented code we had been given to find out how it works. He was not a happy man.

If you do go that way I strongly recommend using a graphical front end like IDLE/Pythonwin/Eclipse(PyDev) etc.

Is this something cProfile would do, or is there another tool built
for that purpose?

Never come across cProfile but profiling tools generally just give you a report at the ed of what has been executed.

HTH,


--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to