[Idle-dev] Re: config files

Guido van Rossum guido@python.org
Mon, 06 Mar 2000 08:26:47 -0500


[Randall Hopper]
> As IDLE is a Tkinter app, why not use the Tk mechanism for specifying
> resources? It's already generalized for cross-platform support.  On MSWin,
> the resources go in the tk.tcl file (according to Brent Welch in his Tcl/Tk
> book).  On UNIX, that translates into .Xdefaults (standard X resource cfg
> that newbies quickly learn).  The difference is abstracted by Tk and the
> app code is the same.

.Xdefaults quickly learnable by newbies?  You've got to be kidding.  I
am *stil* struggling with .Xdefaults. :-)

The real reason for going with our own config file syntax and location
is that we want to migrate to a system where the user can change the
configuration through a Preferences dialog.  Note that on Windows, no
user expects to be editing a text file with configuration information
-- they expect to find a Preferences or Options dialog in one of the
app's menus.

> Alternatively, Tkinter supports reading startup "profile" code (written in
> Python) for Tkinter apps.  The file loaded is based on the appname and
> classname passed to Tk() -- see Tkinter.py::readprofile() for details.

We considered this too -- and decided that the Python syntax gives too
much freedom for mistakes, and besides that we won't need it once we
have our preferences dialog.

--Guido van Rossum (home page: http://www.python.org/~guido/)