I recommend using snakefood for creating graphical dependency graphs of Python projects. It detects dependencies nicely enough to immediately see areas for refactorisation. Its usage is pretty straightforward if you read a little bit of documentation.
Of course, you can omit the graph-creation step and receive a dependency dictionary in a file instead.