1.2.5.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.

Vedete Circa questo documento... per informazioni su modifiche e suggerimenti.