ڛac @ ss y d d l m Z WnB e k
rX d d l Z d d l Z e j e j Bd d Z n Xd e f d YZ d S( i( t whichNc s d } t j j r2 | | r. Sd S| d k rY t j j d t j } n | sc d S| j t j } t j
d k rt j | k r | j d t j n t j j d d j t j } t
f d | D r g } qg | D] } | ^ q } n g } t } xu | D]m } t j j | } | | k r+| j | x9 | D]. }
t j j | |
} | | | rc| SqcWq+q+Wd S( sS Given a command, mode, and a PATH string, return the path which
conforms to the given mode on the PATH, or None if there is no such
file.
`mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result
of os.environ.get("PATH"), or can be overridden with a custom search
path.
c S s5 t j j | o4 t j | | o4 t j j | S( N( t ost patht existst accesst isdir( t fnt mode( ( s5 /tmp/pip-install-ztITAX/ptyprocess/ptyprocess/util.pyt
_access_check s $t PATHt win32i t PATHEXTt c 3 s* | ] } j j | j Vq d S( N( t lowert endswith( t .0t ext( t cmd( s5 /tmp/pip-install-ztITAX/ptyprocess/ptyprocess/util.pys <genexpr>1 s N( R R t dirnamet Nonet environt gett defpatht splitt pathsept syst platformt curdirt insertt anyt sett normcaset addt join( R R R R t pathextt filesR t seent dirt normdirt thefilet name( ( R s5 /tmp/pip-install-ztITAX/ptyprocess/ptyprocess/util.pyR s8
!
t PtyProcessErrorc B s e Z d Z RS( s% Generic error class for this package.( t __name__t
__module__t __doc__( ( ( s5 /tmp/pip-install-ztITAX/ptyprocess/ptyprocess/util.pyR) F s (
t shutilR t ImportErrorR R t F_OKt X_OKR t ExceptionR) ( ( ( s5 /tmp/pip-install-ztITAX/ptyprocess/ptyprocess/util.pyt <module> s
?