python 2.5 and ast

Andrea Crotti andrea.crotti.0 at gmail.com
Wed Nov 30 13:03:35 EST 2011


Another thing about the AST, I am having fun trying to for example list 
out all
the unused imports.

I have already a visitor which works quite nicely I think, but now I 
would like
to get a way to find all the unused imports, so I need more visitors that
find out all the used names.

I didn't find too much documentation about these kind of things, so any
suggestions on how to approach?

Pylint and snakefood have similar code, but they use the old "compiler" 
module,
so it's not really helpful.




More information about the Python-list mailing list