|
From: Michael F. <fuz...@vo...> - 2011-05-02 22:08:50
|
On 07/04/2011 18:07, L. Canessa wrote: > Hello all, > > I wanted to make one configuration specification file for multiple > versions of the configspec. That way as the requirements of the > configspec change, only one configspec has to be updated and it will > still work with the old and new specs. > > Right now I have the configspec in the following format: > > specVersion = float(min=0.0) > > # Common among all versions > [common] > id = integer(min=0) > ... > > # Specific to Spec Version .2 > [.2] > width = integer() > > #specific to spec version .1 > [.1] > height = integer() > > > The issue I have is that I don't think I can write a custom validate > function to only validate the needed sections. > Is it not possible for me to do this? Will I just have to make > different configspec files and load them based on what specVersion is? > Hello Leonardo, Sorry for the late reply. My daughter has just been born so life has been kind of hectic recently. ConfigObj has no support for multiple configspec versions, so I think you'll need several different configspec files and select them depending on which version you need (as you suggest). All the best, Michael Foord > Does this even make sense?! > > Thank you for your help, > Leonardo > > > ------------------------------------------------------------------------------ > Xperia(TM) PLAY > It's a major breakthrough. An authentic gaming > smartphone on the nation's most reliable network. > And it wants your games. > http://p.sf.net/sfu/verizon-sfdev > > > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop -- http://www.voidspace.org.uk/ May you do good and not evil May you find forgiveness for yourself and forgive others May you share freely, never taking more than you give. -- the sqlite blessing http://www.sqlite.org/different.html |