| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/lib/python2.6/site-packages/packagekit/ |
Upload File : |
Ñò
¯séJc @ s d d d „ ƒ YZ d S( t PackagekitProgressc B sD e Z d Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( s¼
Progress class there controls the total progress of a transaction
the transaction is divided in n milestones. the class contains a subpercentage
of the current step (milestone n -> n+1) and the percentage of the whole transaction
Usage:
from packagekit import PackagekitProgress
steps = [10, 30, 50, 70] # Milestones in %
progress = PackagekitProgress()
progress.set_steps(steps)
for milestone in range(len(steps)):
# do the action is this step
for i in range(100):
# do some action
progress.set_subpercent(i+1)
print "progress : %s " % progress.percent
progress.step() # step to next milestone
c C s( d | _ g | _ d | _ d | _ d S( Ni ( t percentt stepst current_stept
subpercent( t self( ( s7 /usr/lib/python2.6/site-packages/packagekit/progress.pyt __init__- s c C s | i ƒ | | _ d | _ d S( s—
Set the steps for the whole transaction
@param steps: list of int representing the percentage of each step in the transaction
i N( t resetR R ( R R ( ( s7 /usr/lib/python2.6/site-packages/packagekit/progress.pyt set_steps3 s
c C s( d | _ g | _ d | _ d | _ d S( Ni ( R R R R ( R ( ( s7 /usr/lib/python2.6/site-packages/packagekit/progress.pyR <