[Pythonmac-SIG] Re: OSA compliance

Bill Bedford billpy@mousa.demon.co.uk
Fri, 20 Nov 1998 15:31:37 +0000


At 12:01 pm +0100 19/11/98, Jack Jansen wrote:

>
>What I would have liked was to be able to do things like the following
>in Python:
>   f = Finder()
>   for folder in f.OpenWindows:
>	if f.FolderName == 'blabla':
>		f.CloseWindow()
>(forgive the names, they're progbably wrong, no mac near at the
>moment). The point here is that it would be really nice if OSA object
>identifiers were first-class Python objects, which you could get the
>attributes of with the usual Python syntax, and on which you could
>call methods to invoke operations with direct objects.

I'm not sure that you meant this exactly, it implies that each application
become a separate python object type, no?

If we have an 'ae' object type which represents an application's aete then
we would have
	f = aeopen('finder')
	for win in f.Get(Container_window().folder())
		if win == 'blabla':
			f.Close(Container_window(win))

>
>But, I guess I won't have the time to work on this for the forseeable
>future:-(

Yep -- but getting here from PyScript doesn't look too difficult so I my
have a go when I get too bored with "real" work........................