On Tuesday 24 July 2007 11:29:22 am Fernando Perez wrote: > On 7/24/07, Darren Dale <[EMAIL PROTECTED]> wrote: > > On Tuesday 24 July 2007 5:20:40 am Fernando Perez wrote: > > > Hi all, > > > > > > if anyone is still following, please update the tconfig work. Run > > > > > > ipython -wthread > > > %run mpltest.py > > > mplconf2.tconf.edit_traits() > > > > > > Edit to your heart's content. > > > > I can't get edit_traits() working on my machine, but I can do it with the > > command line. > > Bummer. It's nice to see that GUI for the whole of MPL running ;)
I know, I really wanted to see this. Are you using traits from http://code.enthought.com/enstaller/eggs/source/unstable? I think it has something to do with my wx, maybe I am out of date, using wx-2.6.3.3: /usr/lib/python2.5/site-packages/enthought.traits.ui.wx-2.0b2.dev_r12984-py2.5.egg/enthought/traits/ui/wx/ui_panel.py in create_label(self, item, ui, desc, parent, sizer, suffix, pad_side) 1000 control.help = item.get_help( ui ) 1001 sizer.Add( control, 0, self.label_flags | wx.ALIGN_CENTER_VERTICAL | -> 1002 pad_side, self.label_pad ) 1003 if desc != '': 1004 control.SetToolTipString( 'Specifies ' + desc ) /usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode/wx/_core.py in Add(*args, **kwargs) 11709 Appends a child item to the sizer. 11710 """ > 11711 return _core_.Sizer_Add(*args, **kwargs) 11712 11713 def Insert(*args, **kwargs): <type 'exceptions.TypeError'>: wx.Window, wx.Sizer, wx.Size, or (w,h) expected for item > > > You can then save changes via > > > > > > mplconf2.write() > > > > The mpltest.py script expects there to be an mplrc2.conf file, but it > > isnt in svn. So the script creates an empty mplrc2_copy.conf file, linked > > with a default MPLConfig, but if I change some properties of > > mplconf2.tconf, and then do mplconf2.write(), the mplrc2_copy.conf file > > remains blank. > > Are you sure? I just ran the test removing the mplrc.conf file from > my disk, and the mpnlrc2_copy.conf file is indeed created blank, but > after editing the tconf object and calling write(), I *do* get the > changes I make written to it. I can't reproduce your problem... I updated from svn. If mplrc.conf and mplrc2.conf are both present, I can run mpltest.py, change mplconf2.tconf.backend.use, call mplconf2.write(), and get a mplrc2_copy.conf that contains: # A hierarchical configuration include = 'mplrc.conf' [backend] use = 'WxAgg' if I delete mplrc.conf, and repeat the exercise, I get a blank mplrc.conf, and an mplrc2_copy.conf that contains: # A hierarchical configuration include = 'mplrc.conf' If I delete mplrc2.conf, and I make sure that mplrc2_copy.conf has also been deleted, the exercise yields a blank mplrc2_copy.conf. tconf2File works nicely. One comment, it is not indented like the files that are created by tconf.write(), where sections are indented and subsections are double-indented. > > If I copy mplrc.conf to mplrc2.conf, then I can run mpltest, change my > > tconf properties, call write(), and those changes do get updated in > > mplrc2_copy.conf. > > > > > ps - the auto-generated file now has all class docstrings as comments > > > as well as traits handlers info. It should be a pretty good start for > > > a manually tweaked one. > > > > I have not been able to auto-generate a default file. As above, the file > > is blank after writing. > > How are you trying to generate it? Does the printout on-screen at > least write a full config for you? It does. I was creating a RecursiveConfigManager with a string pointing to a file that does not exist, and then calling that manager's write() method. Darren ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel