[Pythonmac-SIG] AppleEvents in MacPython 2.3?

Bob Ippolito bob at redivi.com
Mon Aug 11 19:15:52 EDT 2003


On Monday, Aug 11, 2003, at 17:47 America/New_York, Larry Meyn wrote:

> On a related subject of colon separated AppleScript paths, how does 
> one get the name of the root disk for generating absolute  OS 9 style 
> (colon separated) paths?  The abspath function from the macpath module 
> doesn't work under OS X , because it uses os.getcwd() which returns a 
> "/" delimited path.  Are some nice functions that someone has written 
> that can convert between the two path styles under OS X?

import Carbon.File
print Carbon.File.FSRef('/').FSGetCatalogInfo(0)[1]
# looks like the full unicode name for the volume.. but maybe OS9 colon 
paths use the FSSpec paths?

I only know about the OS9 APIs from very very very limited experience 
with C on the mac a few years ago (porting director xtras).. so I 
wouldn't take stuff I say as authoritative on the subject.

-bob




More information about the Pythonmac-SIG mailing list