[Kde-bindings] KConfigCompiler for Python

Dennis Malcorps dennis.malcorps at googlemail.com
Tue Aug 10 02:01:18 UTC 2010


Hello everyone,

I present you: PyKConfigCompiler [http://gitorious.org/pykconfigcompiler]

A program that generates Python source code from an xml and ini file.
PyKConfigCompiler is still in an very early state, there are no comments, no 
unit tests, but it does work with the right input^^

The program is written in Python, it's about halfway done. I know that there 
are kconfig_compiler and rbkconfig_compiler (the ruby code generator), but I 
didn't base my application on those mainly because: they are huge! seriously - 
1700 (ruby) / 2200(c++) lines of code in  a single file with almost no comments 
are quite difficult to read, I'm still trying to figure out some of the stuff 
that's going on inside of these programs...

Are the PyKDE guys actually interested in this? If yes, is it ok that my 
program is a Python application, or do I need to rewrite it in c++? 

Regards, Dennis


P.S:
If some one wants to test pykconfigcompiler, just get it from the git repo, cd 
into it and run: 
python kconfig_compiler.py tests/settings.kcfg tests/settings.kcfgc

When testing different options in the kcfgc file, be careful with changing the 
"NameSpace" value. the program will create a python package structure 
(creating folders and empty __init__.py files) if the "NameSpace" value 
contains a dot. It will probably eat little puppies, too. You have been 
warned!



More information about the Kde-bindings mailing list