Getting the dependencies of a function from a library

Barry Scott barry at barrys-emacs.org
Tue Apr 21 15:54:38 EDT 2020



> On 20 Apr 2020, at 22:40, elisha hollander <just4now666666 at gmail.com> wrote:
> 
> I have a python library with a function.
> This function call some other functions, classes and variable from the
> library (and those functions and classes call other ones, etc)...
> Can I automatically create a file with all of the dependencies (and nothing
> else)?
> (Already posted on stack overflow with no answer)

Are you after code coverage? Try this https://pypi.org/project/coverage/ 

Then there is cProfile, part of python stdlib, that shows what was run and how often.

Barry



More information about the Python-list mailing list