[Kde-bindings] Re: KConfigXT compiler for Python

Richard Dale richard.dale at telefonica.net
Sun Oct 31 07:58:46 UTC 2010


On Saturday, October 30, 2010 10:52:55 pm Dennis Malcorps wrote:
> Hello everyone,
> 
> I just wanted to say that I am still alive and working on
> pykconfigcompiler. University kept me busy the last 2.5 month, but I found
> some spare time to start hacking again. Unfortunately I won't have much
> free time in the next weeks/months, so progress is going to be slow.
> 
> On Sunday, August 15, 2010 03:55:56 pm Simon Edwards wrote:
> > On a technical note, I don't know much about the kconfig stuff, but is
> > it possible to read kcfgc files directly at runtime and produce the GUI
> > on the fly without having to generate .py files at build time?
> 
> Well, kconfig (to be more precise: a subclass of kconfigSkeleton) doesn't
> produce a GUI, it is just a class that reads and writes configuration
> values to and from a given file. (like qsettings on steroids). It works
> quiet nice together with a kconfigdialog, so pykconfigcompiler, just like
> kconfigcompiler (c++) and rbkonficcompiler (ruby), generates that
> kconfigskeleton subclass from an xml file and an optional ini file.
> And to answer the actual question: Yes, this can be done at runtime :)
> 
> Am Sonntag 15 August 2010, 17:31:56 schrieb Richard Dale:
> > In my opinion we shouldn't need to have entirely seperate Ruby or Python
> > tools to handle the KConfigXT classes, [...] I'm just slightly sad that
> > we
> 
> may end up with
> 
> > completely different tools for each bindings language, instead of a
> > relatively simple way of changing the way the standard kconfigcompiler
> > generates code.
> 
> But isn't this the same situation for loading ui files? There is uic,
> pyuic, rbuic, which create code from an xml file, which can be done at
> runtime in python and ruby.
> Just as I don't want to write my ui class manually I don't want to write my
> kconfig class manually. Yeah, I'm lazy, I know^^
Yes, maybe you're right. Someone did post a patch on kde-core-devel to add 
ruby support to the standard kconfigxt compiler, but i didn't look at the code. 
I find the coding style of the compiler pretty unreadable (indents at 2 spaces 
+ curly braces on seperate lines) and couldn't help maintain the ruby support 
in it. So unless we had more than one bindings language in it, I think it 
would be more trouble than it's worth.

-- Richard



More information about the Kde-bindings mailing list