List Info

Thread: Re: findertools.launch reports "no eligible process"




Re: findertools.launch reports "no eligible process"
country flaguser name
Canada
2007-06-08 06:19:14
Ronald Oussoren wrote:

>> 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://sourcef
orge.net/projects/python, this  
> seems to be yet another byteorder bug in the OSA
support in the  
> core python distribution.

You might add a note that since findertools uses aetools
which is  
[over]due for deprecation, findertools should be deprecated
as well.

Anyway, simplest solution here is:

	import subprocess
	subprocess.call(['open', '/Users/drew/Documents'])

Or you can do it with appscript if you prefer:

	from appscript import *
	from mactypes import Alias

	path = '/Users/drew/Documents'

	app('Finder').items[Alias(path)].open()

has
-- 
http://appscript.sou
rceforge.net
http://rb-appscript
.rubyforge.org

http://appscript.sourceforge.net/objc-appscript.html

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIGpython.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: findertools.launch reports "no eligible process"
country flaguser name
United States
2007-06-08 07:55:55
has wrote:
> Anyway, simplest solution here is:
> 
> 	import subprocess
> 	subprocess.call(['open', '/Users/drew/Documents'])

or
import open
os.system('open /Users/drew/Documents')

Kent
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIGpython.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: findertools.launch reports "no eligible process"
country flaguser name
Netherlands
2007-06-08 16:34:38

On  8-Jun-2007, at 13:19 , has wrote:
You might add a note that since findertools uses aetools which is  
[over]due for deprecation, findertools should be deprecated as well.

[...]
Or you can do it with appscript if you prefer:

from appscript import *
from mactypes import Alias

path = '/Users/drew/Documents'

app('Finder').items[Alias(path)].open()

Problem with deprecating aetools is that there is a truckload of modules that depend on it, findertools among them. I'd love to rewrite them to use appscript, and it wouldn't even be all that much work, but I simply don't have the time (and probably won't have the time in the coming few years).

--

Jack Jansen, <Jack.Jansencwi.nl>, http://www.cwi.nl/~jack

If I can't dance I don't want to be part of your revolution -- Emma Goldman



[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )