Set Creator and Double Click

If the script that you want to launch has the appropriate Creator Code and File Type you can simply double-click on the script to launch it. To be ``double-clickable'' a file needs to be of type "TEXT", with a creator code of "Pyth".

Setting the creator code and filetype can be done with the IDE (see sections 1.3.2 and 1.3.4), with an editor with a Python mode (BBEdit) - see section 1.2.4, or with assorted other Mac utilities, but a script (fixfiletypes.py) has been included in the MacPython distribution, making it possible to set the proper Type and Creator Codes with Python.

The fixfiletypes.py script will change the file type and creator codes for the indicated directory. To use fixfiletypes.py:

  1. Locate it in the scripts folder of the Mac folder of the MacPython distribution.

  2. Put all of the scripts that you want to fix in a folder with nothing else in it.

  3. Double-click on the fixfiletypes.py icon.

  4. Navigate into the folder of files you want to fix, and press the ``Select current folder'' button.

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