[Pythonmac-SIG] Re: Per user dirs on Non-Unix platforms (was Re: [Python-Dev] Where to install non-code files) (fwd)

John W Baxter jwblist@olympus.net
Mon, 29 May 2000 10:29:00 -0700


At 17:32 +0200 5/29/2000, Peter Funk wrote:
>Let me try to explain 'some such' as follows:  data which is somewhat
>related to a particular user (e.g. personal preferences: adjustements
>which represent the personal taste of a user).  This data should not
>be lost,
>	1. if a new version of the software package is installed.
>or	2. if another user (e.g. a colleague) uses the computer.
>
>> And
>> these things should be done differently on the Mac anyway, so putting a
>>value
>> into HOME may do more harm than good.
>
>So let me ask: If differently: *HOW* should this things be done on the Mac?

One way would be to use Mac OS 9's multi-user feature (IF it is stable on
one's Macs, as it is not on my 8100).  Each different user login has its
own Preferences folder, own Documents folder, etc.  The OS call which
returns references to those folders and many others--which has been around
since 1991--returns the folders related to the current user when Mac OS 9
multi user is in use.  That is the FindFolder() function in the C/C++
APIs...I haven't examined that part of Mac Python to see how it is called
in Python.

Otherwise, you can use techniques similar to those used in the networking
area (except one...see below)...every networking-related control panel has
a Configurations... command in its File menu, wherein configurations can be
created and selected.  The Location Manager, in turn, and select the
configurations for a particular location.  (Location Manager was created
for laptops...hence the name; it later moved into the desktop machines.)

The exception to "every networking-related..." above is the Internet
control panel, which has the selection of "sets" in its main window.  These
function similarly.

-------
You could implement something similar to one or the other of those, without
concerns about Mac OS 9 Multi-User.  [Indeed, each Mac OS 9 multi-user
login's TCP/IP control panel--to pick a concrete example--has its own set
of configurations.]

------
Unfortunately (or fortunately), until Mac OS 9, a Mac was a "personal"
computer...it didn't have the concept of multiple users.  So outside of Mac
OS 9 multi-user, you'll have to devise a solution.

   --John

-- 
John Baxter   jwblist@olympus.net      Port Ludlow, WA, USA