[Pythonmac-SIG] Re: Pythonmac-SIG digest, Vol 1 #1205 - 15 msgs

Josh English english@spiritone.com
14 Sep 2002 11:11:02 -0700


Darn. I didn't think about that, since I only have one drive and the OSA
example didn't work. Apparently I don't have those modules installed on
my system.

I got the following error on my machine:
>>> import macfs
>>> vrefnum,dirid = macfs.FindFolder('macs')
Traceback (most recent call last):
  File "<input>", line 1, in ?
TypeError: function takes exactly 3 arguments (1 given)

I suspect this may have something to do with the fact that I am still on
Mac OS 9.1
A sys.version call returns '2.2 (#124, Dec 22 2001, 17:36:41)  [CW
CARBON GUSI2 THREADS GC]' on my machine.

Josh Englsih
English@spiritone.com

> 
> Subject: Re: [Pythonmac-SIG] Re: Determining the name of the "root" drive
> Date: Fri, 13 Sep 2002 21:14:59 +0200
> From: Jack Jansen <Jack.Jansen@oratrix.com>
> To: "Josh English" <english@spiritone.com>
> CC: pythonmac-sig@python.org
> 
> Close, but no cigar. Your currrent directory doesn't have to be
> on the startup disk.
> 
> The right way to tackle this (or, one of the right ways, as the
> OSA example showed:-) is to ask where the current system folder
> is, and use your code on that filename:
> 
> import macfs
> vrefnum, dirid = macfs.FindFolder('macs')
> fss = macfs.FSSpec(vrefnum, dirid, "")
> bootdiskname = fss.as_pathname().split(':')[0]
> 
> --
> - Jack Jansen        <Jack.Jansen@oratrix.com>