B t `B ã@sZddlZddlZddlmZmZmZmZmZddlZdZ dd„Z dd„Z e dkrVe ƒdS) éN)ÚabspathÚbasenameÚdirnameÚexistsÚjoinaƒusage: lbin [-f][-v] [...] This script recurses up the current path, looking for 'bin' and python/bin directories. If found, these directories are prepended to the PATH environment path. -f : [find_only] show results from 'which ' after PATH expansion but do not run -v : [verbose] show results from 'which ' after PATH expansion cCs d}d}|r€|ddkr€|ddkr*d}n|ddkr:d}| d¡|r€|ddkr€|ddkrfd}n|ddkrvd}| d¡t|ƒdkr˜ttƒdSytjd}Wntt ¡ƒ}YnXg}xhtj|kr,t t |d ƒƒrò|  t |d d ƒ¡t t |d ƒƒr|  t |d ƒ¡t |ƒd kr"Pt |ƒ}qÆW|  tjd ¡tj  |¡tjd <yv|r„|rrt d d|dg¡St d |dg¡S|r´td|dƒt d |dg¡}td ƒt |d|¡Wn>tk rt ¡d}tdd  |¡t|ƒfƒ|jSXdS)NFr)z-vz-fz-vTz-féZPWDÚpythonÚbinÚÚPATHÚwhichz-az0Path search found the following instances of %s:z ERROR executing command '%s': %sú )ÚpopÚlenÚprintÚusageÚosÚenvironrÚgetcwdÚseprrÚappendrrÚpathsepÚ subprocessÚcallÚexecvpÚOSErrorÚsysÚexc_infoÚstrÚerrno)ÚargsÚverboseZ find_onlyÚcurrÚdirsÚxÚerr©r&ú5/tmp/pip-unpacked-wheel-cqckmaqz/pyutilib/dev/lbin.pyÚlbins\         r(cCst ttjdd…ƒ¡dS)Nr)rÚexitr(Úargvr&r&r&r'ÚmainRsr+Ú__main__) rrÚos.pathrrrrrrrr(r+Ú__name__r&r&r&r'Ús ?