ASPN ActiveState Programmer Network
  ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups | Web Services
SEARCH
advanced | search help

Reference
ActivePython 2.4
Python Documentation
Macintosh Module Reference
2. MacPython Modules
2.1 macpath -- MacOS path manipulation functions
2.2 macfs -- Various file system services
2.3 ic -- Access to Internet Config
2.4 MacOS -- Access to Mac OS interpreter features
2.5 macostools -- Convenience routines for file manipulation
2.6 findertools -- The finder's Apple Events interface
2.7 EasyDialogs -- Basic Macintosh dialogs
2.8 FrameWork -- Interactive application framework
2.9 autoGIL -- Global Interpreter Lock handling in event loops

MyASPN >> Reference >> ActivePython 2.4 >> Python Documentation >> Macintosh Module Reference >> 2. MacPython Modules
ActivePython 2.4 documentation

2.6 findertools -- The finder's Apple Events interface

Availability: Macintosh.

This module contains routines that give Python programs access to some functionality provided by the finder. They are implemented as wrappers around the AppleEvent interface to the finder.

All file and folder parameters can be specified either as full pathnames, or as FSRef or FSSpec objects.

The findertools module defines the following functions:

launch( file)
Tell the finder to launch file. What launching means depends on the file: applications are started, folders are opened and documents are opened in the correct application.

Print( file)
Tell the finder to print a file. The behaviour is identical to selecting the file and using the print command in the finder's file menu.

copy( file, destdir)
Tell the finder to copy a file or folder file to folder destdir. The function returns an Alias object pointing to the new file.

move( file, destdir)
Tell the finder to move a file or folder file to folder destdir. The function returns an Alias object pointing to the new file.

sleep( )
Tell the finder to put the Macintosh to sleep, if your machine supports it.

restart( )
Tell the finder to perform an orderly restart of the machine.

shutdown( )
Tell the finder to perform an orderly shutdown of the machine.
See About this document... for information on suggesting changes.

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState 2004 All rights reserved