Ë
    „ŸõfV  ã                   óÞ   — d Z ddlZddlZddlZej                  dk(  rddlmZmZmZm	Z	 n(ej                  dk(  rddl
mZmZmZm	Z	 nddlmZmZmZm	Z	 ddlmZmZmZ  G d„ d	e«      Zd
„ Zd„ Zy)z0
Utilities for working with external processes.
é    NÚwin32é   )ÚsystemÚ	getoutputÚ	arg_splitÚ	check_pidÚcli)ÚgetoutputerrorÚget_output_error_codeÚprocess_handlerc                   ó   — e Zd Zy)ÚFindCmdErrorN)Ú__name__Ú
__module__Ú__qualname__© ó    úP/var/www/cvtools/html/venv/lib/python3.12/site-packages/IPython/utils/process.pyr   r      s   „ Ør   r   c                 óP   — t        j                  | «      }|€t        d| z  «      ‚|S )a•  Find absolute path to executable cmd in a cross platform manner.

    This function tries to determine the full path to a command line program
    using `which` on Unix/Linux/OS X and `win32api` on Windows.  Most of the
    time it will use the version that is first on the users `PATH`.

    Warning, don't use this to find IPython command line programs as there
    is a risk you will find the wrong one.  Instead find those using the
    following code and looking for the application itself::

        import sys
        argv = [sys.executable, '-m', 'IPython']

    Parameters
    ----------
    cmd : str
        The command line program to look for.
    zcommand could not be found: %s)ÚshutilÚwhichr   )ÚcmdÚpaths     r   Úfind_cmdr      s-   € ô& <‰<˜Ó€DØ€|ÜÐ;¸cÑAÓBÐBØ€Kr   c                  ób  — t        j                  «       j                  dd«      } d}| }t        j                  dk(  r2t        | «      dk  r| S t         j                  j                  | «      \  }}|j                  d«      }t        |«      dkD  rdj                  |dd «      }|| dk(  xr dxs |z   S )	z1 Return abbreviated version of cwd, e.g. d:mydir ú\ú/Ú r   é   é   éþÿÿÿN)
ÚosÚgetcwdÚreplaceÚsysÚplatformÚlenr   Ú
splitdriveÚsplitÚjoin)ÚcwdÚ	drivepartÚtailÚpartss       r   Ú
abbrev_cwdr/   5   s¤   € ä
)‰)‹+×
Ñ
˜d 3Ó
'€CØ€IØ€DÜ
‡||wÒÜˆs‹8aŠ<ØˆJÜŸ™×+Ñ+¨CÓ0‰ˆ	$ð J‰Js‹O€EÜ
ˆ5ƒzA‚~Øx‰x˜˜b˜c˜
Ó#ˆàØˆs‰
ÒsÒ"˜dñ$ð %r   )Ú__doc__r"   r   r%   r&   Ú_process_win32r   r   r   r   Ú_process_cliÚ_process_posixÚ_process_commonr
   r   r   Ú	Exceptionr   r   r/   r   r   r   ú<module>r6      s[   ðñó 
Û Û 
à‡<<7ÒßGÔGØ‡\\UÒßEÔEçGÓGç SÑ Sô	9ô 	òó2%r   