ok
Direktori : /proc/self/root/proc/self/root/lib64/python2.7/Demo/scripts/ |
Current File : //proc/self/root/proc/self/root/lib64/python2.7/Demo/scripts/lpwatch.pyc |
� V �Qc @ st d d l Z d d l Z d d l Z d Z d Z d � Z d � Z e d k rp y e � Wqp e k rl qp Xn d S( i����Nt psci c C s t } y t j d } Wn t j d } n Xt j d } | r� xl t | � D]- \ } } | d d k rN | d | | <qN qN Wn. t j j d � r� t j d g } n t g } t j d d � j � } xJ t r| } x% | D] } | t | | � d 7} q� W| GHt j | � q� Wd S( Nt LOGNAMEt USERi i s -Pt PRINTERt cleart rs ( t DEF_DELAYt ost environt syst argvt enumeratet has_keyt DEF_PRINTERt popent readt Truet makestatust timet sleep( t delayt thisusert printerst it namet clearhomet text( ( s, /usr/lib64/python2.7/Demo/scripts/lpwatch.pyt main s( c C s� t j d | d d � } g } i } d } d } t } d } d } xl| D]d} | j � } t | � } t | � d k rK| | d d k rK| d d !\ } } } | d d !} t | | d � } | | k r� t } n | s� | | 7} | d 7} n | | 7} | d 7} | j | d � \ } } | d 7} | | 7} | | f | | <qK | rK | d d k rK | j � } | d k r�| d } n | d d k r�| } n | j | � qK qK W| r�d | d d } | t | � k r�| d | 7} n t | � d k r| d | j � d f 7} nV | d t | � 7} | rt| d k rU| d | 7} qt| d | d d | f 7} n | j | � n | j � } | r�| j d | f � n d j | � S( Ns lpq -Ps 2>&1R i i i t bytesi i����i t Ranks no entriess : idlei��s is ready and printings %d Ki� i s (%d jobs)s for %ss for %d userss (%s first)s (%d K before %s)s lpq exit status %rs : ( i i ( R R t Falset splitt lent intR t gett stript appendt keyst closet join( R R t pipet linest userst aheadbytest aheadjobst userseent totalbytest totaljobst linet fieldst nt rankt usert jobt filesR t ujobst ubytest sts( ( s, /usr/lib64/python2.7/Demo/scripts/lpwatch.pyR ) sd & t __main__( R R R R R R R t __name__t KeyboardInterrupt( ( ( s, /usr/lib64/python2.7/Demo/scripts/lpwatch.pyt <module> s 9