|
From: Daniel W. <D.M...@wa...> - 2007-12-14 01:33:00
|
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 =3D string(default=3D'')
prefix =3D string(default=3D"")
prefix =3D string(default=3DNone)
and don't specify a value in the config file, then prefix is set to '',
"" or 'None' respectively. If I use
prefix =3D string(default=3D)
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]
--=20
Daniel Watkins (Odd_Bloke)
University of Warwick Christian Focus President
University of Warwick Computing Society WUGLUG Liaison Officer
|