Determining Dependencies

Greg Lindstrom gslindstrom at gmail.com
Thu Dec 6 14:48:40 EST 2007


Hello All-

I have a Python routine consisting of 75 or more files (most files house 1
object) and would like to know if there is an automated way to search though
the files and determine all of the (non-standard lib) modules required to
run the routine.  For example, looking in my base class I can see that I
need cx_Oracle and odbc, but there are many files to go through which
increases the chance for errors.

The flip side of this is that the code has gone through many revisions and I
would like to know if all of the modules being brought in are actually being
used in a given file.  If I'm not using it I don't want to bring it in.

Worst case is we go though each file manually.  I was just curious if there
is a better way.

Thanks,
--greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20071206/7cf8bb4d/attachment.html>


More information about the Python-list mailing list