[Pythonmac-SIG] converting Mac 'path' to file path in appscript?
Daniel Lord
daniellord at mac.com
Fri Jun 20 15:48:25 CEST 2008
On Jun 19, 2008, at 21:33 PM, Ned Deily wrote:
> One way:
> mactypes.File.makewithhfspath(u'wolfe:downloads').path
>
> <http://appscript.sourceforge.net/py-appscript/doc/mactypes/
> index.html>
mactypes is a very useful module, it is how I get the selection in the
Finder via appscript whether using Python or PyObjC
def getFinderSelection():
"""List of aliases of selected items in the Finder"""
return [alias.path for alias in
app("Finder").selection.get(resulttype=k.alias)]
Daniel
More information about the Pythonmac-SIG
mailing list