On Wed, 2006-03-08 at 12:11 -0500, Kevin Dangoor wrote: > So, taking into account the various bits of input and the fact that > there would appear to be a problem with the new style configs and > Python 2.3, I'm going to change our config system over to using > ConfigObj. > > http://www.voidspace.org.uk/python/configobj.html
Only looking briefly, this looks like an extension of an .ini file, i.e. not a Python file. I think this is bad. ini files offer nothing over Python configs and in fact quite a bit less. As an example, say you have a database password with the character '@' in it (as so many do). You can't pass this as part of a URI without encoding it. With a Python config you can do that as part of the URI declaration. With an ini you'll need to encode it elsewhere and copy/paste it into your config. This is just one example that would be an immediate annoyance for me. I'm sure there are others. Basically using ini restricts you from calculating values within the config which I consider needlessly restrictive. Perhaps we could have a compromise: I see from the docs that you can programmatically write a config file from ConfigObj rather easily. Maybe start-project.py could check if the passed config file is a .py file and if so, assume that it will generate the appropriate config on the fly (so that 'start-project.py devcfg.py' would generate devcfg.ini which would then be used). Regards, Cliff > > This returns the format to the same as CherryPy's, but has additional > benefits. A key part of the TG 0.9 configuration change is that the > configuration is split into two files: application config (which lives > in your project's package) and deployment config. So, here's what I'm > proposing: > > 1) path() changes back to [] > 2) absfile() will change to some variable you can substitute in using > the %()s style that points to the absolute path of your project's > package. > 3) both config files go back to having .cfg extensions > > I'm also considering adding a config directory and breaking up the > configuration into separate files so that they don't become unwieldy. > I think there's going to be a lot more configuration possible (but not > required) in the future. > > I think that's about the extent of the user-visible part of the change. > > This change will also make moving to First Class easier. > > Kevin > > -- > Kevin Dangoor > Author of the Zesty News RSS newsreader > > email: [EMAIL PROTECTED] > company: http://www.BlazingThings.com > blog: http://www.BlueSkyOnMars.com > > -- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~----------~----~----~----~------~----~------~--~---

