Monitor module imports?

Delaney, Timothy tdelaney at avaya.com
Sun Oct 13 21:50:01 EDT 2002


> From: Avery Andrews [mailto:andrews at pcug.org.au]
> 
> Does anyone know an easy way to record the modules that a 
> Python program
> is loading - the profiler records the Python ones but not extension
> modules.  What I'm interested is the possibility of producing 
> 'MiniPy's
> that contain only the stuff needed to run a given application.

Have a look at the __import__ builtin.

Tim Delaney




More information about the Python-list mailing list