On 10/15/07, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > > Pyflakes will tell you which imports aren't being used (among other > things). I don't know if an existing tool which will automatically > rewrite your source, though.
I'll second that recommendation of Pyflakes -- as the interpreter only lets you know about undefined names when the code is executed, I find Pyflakes really useful at finding missing imports (or other undefined names) as soon as possible. As I'm doing a lot of work with Django at the moment, which requires some configuration of the environment to run, the fact that Pyflakes reads the source without trying to execute any of it helps a great deal. Andrew. -- http://mail.python.org/mailman/listinfo/python-list