[Pythonmac-SIG] converting Mac 'path' to file path in appscript?
Bill Janssen
janssen at parc.com
Thu Jun 19 23:05:51 CEST 2008
> > Here's an example:
> >
> >>>> app('Microsoft Word').active_document.path()
> > u'wolfe:downloads'
> >>>>
> >
> > That should be "/downloads".
> >
> > By the way, I'll update the appscript Wiki page with the answers I
> > get.
>
> Have a look at mactypes.File and mactypes.Alias:
> http://appscript.sourceforge.net/py-appscript/doc/mactypes/index.html
Thanks. I think you're suggesting that I could take the "path" and
turn it into a File, and use the "path" property of the File to get
the POSIX path. Would it be too much to ask for a one-liner showing
how to do that? Using TextEdit if you don't have Word?
Bill
More information about the Pythonmac-SIG
mailing list