403Webshell
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/site-packages/packagekit/progress.pyc
Ñò
¯séJc@sddd„ƒYZdS(tPackagekitProgresscBsDeZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(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

    cCs(d|_g|_d|_d|_dS(Ni(tpercenttstepstcurrent_stept
subpercent(tself((s7/usr/lib/python2.6/site-packages/packagekit/progress.pyt__init__-s			cCs |iƒ||_d|_dS(s—
        Set the steps for the whole transaction
        @param steps: list of int representing the percentage of each step in the transaction
        iN(tresetRR(RR((s7/usr/lib/python2.6/site-packages/packagekit/progress.pyt	set_steps3s
	cCs(d|_g|_d|_d|_dS(Ni(RRRR(R((s7/usr/lib/python2.6/site-packages/packagekit/progress.pyR<s			cCsb|it|iƒdjo/|id7_|i|i|_d|_nd|_d|_dS(s:
        Step to the next step in the transaction
        iiidN(RtlenRRR(R((s7/usr/lib/python2.6/site-packages/packagekit/progress.pytstepBs
	cCs||_|iƒdS(s9
        Set subpercentage and update percentage
        N(Rt_update_percent(Rtpct((s7/usr/lib/python2.6/site-packages/packagekit/progress.pytset_subpercentNs	cCs§|idjo
d}n|i|id}|it|iƒdjo|i|id}nd}||}t|iƒd}t||ƒ}|||_dS(sN
        Increment percentage based on current step and subpercentage
        iiidgY@N(RRR	tfloatRtintR(Rtstartpcttendpcttdeltapcttftincr((s7/usr/lib/python2.6/site-packages/packagekit/progress.pyRUs

(	t__name__t
__module__t__doc__RRRR
R
R(((s7/usr/lib/python2.6/site-packages/packagekit/progress.pyRs						N((R(((s7/usr/lib/python2.6/site-packages/packagekit/progress.pyt<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit