[Pythonmac-SIG] findertools.launch reports "no eligible process"

Ronald Oussoren ronaldoussoren at mac.com
Fri Jun 8 10:49:04 CEST 2007


 
On Friday, June 08, 2007, at 09:55AM, "Drew Houston" <drew at getdropbox.com> wrote:
>hi there,
>
>i was wondering if anyone else has seen this behavior with the 
>findertools.launch() function. the docs indicate that when given a 
>pathname, launch(path) will launch a Finder window with that path. but 
>when i try to launch any valid path i get this error:

Please file a bug at http://sourceforge.net/projects/python, this seems to be yet another byteorder bug in the OSA support in the core python distribution.

Findertools seem to work correcty on PPC, but fails on Intel systems. The session below forces a run of the PPC version of python on my macbook:

ronald at rivendell[0]$ /usr/libexec/oah/translate /Library/Frameworks/Python.framework/Versions/Current/Resources/Python.app/Contents/MacOS/Python 
Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04) 
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.byteorder
'big'
>>> import findertools
>>> findertools.launch("/tmp")
>>> 

This does indeed open the /tmp folder in the finder.


BTW. appscript (http://appscript.sourceforge.net/) is in general a much more useful OSA/AppleScript interface for use in python.

>
> >>> os.path.exists("/Users/drew/Documents")
>True
> >>> findertools.launch("/Users/drew/Documents")
>Traceback (most recent call last):
>  File "<stdin>", line 1, in ?
>  File 
>"/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/plat-mac/findertools.py", 
>line 45, in launch
>    return finder.open(fss)
>  File 
>"/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/plat-mac/lib-scriptpackages/Finder/Standard_Suite.py", 
>line 248, in open
>    _arguments, _attributes)
>  File 
>"/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/plat-mac/aetools.py", 
>line 226, in send
>    return self.sendevent(self.newevent(code, subcode, parameters, 
>attributes))
>  File 
>"/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/plat-mac/aetools.py", 
>line 220, in sendevent
>    self.send_timeout)
>MacOS.Error: (-600, 'no eligible process with specified descriptor')
> >>>
>
>i get the same error across reboots, on real hardware (x86) or a VM; 
>from a Terminal window or IDLE; with directories or files or 
>applications, etc. -- all this -600 error; (if i specify an invalid path 
>i do get a file not found error.) i mostly come from windows land (and 
>basically looking for a stand-in for ShellExecute), so if i'm doing 
>something horribly wrong please let me know :)
>
>i'm using OS X 10.4.9 and MacPython 2.4.4 and can't think of anything 
>unusual that might be causing it. (killing the finder and restarting it 
>also does not help; the process is certainly running.)
>
>thanks!
>
>drew
>
>_______________________________________________
>Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
>http://mail.python.org/mailman/listinfo/pythonmac-sig
>
>


More information about the Pythonmac-SIG mailing list