[Pythonmac-SIG] Determining the name of the "root" drive (startup disk)

Michael J. Barber mjb@uma.pt
Fri, 13 Sep 2002 09:03:12 +0100


On Friday, September 13, 2002, at 12:06  AM, Robin Siebler wrote:

> How can I do this for MacPython?
>
Pass the buck to AppleScript, where it is easy!

Python 2.2.1 (#134, Apr  9 2002, 21:16:52)  [CW CARBON GUSI2 THREADS GC]
Type "copyright", "credits" or "license" for more information.
MacPython IDE 1.0.1
 >>> import OSAm
 >>> OSAm.CompileAndExecute('tell app "Finder" to return the name of the 
startup disk')
'"Macintosh HD"'
 >>>

Hope that helps,
Michael