§
    ÁÞMhÆ  ã                   ó  — 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$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dS )z0
Utilities for working with external processes.
é    NÚwin32é   )ÚsystemÚ	getoutputÚ	arg_splitÚ	check_pidÚcliÚ
emscripten)ÚgetoutputerrorÚget_output_error_codeÚprocess_handlerc                   ó   — e Zd ZdS )ÚFindCmdErrorN)Ú__name__Ú
__module__Ú__qualname__© ó    úU/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/IPython/utils/process.pyr   r      s   € € € € € Ø€Dr   r   c                 óV   — 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.
    Nzcommand could not be found: %s)ÚshutilÚwhichr   )ÚcmdÚpaths     r   Úfind_cmdr      s1   € õ& Œ<˜ÑÔ€DØ€|ÝÐ;¸cÑAÑBÔBÐBØ€Kr   c                  óŠ  — t          j        ¦   «                              dd¦  «        } d}| }t          j        dk    r7t          | ¦  «        dk     r| S t           j                             | ¦  «        \  }}|                     d¦  «        }t          |¦  «        dk    rd 	                    |dd…         ¦  «        }|| dk    rdp|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_cwdr0   7   s¸   € å
Œ)‰+Œ+×
Ò
˜d 3Ñ
'Ô
'€CØ€IØ€DÝ
„|wÒÐÝˆs‰8Œ8aŠ<ˆ<ØˆJÝœ×+Ò+¨CÑ0Ô0‰ˆ	$ð JŠJs‰OŒO€EÝ
ˆ5z„zA‚~€~ØxŠx˜˜b˜c˜cœ
Ñ#Ô#ˆàØˆsŠ
ÐsÐ"˜dñ$ð %r   )Ú__doc__r#   r   r&   r'   Ú_process_win32r   r   r   r   Ú_process_cliÚ_process_emscriptenÚ_process_posixÚ_process_commonr   r   r   Ú	Exceptionr   r   r0   r   r   r   ú<module>r8      s\  ððð ð 
€	€	€	Ø €€€Ø 
€
€
€
à„<7ÒÐØGÐGÐGÐGÐGÐGÐGÐGÐGÐGÐGÐGÐGØ„\UÒÐØEÐEÐEÐEÐEÐEÐEÐEÐEÐEÐEÐEÐEØ„\\Ò!Ð!ØLÐLÐLÐLÐLÐLÐLÐLÐLÐLÐLÐLÐLàGÐGÐGÐGÐGÐGÐGÐGÐGÐGÐGÐGà SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ Sð	ð 	ð 	ð 	ð 	9ñ 	ô 	ð 	ðð ð ð2%ð %ð %ð %ð %r   