nextpython automatically searches the directories where the standard library modules are installed on your machine because these are always searchedthey normally do not need to be added to your pythonpath or included in path files (discussed nextpth path file directories (configurablenexta lesser-used feature of python allows users to add directories to the module search path by simply listing themone per linein text file whose name ends with pth suffix (for "path"these path configuration files are somewhat advanced installation-related featurewe won' cover them fully herebut they provide an alternative to pythonpath settings in shorttext files of directory names dropped in an appropriate directory can serve roughly the same role as the pythonpath environment variable setting for instanceif you're running windows and python file named myconfig pth may be placed at the top level of the python install directory ( :\python or in the sitepackages subdirectory of the standard library there ( :\python \lib\site-packagesto extend the module search path on unix-like systemsthis file might be located in usr/local/lib/python /site-packages or /usr/local/lib/site-python instead when such file is presentpython will add the directories listed on each line of the filefrom first to lastnear the end of the module search path list--currentlyafter pythonpath and standard librariesbut before the site-packages directory where third-party extensions are often installed in factpython will collect the directory names in all the pth path files it finds and will filter out any duplicates and nonexistent directories because they are files rather than shell settingspath files can apply to all users of an installationinstead of just one user or shell moreoverfor some users and applicationstext files may be simpler to code than environment settings this feature is more sophisticated than 've described here for more detailsconsult the python library manualand especially its documentation for the standard library module site--this module allows the locations of python libraries and path files to be configuredand its documentation describes the expected locations of path files in general recommend that beginners use pythonpath or perhaps single pth fileand then only if you must import across directories path files are used more often by third-party librarieswhich commonly install path file in python' site-packagesdescribed next the lib\site-packages directory of third-party extensions (automaticfinallypython automatically adds the site-packages subdirectory of its standard library to the module search path by conventionthis is the place that most thirdparty extensions are installedoften automatically by the distutils utility described in an upcoming sidebar because their install directory is always part of the module search pathclients can import the modules of such extensions without any path settings modulesthe big picture