[Pythonmac-SIG] RE: [Proposal] changing the preferences storage mechanism

Schollnick, Benjamin Benjamin.Schollnick@usa.xerox.com
Fri, 19 Oct 2001 07:51:00 -0400


Sorry, I must of missed this thread previously...

Is there any particular reason for changing from the current implementation?

And maybe I'm just being a fool here... 

But is there some reason that the preferences could not be stored in a
already
python established configfile (ini style file)?

That way, it's human readable, and modifiable?

Plus, that also gives us a uniform method across Classic Mac Python & Mach-O
Python.

Now, since I'm not sure what preference(s) exactly we are talking about, I'm
not sure
if this is suitable.

Plus, if these variables are required during startup of Mac Python, then a
configfile
probably isn't available, since Mac Python hasn't completed it's startup....

But, it's a thought....

(Geeez, how about tagging these conversations with a [dev] or [maybe
interesting to ben] in the
subject line, so that I'll be sure to pay attention... This is the second
thread that
I've entered at the *end* of it... <grin> )

			- Benjamin
-----Original Message-----
From: Alexandre Parenteau [mailto:alexp@strata.com]
Sent: Thursday, October 18, 2001 8:15 PM
To: MacPython
Subject: [Pythonmac-SIG] [Proposal] changing the preferences storage
mechanism


[Repost, sorry if it appears twice, I didn't send it with the good account
the first time]

Jack,

As described previously in this thread, I was proposing 2 changes to
MacPython. The first one you did integrate (cool) and this is the second
one.

It is intended to replace the current mechanism to store the MacPython
preferences. I detail in the patch the motivations for doing so.

I didn't know if you wanted me to the implement this one. You told me you
were concerned by how to do it since it goes deep inside MacPython. So I
didn't do something complete, I just concentrated on making the under
mechanism so you have "only" to hook it up and replace the current system. I
posted it at SourceForge.

Now in order to use it, you'll probably want to add that in macconfig.c :

extern void initMacPersistent();

    {"MacOS", initMacOS},
>     {"MacPersistent", initMacPersistent},
    {"regex", initregex},

Then add the file MacPersistent.cpp and then run the sample.

Hope you like it, please tell me if I can help some more.

Regards,
Alex.

P.s.: sorry for posting messages in the wrong thread (i.e. Mach-o Python and
GUSI Yielding), but that's me :-)


_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig