On 7/19/07, Darren Dale <[EMAIL PROTECTED]> wrote:

> Damn, that is really cool. So you can generate default config files from the
> MPLConfig instance. We create a default matplotlibrc file from a template,
> setting default backend and numerix values based on what is available on the
> users system. It looks like it would be even easier with your scheme: import
> MPLConfig in setup.py, set the attributes, dump to a default config file.

Yup.  If you update, I just committed the last changes I can make to
this for now.  I need to switch gears (real work calls...), but this
stuff is mostly functional.  It needs a solid cleanup and my quick
tests to be moved into proper doc/unit tests, but I think it's looking
reasonably good.  The examples/tests part of the file shows exactly
what you are asking for.

> > In summary, I'm fairly happy with the results, and I think the benefit
> > is enough to convince me of falling in the embrace of the gods of
> > Traits.  It seems John is going for Traits as well, so perhaps we can
> > use this little config setup across our systems, and even make it
> > something that others use in the future.  I think there's value for
> > end users in having common, uniform configuration systems across the
> > various parts of the scientific python 'ecosystem'.
>
> I agree. It looks really elegant. What about the circular dependencies you
> mentioned in a previous email, is that still a potential problem?

Nope, gone (I think).  Since the config file is pure text, it will
never pull the main project's objects in via code.  One can allow a
config field to specify a file to execute *later*, once everything is
up and running, but the building of these config objects is going to
be strictly declarative via traits, so we should be OK.

Brian has more experience with those headaches than I, so he may still
spot issues with this, but I think this setup is looking very
reasonable.

Cheers,

f

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to