§
    ŒŸjƒ  ã                   ó¸   — d dl Z d dlZd dlZd dlZd dlZd dlZ	 e n# e$ r
 ej        ZY nw xY wej	        d          dk    re
fZnee
fZd„ Zdd„Zd„ Zdd„Zdd„ZdS )	é    Né   c                 óÊ  — t           j                             | ¦  «        }t           j                             |¦  «        sdS t          j        |¦  «        j        }t          j                             d¦  «        rMt          j	        ¦   «         dk    r6t          |t          j        t          j        z  t          j        z  z  ¦  «        S t          j        |t           j        ¦  «        S )zšChecks 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Úsunosr   )ÚosÚpathÚrealpathÚisfileÚstatÚst_modeÚsysÚplatformÚ
startswithÚgetuidÚboolÚS_IXUSRÚS_IXGRPÚS_IXOTHÚaccessÚX_OK)r   ÚfpathÚmodes      úZ/var/www/finuniver-perm.ru/html/student/venv/lib/python3.11/site-packages/pexpect/utils.pyÚis_executable_filer      s¶   € õ ŒG×Ò˜TÑ"Ô"€EåŒ7�>Š>˜%Ñ Ô ð àˆuåŒ7�5‰>Œ>Ô!€DåŒ×Ò Ñ(Ô(ð 	+Ý”	‘”˜qÒ Ð õ �D�DœLÝ œLñ)å œLñ)ñ *ñ +ô +ð 	+õ Œ9�U�BœGÑ$Ô$Ð$ó    c                 ó~  — t           j                             | ¦  «        dk    rt          | ¦  «        r| S |€t           j        }|                     d¦  «        }|st           j        }|                     t           j        ¦  «        }|D ]5}t           j         	                    || ¦  «        }t          |¦  «        r|c S Œ6dS )zÐThis 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´   € õ 
„w‡‚�xÑ Ô  BÒ&Ð&Õ+=¸hÑ+GÔ+GÐ&ØˆØ
€{ÝŒjˆØ�Š�‰Œ€AØð ÝŒJˆØ�wŠw•r”zÑ"Ô"€HØð ð ˆÝŒW�\Š\˜$ Ñ)Ô)ˆÝ˜bÑ!Ô!ð 	ØˆIˆIˆIð	àˆ4r   c                 óœ  — g }d}d}d}d}d}d}|}| D ]�}	||k    s||k    rX|	dk    r|}Œ|	dk    r|}Œ |	d	k    r|}Œ)|	                      ¦   «         r!||k    rŒD|                     |¦  «         d}|}Œ^||	z   }|}Œf||k    r||	z   }|}Œt||k    r|	dk    r|}Œƒ||	z   }Œ‰||k    r|	d	k    r|}Œ˜||	z   }Œž|dk    r|                     |¦  «         |S )
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   r   é   é   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àð #ð #ˆØ�KÒÐ 5Ð,<Ò#<Ð#<Ø�DŠyˆyà!��Ø�d’�à)��Ø�d’�à)��Ø—’‘”ð $àÐ,Ò,Ð,àà—O’O CÑ(Ô(Ð(Ø�CØ,�E�Eà˜A‘g�Ø#��Ø�iÒÐØ˜‘'ˆCØˆEˆEØÐ'Ò'Ð'Ø�DŠyˆyØ#��à˜A‘g��ØÐ'Ò'Ð'Ø�DŠyˆyØ#��à˜A‘g�øà
ˆb‚y€yØ�Š˜ÑÔÐØ€Or   c                 ó<  — |�t          j         ¦   «         |z   }	 	 t          j        | |||¦  «        S # t          $ r^ t          j        ¦   «         d         }|j        d         t          j        k    r&|�#|t          j         ¦   «         z
  }|dk     rg g g fcY S n‚ Y nw xY wŒ„)zæThis 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). NTr,   r   )ÚtimeÚselectÚInterruptedErrorr   Úexc_infoÚargsÚerrnoÚEINTR)ÚiwtdÚowtdÚewtdÚtimeoutÚend_timeÚerrs         r   Úselect_ignore_interruptsrM   ‚   s¸   € ð ÐÝ”9‘;”; Ñ(ˆðð	Ý”=  t¨T°7Ñ;Ô;Ð;øÝð 	ð 	ð 	Ý”,‘.”. Ô#ˆCØŒx˜Œ{�eœkÒ)Ð)ð Ð&Ø&­¬©¬Ñ4�GØ ’{�{Ø! 2 r˜lÐ*Ð*Ð*øð øøð	øøøðs   ›2 ²A!BÂBÂBc                 ó  — |�t          j         ¦   «         |z   }t          j        ¦   «         }| D ]I}|                     |t          j        t          j        z  t          j        z  t          j        z  ¦  «         ŒJ	 	 |€dn|dz  }|                     |¦  «        }d„ |D ¦   «         S # t          $ r[ t          j
        ¦   «         d         }|j        d         t          j        k    r#|� |t          j         ¦   «         z
  }|dk     rg cY S n‚ Y nw xY wŒ”)zOSimple wrapper around poll to register file descriptors and
    ignore signals.NTiè  c                 ó   — g | ]\  }}|‘ŒS © rP   )Ú.0ÚafdÚ_s      r   ú
<listcomp>z*poll_ignore_interrupts.<locals>.<listcomp>®   s   € Ð.Ð.Ð.™F˜C �CÐ.Ð.Ð.r   r,   r   )r@   rA   ÚpollÚregisterÚPOLLINÚPOLLPRIÚPOLLHUPÚPOLLERRrB   r   rC   rD   rE   rF   )ÚfdsrJ   rK   ÚpollerÚfdÚ
timeout_msÚresultsrL   s           r   Úpoll_ignore_interruptsr`   Ÿ   s  € ð ÐÝ”9‘;”; Ñ(ˆåŒ[‰]Œ]€FØð ^ð ^ˆØ�Š˜�FœM­F¬NÑ:½V¼^ÑKÍfÌnÑ\Ñ]Ô]Ð]Ð]ðð	Ø!( ˜˜°gÀ±nˆJØ—k’k *Ñ-Ô-ˆGØ.Ð. gÐ.Ñ.Ô.Ð.øÝð 	ð 	ð 	Ý”,‘.”. Ô#ˆCØŒx˜Œ{�eœkÒ)Ð)ð Ð&Ø&­¬©¬Ñ4�GØ ’{�{Ø!˜	˜	˜	øð øøð	øøøðs   Á:)B$ Â$AD	ÄD	ÄD	)N)r   r   r
   rA   r@   rE   rB   Ú	NameErrorÚerrorÚversion_infoÚstrÚstring_typesÚunicoder   r*   r>   rM   r`   rP   r   r   ú<module>rg      sþ   ðØ 	€	€	€	Ø 
€
€
€
Ø €€€Ø €€€Ø €€€Ø €€€ð$ØÐÐøØð $ð $ð $à”|ÐÐÐð$øøøð Ô�AÔ˜!ÒÐØ�6€L€Là˜S�>€Lð%ð %ð %ð8ð ð ð ð*:ð :ð :ðzð ð ð ð:ð ð ð ð ð s   š �,«,