Distributing Python apps

Just van Rossum just at letterror.com
Mon Jan 6 13:48:29 EST 2003


Bjorn Pettersen wrote:

> [ ... ] It seems it might be useful to add a module to the library
> that emits the graph either through static analysis, or by logging
> imports during a run. Static analysis could probably catch 95% of the
> imports, and even with run-time logging you might be hosed if you
> don't execute the program path that imports a module. If you combine
> them I would think you'd get in the 99% range (which I think is quite
> acceptable for a language like Python).

Python 2.3a1 contains modulefinder.py (used to be part of the Freeze
package). It does static import analysis and keeps track of which
modules import which. It still needs to be documented, though... It only
misses imports done in exec statements and by __import__ calls.

Just





More information about the Python-list mailing list