[pypy-dev] This Week in PyPy 1

Martijn Faassen faassen at infrae.com
Tue Nov 15 17:29:06 CET 2005

Michael Hudson wrote:
> Import Analysis
> ===============
> In an effort to understand what code is used where in PyPy, Michael
> Hudson wrote a tool to analyse the import structure of PyPy,
> culminating in a several megabyte HTML report which you can find at:
>    http://starship.python.net/crew/mwh/importfunhtml/pypy/
> For example, this is a list of all the modules that reference
> pypy.objspace.flow.model.Constant (one of the more referenced 
> names in PyPy):
>    http://starship.python.net/crew/mwh/importfunhtml/pypy/objspace/flow/model/Constant.html
> Of course, this work ended up duplicating some of the things done by
> tools such as pylint and pyflakes and has the potential to be useful
> for projects other than PyPy, so I hope to clean it up and maybe make
> it a pylint plugin soon-ish.

Something possibly relevant but very special purpose is a tool I wrote 
called 'importchecker'. Its only purpose is to report on unused imports 
so that they can be removed from the codebase.


The files haven't been updated in a while, but it still works with 
Python 2.4 and I'm using it regularly. Of course if PyPy does too much 
importing magic it might not work...



More information about the Pypy-dev mailing list