First page Back Continue Last page Overview Graphics

The Module Search Path

Python's module search path consists of the following directories:

Finding out where a module is located:

>>> import numpy

>>> numpy.__file__

'/usr/lib/python3/dist-packages/numpy/__init__.py'

>>> import random

>>> random.__file__

'/usr/lib/python3.2/random.py'