11

Do you know an integrated tool that will generate the call graph of a function from Python sources? I need one that is consistent and can run on Windows OS.

ire_and_curses
70.6k24 gold badges120 silver badges141 bronze badges
asked Jul 10, 2009 at 7:09

3 Answers 3

10

You could try with PyCallGraph
From its documentation:

Python Call Graph works with Linux, Windows and Mac OS X.

Otherwise, you can directly do it on your own, using the traceback module:

import traceback
traceback.print_stack()
answered Jul 10, 2009 at 7:16
Sign up to request clarification or add additional context in comments.

2 Comments

This can help but I'm looking for a somewhat graphical code navigation/inspection.
I think PyCallGraph might just do the job.
9

PyCallGraph produces the dynamic graph resulting from the specific execution of a Python program and not the static graph extracted from the source code. Does anybody know of a tool which produces the static graph?

Asclepius
64.7k20 gold badges188 silver badges165 bronze badges
answered Apr 28, 2012 at 18:40

Comments

6

What about pycallgraph, it's a Python module that creates call graphs for Python programs. It works on windows. Just download graphviz and pycallgraph, pycallgraphs's source tarball has some examples.
Hope this helps

answered Jul 10, 2009 at 7:20

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.