UW AMath High Performance Scientific Computing
AMath 483/583 Class Notes
Spring Quarter, 2011

Table Of Contents

This Page

Importing Python modules

Python search path

When Python encounters an import command such as:

>>> import myfcns

it attempts to find a file myfcns.py in its search path. By default it looks in the current working directory first and then in various system libraries where Python modules are normally stored. You can tell it to look in other places by setting a Unix environment variable called PYTHONPATH.