a »±,[á ã@s^zddlmZWn8eyHddlZddlZejejBdfdd„ZYn0Gdd„deƒZdS)é)ÚwhichNc s"dd„}tj ˆ¡r&|ˆ|ƒr"ˆSdS|dur>tj dtj¡}|sFdS| tj¡}tj dkr¼tj |vrt|  dtj ¡tj dd¡ tj¡}t ‡fd d „|Dƒƒr¨ˆg}q‡fd d „|Dƒ}nˆg}t ƒ}|D]P}tj |¡}||vrÌ| |¡|D](} tj || ¡} || |ƒrò| SqòqÌdS) aSGiven 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. cSs&tj |¡o$t ||¡o$tj |¡ S©N)ÚosÚpathÚexistsÚaccessÚisdir)ÚfnÚmode©r ú3/usr/lib/python3.9/site-packages/ptyprocess/util.pyÚ _access_checks ÿzwhich.._access_checkNÚPATHÚwin32rÚPATHEXTÚc3s |]}ˆ ¡ | ¡¡VqdSr)ÚlowerÚendswith©Ú.0Úext©Úcmdr r Ú 1ózwhich..csg|] }ˆ|‘qSr r rrr r Ú 4rzwhich..)rrÚdirnameÚenvironÚgetÚdefpathÚsplitÚpathsepÚsysÚplatformÚcurdirÚinsertÚanyÚsetÚnormcaseÚaddÚjoin) rr rr ÚpathextÚfilesÚseenÚdirÚnormdirÚthefileÚnamer rr rs8         rc@seZdZdZdS)ÚPtyProcessErrorz%Generic error class for this package.N)Ú__name__Ú __module__Ú __qualname__Ú__doc__r r r r r2Fsr2) ÚshutilrÚ ImportErrorrr"ÚF_OKÚX_OKÚ Exceptionr2r r r r Ús  ?