+
    e                         ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt ] ]P                  ^ ,          ^8  d   ]
3tM]]
3tR tRR ltR tRR ltRR ltR#   ] d    ]P                  t LLi ; i)    Nc                *   \         P                  P                  V 4      p\         P                  P                  V4      '       g   R# \         P                  ! V4      P
                  p\        P                  P                  R4      '       de   \         P                  ! 4       ^ 8X  dK   \        V\        P                  \        P                  ,          \        P                  ,          ,          4      # \         P                  ! V\         P                  4      # )zChecks that path is an executable regular file, or a symlink towards one.

This is roughly ``os.path isfile(path) and os.access(path, os.X_OK)``.
Fsunos)ospathrealpathisfilestatst_modesysplatform
startswithgetuidboolS_IXUSRS_IXGRPS_IXOTHaccessX_OK)r   fpathmodes   &  //usr/lib/python3/dist-packages/pexpect/utils.pyis_executable_filer      s     GGT"E77>>%  775>!!D((		q  DDLL LL) LL) * + 	+ 99UBGG$$    c                   \         P                  P                  V 4      R8w  d   \        V 4      '       d   V # Vf   \         P                  pVP                  R4      pV'       g   \         P                  pVP                  \         P                  4      pV F7  p\         P                  P                  W@4      p\        V4      '       g   K5  Vu # 	  R# )zThis takes a given filename; tries to find it in the environment path;
then checks if it is executable. This returns the full path to the filename
if found and executable. Otherwise this returns None. NPATH)
r   r   dirnamer   environgetdefpathsplitpathsepjoin)filenameenvppathlistr   ffs   &&    r   whichr)   0   s     
wwx B&+=h+G+G
{jjAJJwwrzz"HWW\\$)b!!I  r   c                   . pRp^ p^p^p^p^pTpV  F  p	W8X  g   W8X  dc   V	R8X  d   TpK  V	R8X  d   TpK%  V	R8X  d   TpK0  V	P                  4       '       d    W8X  d   KN  VP                  V4       RpTpKe  W),           pTpKq  W8X  d   W),           pTpK  W8X  d   V	R8X  d   TpK  W),           pK  W8X  g   K  V	R8X  d   TpK  W),           pK  	  VR8w  d   VP                  V4       V# )a
  This splits a command line into a list of arguments. It splits arguments
on spaces, but handles embedded quotes, doublequotes, and escaped
characters. It's impossible to do this with a regular expression, so I
wrote a little state machine to parse the command line. r   \'")isspaceappend)
command_linearg_listargstate_basic	state_escstate_singlequotestate_doublequotestate_whitespacestatecs
   &         r   split_command_liner:   E   s     H
C KIE5#<Dy!d)d),OOC(C,Eg#'CE'Dy#g'Dy#gG J byOr   c                   Ve   \         P                   ! 4       V,           p  \        P                  ! WW#4      #   \         dy    \        P                  ! 4       ^,          pTP
                  ^ ,          \        P                  8X  d5   Te.   X\         P                   ! 4       ,
          pT^ 8  d   . . . 3u #  K   K  h i ; i)zThis is a wrapper around select.select() that ignores signals. If
select.select raises a select.error exception and errno is an EINTR
error then it is ignored. Mainly this is used to ignore sigwinch
(terminal resize). )timeselectInterruptedErrorr   exc_infoargserrnoEINTR)iwtdowtdewtdtimeoutend_timeerrs   &&&&  r   select_ignore_interruptsrI      s     99;(
	==T;; 	,,.#Cxx{ekk) &&4G{!2rl* # ' 	s   : A9B=;B=c                   Ve   \         P                   ! 4       V,           p\        P                  ! 4       pV  Fb  pVP                  V\        P                  \        P
                  ,          \        P                  ,          \        P                  ,          4       Kd  	    Vf   RMVR,          pVP                  V4      pV UUu. uF  w  rxVNK	  	  upp# u uppi   \         dv    \        P                  ! 4       ^,          p	T	P                  ^ ,          \        P                  8X  d2   Te+   X\         P                   ! 4       ,
          pT^ 8  d   . u #  K   K  h i ; i)zKSimple wrapper around poll to register file descriptors and
ignore signals.Ni  )r<   r=   pollregisterPOLLINPOLLPRIPOLLHUPPOLLERRr>   r   r?   r@   rA   rB   )
fdsrF   rG   pollerfd
timeout_msresultsafd_rH   s
   &&        r   poll_ignore_interruptsrX      s    99;([[]FFMMFNN:V^^Kfnn\]  	!(gnJkk*-G&-.gFCCg... 	,,.#Cxx{ekk) &&4G{!	 # ' 	s%    %C CC C A6EE)N)r   r   r	   r=   r<   rA   r>   	NameErrorerrorversion_infostrstring_typesunicoder   r)   r:   rI   rX    r   r   <module>r`      sz    	 
    $
 A!6LS>L%8*:z:k  $||$s   A A)(A)