Finding Module Dependancies

mwt michaeltaft at gmail.com
Fri Apr 21 18:18:05 EDT 2006


When I'm rewriting code (cutting and pasting pieces from earlier
modules), is there a quick way to determine if I have imported all the
necessary modules? I am used to working in Java, where the compiler
will tell you if you haven't imported everything, and also Eclipse,
which has the handy "organize imports" feature. This is not the case in
Python, since it's not compiled, of course, and also running it might
not insure you've got all the imports, unless you go through every
possible usage scenario -- which in some cases is quite a few, and
could take a long time.

So what I'm looking for is a command, like "check dependencies" or
something, which will list all the modules needed for a source module
to run.




More information about the Python-list mailing list