On Tuesday 11 December 2007 7:03:57 pm Gael Varoquaux wrote: > On Mon, Dec 10, 2007 at 08:23:57AM -0500, Darren Dale wrote: > > Hi Gael, > > > > On Monday 10 December 2007 3:58:48 am Gael Varoquaux wrote: > > > I am about to start a configuration file for mayavi's mlab, and I am > > > strongly considering mimicking matplotlib's way of doing things. > > > > > > I am almost sold to Fernando's TConfig, but I am not too sure how this > > > fits with the current rcParams dictionnary. Is there some code that I > > > could study to see how it's done? > > > > Look in matplotlib/config/mplconfig.py, there is a class called > > RcParamsWrapper that was designed to make the transition from rcParams to > > TConfig easy for both developers and users. It should make the > > relationship between the two pretty clear. > > OK, thanks. > > In the long run, what do you suggest I implement for mayavi2, an object > oriented interface (pure TConfig) or an dictionnary-like interface > (your RcParamsWrapper)? > > I am not too exited about your RcParamsWrapper because it is not > generated from the configuration object, and thus the info is duplicated, > but I guess you did this for backward compatibility reasons, and I could > use a canonical mapping from one to the other and do this automatically. > > I would like to proivde an interface that feels familiar to the user, > this is why I am looking closely at what MPL and ipython are doing.
RcParamsWrapper was created so we could get matplotlib working with the new config object without a massive rewrite of the entire library. The intention is to use the object-oriented interface internally, and to encourage users to do the same. RcParamsWrapper simply provides the upgrade path. Darren ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel