![]() Registered Member ![]()
|
Hi All,
I am new to KDE development, and am trying to create a simple app that simply reads a username/password and stores it in KWallet. I keep getting the following error:
Now the simplest code I can get to demonstrate this is the following:
My operating system is Fedora 10, running KDE4. python: 2.5.2 (32.fc10) glibc: 2.9 (3) PyKDE4: 4.2.4 (2.fc10) Any help appreciated - it's frustrating being stumped by a blocker on line 26 of a new program! |
![]() Administrator ![]()
|
Possibly because you haven't called KApplication->exec() so the event loop hasn't started?
|
![]() Registered Member ![]()
|
Ah - ok. I would try that, except that exec is a reserved word in Python... Does anyone know the PyKDE4 equivalent? Interestingly though, the following Hello World app works fine, and I would have thought it would have had the same problem given that app.exec() (or equivalent) is not called:
Cheers. |
![]() Administrator ![]()
|
MessageBoxes are likely not affected since they do not require a connection to the DBus session server to use. Communicating with KWallet does require a connection however, and that is estabilished by KApplication.
Unfortunately I don't know anything about PyKDE4. You may wish to look at the printer applet, since that uses PyKDE4. Alternately you could ask on the KDE Bindings mailing list. If you know what call is done for PyQt4, then it is likely the same. |
![]() Registered Member ![]()
|
Thanks for the pointer to the printer applet. Looks like the call is app.exec_(). Typical - I'd tried app._exec() without success (should have known really, since a leading underscore is python convention for a private method...)
Will try it out tonight. |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]