Module dependency graph in Python 3

I presume you are talking about this snakefood, available on PyPI, though not not updated there since 2009. Since it is an application intended to be run, rather than just a library of modules intended to be imported, you can execute it with Python 2.7 even if the target is a directory of Python 3 modules. It could be run from either 2.x or 3.x with subprocess. Its output files can be read equally well with any Python.

I cloned it with hg clone --insecure <src> <dest>. My preliminary experiments indicate that very little change would be needed to run it with 3.x. I just needed the following in 2 of the 4 biggest files to get them to compile.

  • print x => print(x)
  • except XError, e: => except XError as e:

python3 dependency graphs generator

https://github.com/Trim21/snakefood3

I had the same question 3 years ago, so I forked snakefood and fixed it for Python 3.


I built a tool based on pydeps here.