PolicyKit from Python

David Zeuthen david at fubar.dk
Thu Feb 7 06:43:40 PST 2008


Hi,

Sorry for the lag, have been on vacation since Jan 19 and won't return
back home until late next week.

On Mon, 2008-02-04 at 01:21 +0100, Murray Cumming wrote:
> Hi. Sorry for the direct email, but I can't google up a PolicyKit
> mailing list, or even a website. Feel free to CC any reply.

Yeah, the hal list. I've added it as Cc.

> Do you happen to know if there are already PolicyKit (and
> policykit-gnome) python bindings?

Nope, not yet. Though with 0.7 the main functionality is expressed via a
D-Bus system bus service too 

http://gitweb.freedesktop.org/?p=PolicyKit.git;a=blob;h=4539043c84c34df7745c9524af58b7fe60d24862;hb=4cfb96627a5afbe34c0bc583bdcf4caf306bf1a5;f=polkitd/org.freedesktop.PolicyKit.xml

Basically what you want is IsProcessAuthorized(); the rest of the 400
symbols in libpolkit.so are just for optimizations ;-).

For PolicyKit-gnome I don't have any good answer. It's only 2-3 classes
so it should be easy to bind. But I've never written bindings myself so
I could be wrong.

Thanks,
David




More information about the hal mailing list