[Pythonmac-SIG] How to get OSX startup volume name?

Bob Ippolito bob at redivi.com
Fri Oct 15 17:46:23 CEST 2004


On Oct 15, 2004, at 11:40 AM, Nicholas Riley wrote:

> On Fri, Oct 15, 2004 at 12:06:59PM -0300, Bill Hutten wrote:
>> As the subject says - how do I do this?  I assume I'm missing 
>> something
>> obvious...
>
> Typically you'd use CFURLCopyFileSystemPath with kCFURLHFSPathStyle,
> or FSGetCatalogInfo, but neither of these are wrapped in Python that I
> can see.  If you have PyObjC installed, you could do:
>
> Foundation.NSFileManager.defaultManager().displayNameAtPath_('/')
>
> although it's possible that name could be a localized variant.

FSGetCatalogInfo is wrapped by Python.. it's a method of FSRef.

-bob



More information about the Pythonmac-SIG mailing list