> If you mean that abook can *not* read a configuration file as written by
> the default behavior of configobj, then this is not really an "issue".

OK, I guess that's what I meant. configobj writes " = " (spaces around equal
sign), and abook will not be able to properly read such an addressbook. I
was using python to do some batch editing of my addressbook, and came across
this. I ended up adding a couple of lines to my python code to remove these
spaces afterwards, and forgot about it (instead of maintaining and patching
the abook package of my operating system).
> 
> 
> So, to summarize:
> 
> 1) if you had some (common ?) use-cases in mind, please share here

The use-case would be just that, i.e. enable some batch processing using
python configobj. But in the end, I ended up using a work-around anyway. And
in the end, maybe that's just as well. You'd  already be writing code to modify
the addressbook.

> 2) While a 10 more lines seems ok for now, could you please also confirm
>    that supporting space/tab would be enough to cover most of these common
>    use-cases without further modification (which would then make
>    parse_database() needlessly over-complicated over the time) ?

When reading my 500 entry addressbook (with some custom fields) into
configobj and then writing it out, the only change is the spaces around the
"=" and that configobj enforces a space after a comma (in the value).
Essentially:

  "country=se,tr"  ->  "country = se, tr"

So, perhaps that's yet another issue.

> 3) is there any reason configobj can't write a configuration file
>    without (these useless) blanks around the "=" sign ?
>    I guess that would solve the issue as well isn't ?
>    (this is what we could expect from an ini-format specific lib)

No, I seems it can't.

I think I concur with you. Adding more complexity to abook's addressbook
parser is unnecessary. Such things are very easily done in python and other
high-level languages. And configobj can indeed _read_ the current format
anyway.

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Abook-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/abook-devel

Reply via email to