Linux/Unix > Python Essential Reference, Second Edition > 8. Modules and Packages > The Module Search Path | See All Titles

< BACK | Make Note | Bookmark | CONTINUE >

155117184014003188065099048180054212144238241179195140058238111161105087128010061196073087

### The Module Search Path

When loading modules, the interpreter searches the list of directories in `sys.path`. The following is a typical value of `sys.path`:

    ['', '/usr/local/lib/python2.0',
         '/usr/local/lib/python2.0/plat-sunos5',
         '/usr/local/lib/python2.0/lib-tk',
         '/usr/local/lib/python2.0/lib-dynload',
         '/usr/local/lib/python2.0/site-packages']

The empty string `''` refers to the current directory.

To add new directories to the search path, simply append them to this list.

| Last updated on 3/28/2002 Python Essential Reference, Second Edition, © 2002 New Riders Publishing

< BACK | Make Note | Bookmark | CONTINUE >

© 2002, O'Reilly & Associates, Inc.