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

Nicholas Riley njriley at uiuc.edu
Fri Oct 15 17:40:12 CEST 2004


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.

-- 
=Nicholas Riley <njriley at uiuc.edu> | <http://www.uiuc.edu/ph/www/njriley>


More information about the Pythonmac-SIG mailing list