JVc@s ddlZddlZddlmZmZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlTddlZddlmZmZmZmZddlmZmZmZmZmZm Z mZddl!m"Z"yddl#j$j%Z%e&Z'Wne(k re)Z'nXyddl*Z*e&Z+Wne(k re)Z+nXy,ddl,Z,ddl,m-Z-m.Z.e&Z/Wne(k re)Z/nXyddl0Z0d Z1Wn&e(k r?ddl2Z2d Z1nXddlTddl3Tdd l!m4Z4d Z5dZ6d Z7dZ8dZ9dZ:dZ;dZ<d Z=dZ>dZ?dZ@ejAd ZBejAdZCe4jDe4jEdddddddddddd gZFgZGxUeFD]MZHyejIeHejJZKWneLk rHeGjMeHq XeGjMeKq Wd!ZNd"ZOd#ZPe)d$ZQed%ed%ed%dd&ZSd'ZTd(d)ZUe)d*ZVe&e)e)d+dd,ZWd-ZXd.dd/YZYd0dd1YZZd2dd3YZ[d4e[fd5YZ\d6dd7YZ]d8dd9YZ^d:Z_d;Z`e)d<Zay ejbZcWn&edk rd%d%d%e)d=ZcnXe)d>Zed?effd@YZgdAZhdBZidCZjdDZkdEZlyddFlmmZmWnMe(k redGddHYZndIeofdJYZpdKddLYZmnXdMZqererjsd%d%ZtetjuetejvjwdNZxn'ejsd%d%ZtetjuetejvZxdOZvdPdQZydRdSZzdTdUdVdWdXgZ{idYdT6d%dU6d%dV6dZdW6d%dX6Z|d[Z}e&d\Z~d]Zdd^Zdd_Zd`ddaYZdbddcYZddddeYZdfZejdgkrdhdiZdhdjZdkZdhdlZnejZejZejZdmZdnZdoZdd%e&e&ddpZdqZdrZdddsZdtZduZdveffdwYZdxZdyd%dze)fZd{d|d}e)fZd%d~d}e)fZddd}e)fZddd}e)fZdd%dze)fZdd%dze)fZddd}e)fZddd}e)fZddd}e)fZd%dd}e)fZddd}e&fZd%d%de)fZdd%dze)fZdd%dze)fZdd%de)fZdd%de)fZdd%dze)fZddd}e)fZddd}e)fZdd%de)fZddd}e)fZddd}e)fZddd}e)fZejddddkr} ddd}e)fZddd}e)fZn$ddd}e)fZddd}e)fZdZd dZdd%d%d%dZe&dZdZdZdZdZdZdZdedZde)dZdddYZd%d d%d%dZdZdZdZdZdZdZdZe;e<dZddZdZddZdZde)dZdZdZdZdS(iN(tPopentPIPEi(t*(t html_entitiesturllib2_requestt urllib2_parset urllib2_error(tPY3t to_unicodet to_bytes_utf8tto_string_utf8tBytesIOtStringIOt subprocess(tos_utils(t SystemBustlowlevelcCstj|jS(N(thashlibtsha1t hexdigest(ts((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt get_checksumHscCstj|jS(N(tshatnewR(R((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRNs(tpexpectisrm -rfsrm -fscom.hplip.StatusServices/http://hplipopensource.com/hplip-web/index.htmlshttp://www.hp.coms www.hp.comiis Continue?s passwor[dt]:tkennworts password fors mot de passes contraseñas palavra passes口令t wachtwoordtheslos密码s LösenordcCsg}ytd}Wnmtk ryGdtjtjdjjkrltjtjdjjgSWqtk r|SXnXy5t j d|j dj ddj d}Wntk r|SXd|kr|jdn|j|S(Ns/etc/cups/cupsd.conftrootsSystemGroup [\w* ]*is SystemGroup tt (topentIOErrortgrptgetgrgidtoststattst_gidtgr_nametOSErrortretfindalltreadtreplacetsplitt IndexErrortremovetclose(tlistfp((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytget_cups_systemgroup_lists" $#  5   cCsotjd|jy(tj|jtjtjBtSWn,t t fk rjtjd|jt SXdS(Ns Locking: %ssFailed to unlock %s.( tlogtdebugtnametfcntltflocktfilenotLOCK_EXtLOCK_NBtTrueR R'tFalse(tf((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytlocks cCsn|dk rjtjd|jy-tj|jtjtj |jWqjt t fk rfqjXndS(Ns Unlocking: %s( tNoneR3R4R5R6R7R8tLOCK_UNR#R.R R'(R=((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytunlocks cCstj}tjdkr$d}n"tjj|sFtj|ntjj|dj|dg}yt|d}Wn2t k r|st j d|nt dfSXt|s|st j d||fnt dfSt|fS(Nis/vart.R>twsUnable to open %s lock file.s)Unable to lock %s. Is %s already running?(tproptuser_dirR#tgeteuidtpathtexiststmakedirstjoinRR R3terrorR<R?R>R;(t applicationtsuppress_errortdirt lock_filet lock_file_f((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytlock_apps"  $    Rcst|dkr%|t|}ntr4t}nt}|jtdtd}|j|||dk r|j||j|nfd}|S(NiRcs|jS(N(t translate(R(tdeletettrans(sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytcallables(tlenRtbyteststringt maketransR R?RR(tfrmttoRStkeept data_typestallcharsRU((RSRTsZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt Translators  !cCs}t|dkrdSt|dkr>td|ddSt|dkryddj|dt|jdSdS(NiRis"s", "s" and "(RVtstrRJtpop(R0((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytlist_to_strings t0cCs\t|trX|rX|djdkr5tdS|djd krXtdSn|S( sD Convert an arbitrary 0/1/T/F/Y/N string to a normalized string 0/1.it1tttyRcR=tn(RdReRf(RcR=Rg(t isinstanceR`tlowerR(Rtdefault((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt to_bool_strs   cCsct|trL|rL|djdkr/tS|djd kr_tSnt|tr_|S|S( sG Convert an arbitrary 0/1/T/F/Y/N string to a boolean True/False value.iRdReRfRcR=Rg(RdReRf(RcR=Rg(RhR`RiR;R<tbool(RRj((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytto_boolsRc csZ|dkr|}nytj|}Wntjk rDtnX|pNd}|jd}x|D]}tjjtjj||} x{|D]s} t j || r|stjj |  r|r| Vqytjj | VWqt k r| VqXqqqW|rgtjj | rgx+t | |||||D] } | Vq@WqgqgWdS(NRt;(R?R#tlistdirRKt StopIterationR,RGtnormpathRJtfnmatchtisdirtbasenamet ValueErrort walkFiles( Rtrecurset abs_pathstreturn_folderstpatternRGtnamestpat_listR5tfullnametpatR=((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRvs,     !  "cCstjj|rtj|}|tjd@}|d@r@tS|tjtjkrg|d@rgtS|tjtj kr|d@rtSnt S(Niiii( R#RGRHR$tST_MODER;tST_GIDtgetgidtST_UIDtgetuidR<(RGRtmode((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytis_path_writable)s ##t TextFormattercBs/eZdZdZdZdZedZRS(iiicCs4g|_x$|D]}|jjt|qWdS(N(tcolumnstappendtColumn(tselft colspeclisttcolspec((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt__init__As  cCs d}t|}t|t|jkr>tjddSxQttd||jD]1\}}|j|t|t|j}q]Wdg|}xCt |D]5}x,|jD]!}|||j |||LsRs ( tlistRVRR3RKtmaptwraptmaxtlinestrangetgetlineRJ(Rttextlistt add_newlinetnumlinesttexttcolumnt complinestln((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytcomposeFs  +  #(t__name__t __module__tLEFTtCENTERtRIGHTRR<R(((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyR;s  RcBs8eZdejddZdZdZdZRS(iNicCs.t||_||_||_g|_dS(N(tinttwidtht alignmenttmarginR(RRRR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRZs  cCsX|jtjkr"|j|jS|jtjkrD|j|jS|j|jSdS(N(RRRtcenterRRtrjusttljust(Rtline((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytalign`s cCs2g|_g}xz|jD]l}|t|jkrG|j|qx>tdt||jD]!}|j||||j!qcWqWt|sdS|jd}xg|D]_}dt|}t|||jkr|jj|j||}q|d|}qW|jj|j|dS(NiiR( RR,R`RRRRVRaR(RRtwordstwordtitcurrentt increment((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRhs" "#   cCsA|t|jkr+d|j|j|Sd|j|jSdS(NR(RVRRR(Rtindex((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyR|s(RRRRRRRR(((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRXs  tStackcBs>eZdZdZdZdZdZdZRS(cCs g|_dS(N(tstack(R((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRscCs |jjS(N(RRa(R((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRascCs|jj|dS(N(RR(Rtvalue((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytpushscCs|jS(N(R(R((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytas_listscCs g|_dS(N(R(R((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytclearscCs t|jS(N(RVR(R((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt__len__s(RRRRaRRRR(((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRs      tQueuecBs#eZdZdZdZRS(cCstj|dS(N(RR(R((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRscCs|jjdS(Ni(RRa(R((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytgetscCstj||dS(N(RR(RR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytputs(RRRRR(((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRs  t RingBuffercBs/eZddZdZdZdZRS(i2cCs||_g|_dS(N(Rtdata(Rtsize_max((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRs cCsA|jj|t|j|jkr=d|_t|_ndS(s*append an element at the end of the bufferiN(RRRVRtcurtRingBufferFullt __class__(RR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRs cCs||jd%(delim)s) | # Escape sequence of two delimiters (?P%(id)s) | # delimiter and a Python identifier {(?P%(id)s)} | # delimiter and a braced identifier (?P) # Other ill-formed delimiter exprs ) cCstt|j|||d|kr4|j}n*tjitj|jd6|jd6}tj|tj tj B|_dS(NRztdelimtid( tsuperRARRzR(tescapet delimitert idpatterntcompilet IGNORECASEtVERBOSE(tclsR5tbasestdctRz((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyR2s   (RRRzR(((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRA(sR7cBsDeZdZeZdZdZdZdZdZ dZ RS(s.A string class for supporting $-substitutions.t$s[_a-z][_a-z0-9]*cCs ||_dS(N(ttemplate(RRO((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRHscCs}|jd}|j| jt}|s:d}d}n)|tdj|d }t|}td||fdS(NtinvalidiRis.Invalid placeholder in string: line %d, col %d(tstartROt splitlinesR;RVRJRu(RtmoRRtcolnotlineno((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt_invalidLs  cs~t|dkr!tdn|s0|n&|rLt||dn |dfd}jj|jS(NisToo many positional argumentsics|jdp|jd}|dk r<|}d|S|jddk rXjS|jddk r}j|ntdjdS(Ntnamedtbraceds%stescapedRPs#Unrecognized named group in pattern(tgroupR?RFRVRuRz(RSRWR(tmappingR(sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytconvertbs  (RVt TypeErrorR8RztsubRO(RtargstkwsR\((R[RsZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt substituteXs  cs~t|dkr!tdn|s0|n&|rLt||dn |dfd}jj|jS(NisToo many positional argumentsics|jd}|dk rJyd|SWqJtk rFj|SXn|jd}|dk ryd|SWqtk rjd|dSXn|jddk rjS|jddk rjStdjdS( NRWs%sRXt{t}RYRPs#Unrecognized named group in pattern(RZR?R=RFRuRz(RSRWRX(R[R(sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyR\}s$    (RVR]R8RzR^RO(RR_R`R\((R[RsZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytsafe_substitutess  ( RRR@RAt __metaclass__RFRGRRVRaRd(((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyR7As  cCs~tjdjj}d|kr.|d=ntjdjj}d|kr\|d=nt|jtjdj|S(NiR(tsyst _getframet f_globalstcopytf_localsR7Ra(Rtglobalstlocals((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytcats    sutf-8cCs|jttS(N(RRtidentityt unprintable(R((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt printablescCs|S(N((R((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRscCs%x|D]}||rtSqWtS(N(R;R<(tSR=R((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytanys  cCs|S(N((R((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRscCs%x|D]}||stSqWtS(N(R<R;(RqR=R((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytalls  tfirefoxtmozillat konquerortepiphanyt skipstones-new-tabs --new-tabcCsUtrtjdkrdStdr,dSx"tD]}t|r3|Sq3WdSdS(NtDarwinRsxdg-open(tplatform_availtplatformtsystemRtBROWSERSR?(tb((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt find_browsers   cCstr2tjdkr2d|}tj|ntdrXd|}tj|n{xxtD]_}t|dd}|r_|rd|t||f}nd||f}tj|Pq_q_Wtj d |dS( NRys open "%s"sxdg-opens xdg-open "%s"RR;s %s %s "%s" &s %s "%s" &sUnable to open URL: %s( RzR{R|RtexecuteRR}t BROWSER_OPTSR3R(turltuse_browser_optstcmdR~tbb((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytopenURLs     cCs9g}g|D]$}|j|s |j|^q |S(N(R+R(tinputttempR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt uniqueLists/csdkr!fd}nfd}xQtdtD]:}||rL||d|d<|eZdZdZdZdZdZdZRS(cCsg|_i|_d|_dS(NR(RRt last_start(R((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRs  cCs|jjt|jt|j|_t|rxK|D]@}|jjt|j|j|||jjqDWndS(N(RRRRiRRVtaddDataRa(RR5tattrsta((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt startElements  cCs6|j|jkr%|jdn|jjdS(NR(RiRRRRa(RR5((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt endElementscCs5t|j}|r1|jr1|j|ndS(N(RtstripRR(RR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytcharDatascCsid|_yt|}Wntk r8t|}nXdj|j}dj|dg}y|j|Wntk r*y|j|Wntk r||j|((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt getAttributeWscCs|jS(N(R(R((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytgetDataZsRcCs|r|j}n |j}|s(|jSg}x]|D]U}|j|krZ|j|n|j||}x|D]}|j|qsWq5W|SdS(N(RR5RtgetElementsByTagName(RR5t ElementNodet Children_listtelementsRt rec_elementsR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyR]s    cCsN|s |jSg}x0|jD]%}|j|kr|j|qqW|SdS(N(RR5R(RR5RR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytgetChildElementsosicCsd|}|d|j7}x,|jD]!}|d||j|f7}q%Wd}x(|jD]}||j|d7}qZW|dkr|jr|d|jd|j7}q|d7}n|d|d|j7}|S( NRs<%ss %s="%s"Rit>ss/>(R5RRttoStringR(Rtleveltretvalt attributetctchild((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRys    N( RRRRRRR?RRR(((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRMs     t extendedExpatcBs5eZdZdZdZdZdZRS(cCsd|_g|_dS(N(R?Rt nodeStack(R((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRs cCs^t||}t|jdkrA|jd}|j|n ||_|jj|dS(Nii(RRVRRRR(RR5RRtparent((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytStartElement_EEs   cCs|jd |_dS(Ni(R(RR5((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt EndElement_EEscCs*|r&|jd}|j|7_dSdS(Ni(RR(RRR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt charData_EEs cCs]trItj}|j|_|j|_|j|_|j |t n t j d|j S(NsRFailed to import expat module , check python-xml/python3-xml package installation.(RRRRRRRRRRR;R3RKR(Rt xmlStringtParser((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRs     (RRRRRRR(((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRs    cCsdjd|dgS(NRt"(RJ(R((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytdquotesiRcCsPd}x?t|ttt|D]\}}||kr(Pq(q(W||S(Ni(tzipRRRV(RtcharsRR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytxlstrips . cCsttt||S(N(txreverseR(RR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytxrstripscCs#t|}|jdj|S(NR(RtreverseRJ(RR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRs  cCs"tttt|||S(N(RR(RR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytxstripscCs3trttjdd Stjdd>SdS(NiitPi(RzRR{t architecturetstructtcalcsize(((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt getBitnessscCs*tr"tjjddjSdSdS(NRt_ti686(RzR{tmachineR+Ri(((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt getProcessorscCstjdkrtStSdS(Ntbig(Rft byteordert BIG_ENDIANt LITTLE_ENDIAN(((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt getEndiansc Csddl}|j}ytj|d|}Wntjk rJ} d SXy,d} xtru|rmtny|jt} Wnt k rqWnX|j ry|j |j Wnt k rnX|ryt j |j Wqt k rqXqn| dkr PqW| dkrqWqW| dkr:|jdqW|sOt dn|j|j|| | d7} qWWWn$t k r} t jd | nX|rtny|jWntjk r} nX|j|jfS( NittimeoutRiiitYESs.password Object(i.e. passwordObj) is not valids Exception: %s(iR(tioR RtspawnutExceptionPexpectR;tupdate_spinnertexpectt EXPECT_LISTt ExceptiontbeforetwriteR3R4tsendlinet getPasswordRKtcleanup_spinnerR/t exitstatustgetvalue( Rt passwordObjtpswd_msgt log_outputtspinnerRRtoutputRtetpswd_queried_cntR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRsX             cCsHg}x|jtdD]}|j}|jd}t|dkr|djtd}|dt||d<|do|dstd|n|dtdkst|dddkr|d 7}n`g|D]}t|^q}|d|dkr*td |n|td t|7}g|D]}t|d ^qK}|d|dkrtd |nxDt|d|ddD]}|j ||qWq|j |qWt t gt |D]\}}||f^qj }g|D]}|rt|^q}|j|S(sCredit: Jean Brouwers, comp.lang.python 16-7-2004 Convert a string representation of a set of ranges into a list of ints, e.g. u"1-4, 7, 9-12" --> [1,2,3,4,7,9,10,11,12] t,Riit 0123456789is empty range: Rcs%ds wide range: s%%0%ddi s bad range: (R,RRRVtrstripRuRRRRRtdictt enumeratetkeysR(tnstfsRgtrthRRCR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt expand_range(s2 0 ""=% cCs|s dSt|dg|dt}}}xt|dD]h}||dkrYt}nC|r|jtd||ft}n|jtd||}q:W|r|jtd|ndj|S(s} Convert a list of integers into a string range representation: [1,2,3,4,7,9,10,11,12] --> u"1-4,7,9-12" Riis-%s,%ss,%ss-%s(R`R<R;RRRJ(RRRRR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytcollapse_rangeRs%   c Cs|dkrtj}nd}xt|dtdtdtddddD]|}tjj|\}}|j|rL||krLyt|t |}Wnt k rqLqXt ||}qLqLWtjj |d|||d |fS( NiRwRxRyRzRRGs%s%0*d%si( R?R#tgetcwdRvR<RGtsplitextt startswithRRVRuRRJ( RttextRNtdigitsRR=RRR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytcreateSequencedFilenamens 1 cCs{|dkrtj}n\|jj}xGttjD]\}}||kr@Pq@q@Wd}tj d||S(Nten_USs)Unknown lang/locale. Using default of %s.( R?RtgetSystemLocaleRiRRtsupported_localesRR3R(tlangtloctll((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytvalidate_languages  cCspy ddl}t|jSWnItk rktd}|rdtjj|d}tj |SdSnXdS(NituuidgenR( tuuidR`tuuid4RRR#RGRJR t getoutput(R R ((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytgen_random_uuids    tRestTableFormattercBs&eZddZdZdZRS(cCs||_g|_dS(N(theadertrows(RR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRs cCs|jj|dS(N(RR(Rtrow_data((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytaddsc CsE|jr4t|jd}x8|jD]-}t||kr&tjd|dSq&Wt|j|kr|tjdng}xgt|jD]V\}}t|}x*|jD]}t|t||}qW|j|dqWd}x.|D]&}dj|d|ddg}qWdj|dg}|j ||jr-d }xXt|D]J\}}dj|d |j|d |d t|j|d g}qaWdj|dg}|j |d}x.|D]&}dj|d |ddg}qWdj|dg}|j |nxt|jD]\} }d }x`t|D]R\}}dj|d |j| |d |d t|j| |d g}q\Wdj|dg}|j |d}x.|D]&}dj|d|ddg}qWdj|dg}|j |q=Wn tjd dS(Nis"Invalid number of items in row: %ss"Invalid number of items in header.it+RRs t|Rit=s No data rows( RRVR3RKRRRRRJR( RRCtnum_colsRt col_widthsRRt max_widthRR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRsT   $  B  $J  $N(RRR?RRR(((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRs  cCs~ddl}|jddj}d|kr>tdn|jj}|jdd|jdd|j|dS(NiiiRs(Must call mixin() from within class def.R@( tinspectRRjR]t__dict__RiRaR?tupdate(RKRRlR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytmixins  s [OPTIONS]theadingsSet the logging level:s-l or --logging=toptions5: none, info\*, error, warn, debug (\*default)sRun in debug mode:s-g (same as option: -ldebug)sOutput plain text only:s-ts[PRINTER|DEVICE-URI]s [PRINTER]sTo specify a device-URI:s'-d or --device=sTo specify a CUPS printer:s"-p or --printer=s'Bus to probe (if device not specified):s-b or --bus=sf: cups\*, usb\*, net, bt, fw, par\* (\*defaults) (Note: bt and fw not supported in this release.)sThis help information:s -h or --helptspaces Examples:sNotes:snIf device or printer is not specified, the local device bus is probed and the program enters interactive mode.tnotes<If -p\* is specified, the default CUPS printer will be used.s See Also:sSet the language:sa--loc= or --lang=. Use --loc=? or --lang=? to see a list of available language codes.sF--lang=. Use --lang=? to see a list of available language codes.s[MODE]RsRun in non-interactive mode:s-n or --non-interactivesRun in graphical UI mode:s-u or --gui (Default)sRun in interactive mode:s-i or --interactivet configures ui-toolkittqt3sUse Qt3:s--qt3 (Default)sUse Qt4:s--qt4s--qt3s--qt4 (Default)cCstjdjd}idd6dd6}x\|jdD]K}|j}t|dkr=|d||d<|d||dtjd?tjd@tjdndAS(Ls Format usage text in multiple formats: text: for --help in the console rest: for conversion with rst2web for the website man: for manpages Rs\RtsummarytparaR5tseealsoRRRtexampleR Rs Rtrestiis_restindex page-title: %s crumb: %s format: rest file-extension: html encoding: utf8 /restindex s%s: %s (ver. %s)Rs`%s`_s**s.. class:: borderlessRRs`_s| *RiRis .. _`%s`: %s.html shp-tmans$.TH "%s" 1 "%s" Linux "User Manuals"s.SH NAME %s \- %ss\*s .SH SYNOPSISs.B %ssUsage:s.SH DESCRIPTION %ss .IP "%s" %ss.SH %sRt[t]s seealso, paras .SH AUTHORs8HPLIP (Hewlett-Packard Linux Imaging and Printing) is ans=HP developed solution for printing, scanning, and faxing withs,HP inkjet and laser based printers in Linux.s.SH REPORTING BUGSsThe HPLIP Launchpad.net sites.B https://launchpad.net/hplips is available to get help, reports>bugs, make suggestions, discuss the HPLIP project or otherwisescontact the HPLIP Team.s .SH COPYRIGHTs?Copyright (c) 2001-15 Hewlett-Packard Development Company, L.P.s.LPs0This software comes with ABSOLUTELY NO WARRANTY.s;This is free software, and you are welcome to distribute its<under certain conditions. See COPYING file for more details.N(R-snameR.(Rsheader(RR/(ii(ii(ii(R-sname(Rsheader(RR/R (sheaderR(R+R+R3tinfotboldRRtlstripRRVR<RRJR;tupper(t text_listttypttitletcrumbtversiont formatterRttext1ttext2Rttrailing_spacet opt_colwidth1t opt_colwidth2texmpl_colwidth1texmpl_colwidth2tnote_colwidth1tnote_colwidth2topt_tablewidthtexmpl_tablewidthtnote_tablewidthRetlinkst needs_headertlen1tlen2R((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt format_text5s6        "                                    - E>40   - E>40    - *.0  '        >                 cCstjd|r3tjtjdtjntjtjdtjtjd||ftjdtjdtjdtjdtjdtjddS( NRs.HP Linux Imaging and Printing System (ver. %s)s$HP Linux Imaging and Printing Systems %s ver. %ss=Copyright (c) 2001-15 Hewlett-Packard Development Company, LPs0This software comes with ABSOLUTELY NO WARRANTY.s;This is free software, and you are welcome to distribute its<under certain conditions. See COPYING file for more details.(R3R4R5RDR<(t program_nameR<tshow_ver((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt log_titles        cCs&dtj|}tj|||S(Ns(?i)(R(RER^(toldtsearchR+tregex((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytireplace*scCsd}tjd||S(NcSs|jd}|d dkr{yE|d dkrLtt|dd!dStt|dd!SWqtk rwqXn2yttj|dd!}Wntk rnX|S( Niis&#is&#xiii(RZtchrRRuRtname2codepointR=(RR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytfixup3s  s&#?\w+;(R(R^(RRX((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytunescape2s cCst|tst|}n|jdd}xCtjD]8}|dkr:|jt|dtj|}q:q:WxIttdttddD]"}|jt|d|}qW|S( Nt&s&i&s&%s;i iis&#%d;( RhR`RR+Rtcodepoint2nameRVRR(RR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyREMs *, cCs[dddddg}d}x9|D]1}t|r"|d}tjd|Pq"q"W|S(Nsgnome-terminaltkonsolesx-terminal-emulatortxtermtgtkterms -e sAvailable Terminal = %s (R?RR3R4(t terminal_listt terminal_cmdR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt get_terminalas   c Csu|dks0|dks0|dks0|dkrAtjdtS|jd}|jd}tjd||fd}t}tjd}yx|t|kr&|t|kr&d}d}d} d} |j||r't |j||j d}|j||j d }nt ||}|j||rt |j||j d} |j||j d } nt ||} || krt }Pnh|| krtjd tS|j | j krt }Pn)|j | j krtjd tS|d7}qW|tkrTt|t|krTt }nWntj d ttSX|S( NRsavailable_version is ''RBs0HPLIP Installed_version=%s Available_version=%sis(\d{1,})([a-z]{1,})Riis Already new verison is installeds_Failed to get the latest version. Check out %s for manually installing latest version of HPLIP.(R?R3R4R<R,R(RHRVRSRRZR;RiRKtHPLIP_WEB_SITE( tinstalled_versiontavailable_versiontinstalled_arraytavailable_arraytcnttIs_olderR~tinstalled_ver_digtinstalled_ver_alphtavailable_ver_digtavailable_ver_alph((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytIs_HPLIP_older_versionqsT0 '""    $ cCslt||d|}|dkr7tjjdntjjdtjd|dtjjdS(Nidiss%ss%2d%%R5(RRftstdoutRR3tcolortflush(R+t blockSizet totalSizetpercent((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytdownLoad_statuss  $i cCs|jrE|jjdrEt|jjdj}ntjdd}d}xR|j|}|szPn|j||t |7}|ra||d|qaqadS(NsContent-LengthsIgnoring progres barii( R4RRRR3R4R?R*RRV(tresponsetout_fdt chunk_sizet status_bart total_sizet bytes_so_fartchunk((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt chunk_writes!$  c Csd}|dks|dkr5tjd|dfS|dkrSt\}}ny|tkrtd}|rtjj|d}t d|||f\}}|rtjd||dfSqt }n|rXt j j dy9tj|}t|d} t|| | jWqXtjk rT} tjd ||dfSXnWn.tk r} tjd | j|dfSXtjj|stjd t|dfSd |fS( NiRs URL is emptytwgets=%s --cache=off --tries=3 --timeout=60 --output-document=%s %ss0Failed to connect to HPLIP site. Error code = %dsDownload in progress..........twbsFailed to open URL: %ss I/O Error: %ss/Failed to get hplip version/ %s file not found.i(R?R3RKRR<RR#RGRJRR;RfRnRRturlopenRR|R/RtURLErrorR tstrerrorRHthplip_version_file( tweburlt outputFilet useURLLIBtretValueR1R}tstatusRRutfile_fdR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytdownload_from_networksB          t Sync_LockcBs,eZdZdZdZdZRS(cCs"||_t|jd|_dS(NRC(t Lock_filenameRthandler(Rtfilename((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRs cCstj|jtjdS(N(R6R7RR9(R((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytacquirescCstj|jtjdS(N(R6R7RR@(R((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytreleasescCs|jjdS(N(RR/(R((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt__del__ s(RRRRRR(((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRs   c CststjddStjd|||||||g}tjdtd}|jdd|tj|tjddS(NsFailed to import dbus, lowlevelssend_message() enteredt/tEventt signaturetssisissssend_message() returning( t dbus_availR3R4Rt SignalMessaget DBUS_SERVICERRt send_message( t event_codet device_urit printer_nametusernametjob_idR:t pipe_nameR_tmsg((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt sendEvent s  cCs<tj|}|r.dj|}||fSgdfSdS(NRR(tglobRJ(tFile_expt File_listt File_list_str((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt expand_lists  cCsd}d}xH|jddkrP|jddd}|jdsTPqTq|Sqt|dkrm|S||dkr|}nyx|t|krkd}x>||dks||d ks||d kr|d}qWxI||d kr0||d kr0|d t||d }|d}qW|dkrAPn|||||d !}||d }qWWntk rnX|S( NiRs iitHTTPt}d }x/|D]'} || kr||=Pn|d7}qWqWt |d krt }nd} x+|D]#} | r;| d7} n| | 7} q"W|| fS( Ns.*-G(.*)is\sRRtlpsRequied groups list =[%s]s Ri(R<R(RHRSRZR^R`R,RR3R4RRVR;( trequired_grps_strtavl_grpstresultt exp_grp_listtexp_pattgrpstgrp_listtgt grp_indexRtmissing_groups_strR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytcheck_user_groupsSs4       cCst}tjj|s,tjd|ntjj|rStjj|}n|}tjj|stjd|nGtj|j d@dkrtjd|ntjd|t }tjd||f|S(Ns9Either %s file is not present or symbolic link is missings%s library file is missing.iHs;%s library file doesn't have user/group execute permission.s%s library file present.s%s library status: %d( R<R#RGRHR3R4tislinktrealpathR$tst_modeR;(t so_file_pathtret_valt real_file((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt check_librarytscCsd}td}|rv|rvtjj|d}d||f}tj|t|\}}tjd|n tjd|S(NiR}s<%s --cache=off --tries=3 --timeout=60 --output-document=- %sswget returned: %dswget not found(RR#RGRJR3R4R(ttargetRR}RR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytdownload_via_wgets    cCsd}td}|rv|rvtjj|d}d||f}tj|t|\}}tjd|n tjd|S(Nitcurls2%s --output - --connect-timeout 5 --max-time 10 %sscurl returned: %dscurl not found(RR#RGRJR3R4R(RRRRR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytdownload_via_curls    cCsd}td}|rv|rvtjj|d}d||f}tj|t|\}}tjd|n tjd|S(Nitpings%s -c1 -W1 -w10 %ssping returned: %dsping not found(RR#RGRJR3R4R(RRRRR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytcheck_network_via_pings    cCsLt|}|dkrBt|}|dkrBt|}qBn|dkS(Ni(RRR(Rt ping_serverR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytcheck_network_connections     cCs{g}xn|D]f}|r*|d|}nd|krftj|}x+|D]}|j|qLWq |j|q W|S(NRR(RR(t Files_Listt prefix_dirtExpanded_Files_listR=tf_fulltfile((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt expandLists   cCs?ytt|t|SWntk r:t||SXdS(N(RtfloatRu(RRf((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytcompares cCs|dk rtjd|xi|D]^}t|\}}|tkr$x7|D],}tjd|||f|||fSWq$q$WntjddS(Ns*Searching for '%s' in running processes...sFound: %s (%s)s Not foundiR(iR(R?R3R4tIs_Process_RunningR;(t package_mgrsRRtprocesstpid((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt check_pkg_mgrs     c Cs_|stifSy i}tddgdt}td|gd|jdt}tdddgd|jdt}|jd}tjd||rxe|jD]W}d |}tj |\}} d |}tj |\}} | r| || t k rZ} tj d |t jd I| IJtifSXdS( Ntpss-efRntgreptstdins-visIs_Process_Running output = %s secho '%s' | awk {'print $2'}s!echo '%s' | awk {'print $11,$12'}s"Execution failed: process Name[%s]sExecution failed:(R<RRRnt communicateR3R4RRR tgetstatusoutputR;RRKRftstderr( t process_nameRtp1tp2tp3RRRRRtcmdlineR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyRs. !$   cCs}td|}|r-|r-|j|}ntjd||ft||\}}d|krytjd|ndS(NRsRemoving %s cmd = %s isFailed to remove=%s (tRMDIRt getAuthCmdR3R4R(RGRtcksudoRRR((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyR. s  cs dtffdY}|S(s,Convert a cmp= function into a key= functiontKcskeZdZfdZfdZfdZfdZfdZfdZRS(cWs ||_dS(N(tobj(RRR_((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyR scs|j|jdkS(Ni(R(Rtother(tmycmp(sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt__lt__ scs|j|jdkS(Ni(R(RR(R(sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt__gt__ scs|j|jdkS(Ni(R(RR(R(sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt__eq__ scs|j|jdkS(Ni(R(RR(R(sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt__le__ scs|j|jdkS(Ni(R(RR(R(sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt__ge__ scs|j|jdkS(Ni(R(RR(R(sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt__ne__ s( RRRRRRRRR((R(sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyR s (tobject(RR((RsZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt cmp_to_key scCsJ|d|dk|d|dkpI|d|dk|d|dkS(Nii((RRf((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyt levelsCmp scCstdttdttr@dttdttStdttrddttStdttrdttStdttdttrdttdttStdttrdttStdrdStjdtdS(sfDetermine the pip command syntax available for a particular distro. since it varies across distrosspip-%sRBspip%ss pip-python%ss pip-pythonsEpython pip command not found. Please install '%s' package(s) manuallyN(RR`tMAJ_VERtMIN_VERR3RKtdepends_to_install_using_pip(((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pytfind_pip$ s$$ ((((((((((((RfR#R RRR!RrRtsocketRtselectttimeR6terrnoR$RXRR(tdatetimeRRt sixext.movesRRRRtsixextRRR R R R RRtxml.parsers.expattparsersRR;RRR<R{RztdbusRRRRRRtcodesRRRRtRMRRbtHTTP_CHECK_TARGETtPING_CHECK_TARGETt ERROR_NONEtERROR_FILE_CHECKSUMtERROR_UNABLE_TO_RECV_KEYStERROR_DIGITAL_SIGN_BADt version_infoRRtEOFtTIMEOUTtEXPECT_WORD_LISTRRRHtIRR]RR2R>RARQR?R_RbRkRmRvRRRRRRRRRRtmkstempRR)RRRRRR!RR R7R8RRARmRWRYRnRRRptencodeRoRrRsR}RRRRRRRRRRt hexversionRRRRR`R6RRRRRRRRRRR RRt USAGE_OPTIONStUSAGE_LOGGING1tUSAGE_LOGGING2tUSAGE_LOGGING3tUSAGE_LOGGING_PLAINt USAGE_ARGSt USAGE_ARGS2t USAGE_DEVICEt USAGE_PRINTERt USAGE_BUS1t USAGE_BUS2t USAGE_HELPt USAGE_SPACEtUSAGE_EXAMPLESt USAGE_NOTEStUSAGE_STD_NOTES1tUSAGE_STD_NOTES2t USAGE_SEEALSOtUSAGE_LANGUAGEtUSAGE_LANGUAGE2t USAGE_MODEtUSAGE_NON_INTERACTIVE_MODEtUSAGE_GUI_MODEtUSAGE_INTERACTIVE_MODEtsys_confRt USAGE_USE_QT3t USAGE_USE_QT4R'R+RNRQRURYRERaRmRtR|RRRRRRRRRRRRRRRR.RRR(((sZ/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/base/utils.pyts                  "4                         '  " ,      !    3  W ! )   P=(          = *   F         < 0 0 !