B.3 Macintosh-Specific Information

B.3 Macintosh-Specific Information

The Macintosh platform also supports Python fully, thanks mostly to the efforts of Jack Jansen. There are a few Mac-specific features worth knowing about. First, you can make applets out of scripts, so that dropping a file on the script is the same as running the script with the dropped file's name in sys.argv . Also, Just van Rossum (yes, Guido's brother) wrote an Integrated Development Environment for Python on the Mac. It is included in the distribution, but the latest version can always be found at http://www.python.org/download/download_mac.html. A sample screenshot of Just's debugger in action is shown in Figure B.2.

Figure B.2. Screenshot of the Macintosh IDE's debugger in action
figs/lpy_ab02.gif

Also, there are several modules that provide interfaces to Mac-specific services available as part of the MacPython distribution. These include interfaces to Apple Events, the Component, Control, Dialog, Event, Font, List, and Menu Managers, QuickDraw, QuickTime, the Resource, Scrap and Sound managers, TextEdit, and the Window Manager. Also covered (and documented in a supplement to the library reference available at http://www.python.org/doc/mac/) are interfaces implementing the os and os. path modules, interfaces to the Communications Tool Box, the domain name resolver, the FSSpec, Alias Manager, finder aliases, and the Standard File package, Internet Config, MacTCP, the Speech Manager, and more.



Learning Python
Learning Python: Powerful Object-Oriented Programming
ISBN: 0596158068
EAN: 2147483647
Year: 1999
Pages: 156
Authors: Mark Lutz

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net