block by jacquestardie 3f8ab55eaceca7564e4a

3f8ab55eaceca7564e4a

Quick idea to understand what modules get imported.

Example:

>>> import importlog

# Run a bunch of code
>>> import shapely.geometry
>>> p = shapely.geometry.Point(0.0, 0.0)
>>> b = p.buffer(1.0)

# See which modules were imported.
>>> importlog.modules
{'array',
 'ctypes',
 'difflib',
 'future_builtins',
 'numbers',
 'numpy',
 'shapely',
 'unittest'}

importlog.py