[Kde-pim] Python object that match or binding Settings object

Kevin Krammer kevin.krammer at gmx.at
Fri Aug 19 08:11:46 BST 2011


On Friday, 2011-08-19, Mario Santagiuliana wrote:
> In data 18/8/2011 12:39:32, Kevin Krammer ha scritto:
> > > Have you got any suggestions? Should I write my own python class to
> > > write and read xml data configuration?
> > 
> > You can do that or just use KConfig API for standard KDE key/value
> > store.
> 
> I try and try to use KConfigSkeleton:
> http://api.kde.org/pykde-4.5-api/kdeui/KConfigSkeleton.html
> 
> I can create a configuration, create object configuration, read items...but
> I can't write the configuration to a file and I don't understand why...
> 
> In attachment a simple example.
> 
> When I call the writeConfig() method I should view my config file in
> $HOME/.kde/share/config/name (name is the name that I pass to the
> constructor) isn't? But there is no file...
> 
> I write to Luca Beltrame, who write an article con python and kconfigxt and
> the example in kdeexamples.
> 
> It should be simple but it doesn't write...or maybe I am wrong...

One thing that looks wrong is the second parameter to addItemInt(). This 
should be a reference to a variable or class member, just like in 
addItemString().

You could try a subclass of the skeleton like in the article.

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110819/a55a374a/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list