[Pythonmac-SIG] additions to findertools?

Erik van Blokland erik@letterror.com
Mon, 27 Mar 2000 15:21:00 +0200


Ho;

I've looked at findertools.py and discovered that there is some very 
useful functionality hiding underneath that only needed to be discovered. 
The Finder_Suite contains a bunch of methods that I need and I've 
interfaced them in the same way as the rest of the findertools. 
Especially the reveal() is useful. These three new functions work through 
appleevents like the rest of the findertools:

def reveal(file):
	"""Reveal a file in the finder. Specify file by name or fsspec"""
	
def select(file):
	"""select a file in the finder. Specify file by name or fsspec"""
	
def update(file):
	"""update: Update the display of the specified object(s) to match their 
on-disk representation. Specify file by name or fsspec"""

The way findertools is structured makes it a bit awkward to subclass it 
and make my own seperate extended module. Perhaps a useful addition to 
findertools itself? 

The following function one works through macfs and perhaps doesn't belong 
in findertools because of that, but it's been useful as well. It sets the 
position of the icon of the file in its finder window. JvR explained to 
me that the macfs-way of getting and setting the position of an icon does 
not work for folders. So, being incomplete is perhaps another reason to 
not include it, but it's useful already. What to do?

def location(file, pt=None):
	"""location: set the location of a file in the finder. Specify file by 
name or fsspec"""

I'm also looking at the suites for the os9 Finder, hoping to find some 
more goodies. AppleEvents supposedly work over IP as well now, maybe 
interesting to run that from python. But that's another can of worms.

Erik