Announcemnet: PyGTK PackageKit

Category: Ubuntu

Recently I added support for asynchronous operations to the Python client of PackageKit. And on top of this a set of PyGTK widgets which make using PackageKit quite comfortable. The code is part of today's 0.3.10 release.

The following widgets help to visualise the status and progress of a transaction:

* PackageKitStatusIcon
* PackageKitStatusAnimation
* PackageKitStatusLabel
* PackageKitProgressBar
* PackageKitCancelButton - allows to cancel a running transaction
* PackageKitProgressDialog - provides an all-in-one solution of the above widgets
* PackageKitMessageDialog - presents messages and errors from PackageKit

Here you can see a video of the demo application in action. As a prove of concept I replaced the call of Synaptic in gnome-app-install by PackageKit. Here is the corresponding screencast.

The following code snippet installs the package xterm with a graphical progress dialog:

from packagekit.client import PackageKitClient
from packagekit.gtkwidgets import PackageKitProgressDialog
from packagekit.enums import *

def on_exit(trans, exit, runtime):
    '''Handle exit state of a transaction e.g. erros or EULAs'''
    pass
# Initialize the client
pk = PackageKitClient()
# Get packages which provide xterm
packages = pk.Resolve(FILTER_NONE, "xterm")
# Setup the transaction to install the first package
trans = pk.InstallPackages([packages[0].id], exit_handler=on_exit)
# Initialize the dialog window
dia = PackageKitProgressDialog()
# Connect the transaction to the dialog and run it
dia.set_transaction(trans)
dia.run()

The API is not yet set into stone. So I am open for comments and feedback!

 
  1. huang68 huang68

    Friday, 04-05-12 04:57

    Its excellent quality, affordable price. The products include speakers, beats by dre headphones, car audio. placed in the chest, legs micro bow, such as general sit-ups, trx get up and then lie down and repeat several times Physically poor or from lack of movement, quicken 2012 or to help hold down the instep in bowflex, so that up. Increase certificates, delete certificates, wow gold audit evidence. The user can arbitrarily set the library of the summary of their habits in free quicken. Addition Stretch your hands forward, insanity or light set back of the head, trx force kit can help the movement easily get up, but very suitable for the initial movement of the existing beer belly exercises by p90x. In addition to the direct certificate interface, enter the data through the certificate wizard, quicken software according to a summary of the different subjects, select the certificate wizard, insanity enter the amount, the system automatically generate a certificate beats studio earphones. A variety of product can be known manufacturers in the international fight a fight.
  2. cheap coach purses cheap coach purses

    Friday, 27-04-12 11:24

    How can i buy cheap coach purses, let me tell you the cheap designer bags and cheap designer sunglasses online store (salepursescheap), you can buy [url=http://www.salepursescheap.com]cheap coach purses[/url] and all name brand designer purses at lowest wholesale price, Enjoy the fastest freight and free shipping.
  3. che cheap coach purses

    Tuesday, 17-04-12 12:00

    The brand Coach is extremely popular around the whole for the fantastic handbags. cheap coach purses These are generally obtainable in traditional styles and beautiful colours, which are bound to make you captivated and also mesmerized. An essential truth about Chloe handbags for sale is that they are a distinctive combination of style, as well as functionality. cheap coach purses are usually of the finest option because they are composed of best fabric, silk along with leather. so do not hesitate.
  4. sofa bed sofa bed

    Sunday, 25-03-12 10:54

    Hello
    Announcemnet: PyGTK PackageKit
    Fantastic write-up, First-class story it is definitely, This important is just a tremendously nicely structured post
    Thank you!
  5. jersey jersey

    Wednesday, 14-03-12 09:16

1 2 3 4 5 6 7 8 9 10 Next
 

CAPTCHA image for SPAM prevention