|
From: Michael F. <fuz...@vo...> - 2007-12-15 14:17:46
|
Daniel Watkins wrote: > Hi guys, > > A couple of friends and I are writing an IRC bot, uChoob[0], and until > relatively recently were using ConfigParser. However, we found that it > didn't live up to our needs. As I'm a contributor to Bazaar, I took a > look at what they used, which brought us to ConfigObj. > > First of all, I'd like to thank you for an excellent project. It's > made life much easier for us. Part of what has made it particularly > easy is the validation and type marshalling that you do for us, through > validate.py. > > However, I'm running into problems when I want a string config option > to default to the empty string. If I use any of: > prefix = string(default='') > prefix = string(default="") > prefix = string(default=None) > and don't specify a value in the config file, then prefix is set to '', > "" Does this *not* mean that prefix is set to an empty string? If it *does* mean that then what actually do you want to happen? Michael http://www.manning.com/foord > or 'None' respectively. If I use > prefix = string(default=) > then no default is set and I get a validation error. > > Is there any way to get around this? > > > Cheers, > > Dan > > > [Footnote 0: This should actually be mu-Choob, but ANSI didn't think to > include the Greek alphabet in the 128 characters available > to them. :p] > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > 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://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > ------------------------------------------------------------------------ > > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > |