skip to navigation
skip to content

pycflow2dot 0.2

Create C call graphs from multiple source files using Cflow, producing linked PDF.


Draw call graphs for C source codes using dot and cflow. Typeset PDF with a page per source file and clickable cross-file function references.

cflow2dot -i hello_simple.c -f png produces:

from `hello_simple.c <>`__.


Draw the call graph of C source code using cflow and dot. Output to LaTeX, .dot, .PDF, .SVG, .PNG and from dot to all formats supported from it. The LaTeX output is obtained by including the SVG via Inkscape’s LaTeX export functionality.

Multi-file sources are converted to multiple SVG files, one for each source. These contain links using the LaTeX package hyperref, so that after compilation one can click on the name of a function call and be taken to its definition, even if that definition is in another page of the PDF, because the function is defined in another source file than the one corresponding to the current PDF page.

Note that if a file containing the definition is missing, then the hyperref link is omitted, so that no dead links result after compiling with LaTeX. This might be the case of for example the file with the definitions is available, but is not passed to pycflow2dot, e.g., for the purpose of focusing on a subset of the sources.

For now the LaTeX result has to be manually compiled, though this extra step will be automated in the future. Multi-SVG export will still be available, so that the results can be included in a larger document, e.g., a report.

PyCflow2dot is a Python port of the Perl script cflow2dot. Tested with Python 3.2 (NetworkX not yet available in 3.3.).


  • Python 2.7.* or 3.*
  • GNU cflow (e.g. port install cflow with MacPorts)
  • dot (port install graphviz)
  • networkx (port install py-networkx with MacPorts)
  • pydot (optional, port install py-pydot)
  • cpp (optional)


PyCflow2dot is licensed under the GNU GPL v3.

File Type Py Version Uploaded on Size
pycflow2dot-0.2.tar.gz (md5) Source 2014-03-28 7KB
  • Downloads (All Versions):
  • 1 downloads in the last day
  • 25 downloads in the last week
  • 106 downloads in the last month