Yurttas/PL/SL/python/docs/core-python-programming/doc/20/mac/search-path.html

From ZCubes Wiki
Revision as of 20:07, 7 November 2013 by MassBot1 (talk | contribs) (Created page with "<div class="navigation"> {| width="100%" cellspacing="2" align="center" | yurttas/PL/SL/python/docs/core-python-programming/doc/20/mac/EditPythonPrefs.html|[[Image:yurt...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


1.7.2 Adding modules to the Module Search Path

When executing an import statement, Python looks for modules in places defined by the sys.path To edit the sys.path on a Mac, launch EditPythonPrefs, and enter them into the largish field at the top (one per line).

Since MacPython defines a main Python directory, the easiest thing is to add folders to search within the main Python directory. To add a folder of scripts that you created called ``My Folder'' located in the main Python Folder, enter "$(PYTHON):My Folder" onto a new line.

To add the Desktop under OS 9 or below, add "StartupDriveName:Desktop Folder" on a new line.


See About this document... for information on suggesting changes.