[Pythonmac-SIG] converting Mac 'path' to file path in appscript?

Henning Hraban Ramm hraban at fiee.net
Thu Jun 19 22:01:28 CEST 2008


Am 2008-06-19 um 20:15 schrieb Bill Janssen:

> Can someone tell me how to convert the old Classic-style paths
> returned from many of the appscript properties to real OS X file
> paths?  Is there some appscript constructor which takes a path
> as an argument and returns a Unix path?
>
> 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


Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net
https://www.cacert.org (I'm an assurer)





More information about the Pythonmac-SIG mailing list