mirror of
https://bitbucket.org/smil3y/kde-playground.git
synced 2025-02-23 18:32:51 +00:00
19 lines
1 KiB
Text
19 lines
1 KiB
Text
This is a slightly incomplete example of using the PolkitQt support in
|
|
PyKDE4 (KDE 4.3 and higher) The PolkitQt has a good example which
|
|
demonstrates what you can do with it. pyexample.py and pyexamplehelper.py
|
|
are Python replacements for the C++ versions used in the example.
|
|
|
|
If you want to run this code, first build and install the example in
|
|
PolkitQt. pkexample.py is the easiest one to run. It should work fine with
|
|
C++ backend. If you manually run the pkexamplehelper.py as root you can also
|
|
test out the Python example back end. (You'll have to 'kill' afterwards as
|
|
it won't shut down by itself).
|
|
|
|
The two Python replacements are very similar to their C++ counterparts. The
|
|
biggest difference is in pyexamplehelper.py. PyQt4 doesn't support QDBus.
|
|
But it does support using the standard DBus Python bindings with PyQt4.
|
|
pyexamplehelper.py uses PolkitQt for the authorization check in combination
|
|
with the standard DBus Python bindings, with no loss of functionality.
|
|
|
|
--Simon Edwards <simon@simonzone.com>
|
|
21 June, 2009
|