[Pythonmac-SIG] How to get OSX startup volume name?
Bob Ippolito
bob at redivi.com
Fri Oct 15 17:45:38 CEST 2004
On Oct 15, 2004, at 11:06 AM, Bill Hutten wrote:
> As the subject says - how do I do this? I assume I'm missing something
> obvious...
There are plenty of other ways but this is the one that occurred to me
first that does not require PyObjC:
import Carbon.File
startupVolumeName = Carbon.File.FSRef('/').FSGetCatalogInfo()[1]
and here is a PyObjC example:
from Foundation import *
startupVolumeName =
NSFileManager.defaultManager().displayNameAtPath_(u'/')
-bob
More information about the Pythonmac-SIG
mailing list