[Pythonmac-SIG] "Launching" a file on a mounted server.
Bob Ippolito
bob at redivi.com
Thu Mar 17 22:59:05 CET 2005
On Mar 17, 2005, at 16:49, Stephen Hansen wrote:
> Hello all :) I'm in the progress of porting our Python program over to
> the Mac, and I've run into a snag or two.
>
> We're running Python2.3 on MacOSX 10.3
>
> I have two files: /Volumes/server/file1.jpg
> and: /Volumes/server/element/file2.jpg
>
> If I do: fs1 = Carbon.File.FSRef('/Volumes/server/file1.jpg')
> and: fs2 = Carbon.File.FSRef('/Volumes/server/element/file2.jpg')
>
> then if I use findertools.launch(fs1) it works, but
> findertools.launch(fs2) does not. It throws the following traceback:
I would suggest not using those functions at all. Either use the
LaunchServices module from Python23Compat (backported from Python 2.4),
or use the NSWorkspace methods in PyObjC (easier).
The findertools stuff is *ancient* API. God knows why it doesn't work,
but I'm not surprised in the least.
-bob
More information about the Pythonmac-SIG
mailing list