[Tutor] visualizing code structure / flow charting

Kent Johnson kent37 at tds.net
Tue Nov 6 13:36:51 CET 2007

Timmie wrote:
> Hello,
> I am stepping forward into learning python and write my first programs now.
> To facilitate my development I have a question:
> Is there a tool which I can run on my code and then get a flow chart from it or
> visualize its structure in another form?

http://pycallgraph.slowchop.com/ will show the call graph
epydoc 3.0 can create a variety of graphics including call graph, 
package diagram and class diagrams:

Stepping through code in a debugger is a good way to understand it. 
Winpdb is a good choice:

> Is there any solution that can be used without leaning UML?

UML is pretty much the standard these days for representing class structure.

But if you are just learning Python and you are writing the programs 
that you are trying to understand, I don't know why you need these kinds 
of tools. You shouldn't be writing code that you need a flow chart 
generator to understand! Maybe you need to slow down a little and write 
programs that you do understand first? Or perhaps use a debugger to help.

You can ask specific questions here, if there is a bit of code you are 
struggling with.


More information about the Tutor mailing list