On Tuesday 17 July 2007 08:01:41 am Michael Droettboom wrote:
> Gael Varoquaux wrote:
> > On Mon, Jul 16, 2007 at 10:31:03PM -0500, John Hunter wrote:
> >> I am happy to be the first at this point -- enthought has done a lot
> >> to support traits.  Traits has one of the most impressive pieces of
> >> technical documentation in the scientific python community.
> >
> > I am very happy to hear this. I have been using traits for lab work, and
> > it has been an absolute pleasure (ask Fernando, he has heard me express
> > my satisfaction over and over). I have converted a friend, here, in
> > France to traits for some software his company is developing, and every
> > body has been amazed at the results.
>
> I am happy to see this thread as well.  In a conversation with Perry
> Greenfield here yesterday, we both agreed that adding traits to
> matplotlib would be a good thing to devote some of our resources to.  If
> this thread has already fired others up, don't let us stop you, but
> let's coordinate efforts if possible.  The motivation from an STScI
> point of view is how it may make reworking the transforms system easier
> and more powerful.  It's also good to hear the positive reports about
> enthought Traits.
>
> I think the proposed roadmap makes sense: to start simple with rcParams
> and Artist and broaden out from there.  I also see there being (at
> least) two phases in how it is applied: first for data validation, and
> second taking advantage of "trait notification" where appropriate.

I will start working on this today. I am a little surprised by how much 
interest has grown since the last time it came up on the mailing list.

John, Eric, have you had a look at the way IPython1 handles config files? 
Here's a taste:
------------ configfiles/ipcontroller.py --------------
from ipython1.config.api import getConfigObject

controllerConfig = getConfigObject('controller')

# Now we can configure the controller

controllerConfig.listenForEnginesOn['ip'] = '127.0.0.1'
controllerConfig.listenForEnginesOn['port'] = 20000
--------------------------------------------------------------
and then
-------- ipython1/scripts/ipcontroller.py ----------
[...]
def main():
[...]
    config.updateConfigWithFile('ipcontrollerrc.py', options.ipythondir)
[...]
--------------------------------------------------------------

I'm really impressed with how readable and well organized the code is in 
ipython1. It looks like their approach to configuration has been carefully 
considered. Any chance we can follow their lead? It looks like it would be a 
good fit: we would define the config settings (and defaults) with traits 
somewhere like config.objects, import them in the rc file to be customized. I 
don't think we could automatically generate rc files with the ipython scheme, 
but thats probably not too important. In ipython's scheme, the config files 
are loaded using execfile, I wonder if that might appear unsafe to anyone? 
Fernando, did you have any concerns about using execfile?

Darren


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to