
    Ng5
                         d Z ddlZddlZddlZ	 ddlmZ n# e$ r	 ddlmZ Y nw xY wg dZ G d d          Z G d d          Z	 G d	 d
          Z
ej        dk    re	ZdS ej        dk    re
ZdS dS )zq
Helper functions for interacting with the shell, and consuming shell-style
parameters provided in config files.
    Nquote)WindowsParserPosixParserNativeParserc                   >    e Zd ZdZed             Zed             ZdS )CommandLineParsera  
    An object that knows how to split and join command-line arguments.

    It must be true that ``argv == split(join(argv))`` for all ``argv``.
    The reverse neednt be true - `join(split(cmd))` may result in the addition
    or removal of unnecessary escaping.
    c                     t           )z5 Join a list of arguments into a command line string NotImplementedErrorargvs    X/var/www/html/ai-engine/env/lib/python3.11/site-packages/numpy/distutils/_shell_utils.pyjoinzCommandLineParser.join   
     "!    c                     t           )z6 Split a command line string into a list of arguments r   cmds    r   splitzCommandLineParser.split   r   r   N__name__
__module____qualname____doc__staticmethodr   r    r   r   r	   r	      sT          " " \" " " \" " "r   r	   c                   >    e Zd ZdZed             Zed             ZdS )r   z
    The parsing behavior used by `subprocess.call("string")` on Windows, which
    matches the Microsoft C/C++ runtime.

    Note that this is _not_ the behavior of cmd.
    c                 *    t          j        |           S N)
subprocesslist2cmdliner   s    r   r   zWindowsParser.join*   s     &t,,,r   c                    dd l }	 |j         n# t          $ r t          w xY w| sg S d| z   } |j        j        j        }|                    |j                  |_        |j        |                    |j	                  f|_
        |	                                } || |                    |                    fdt          |j                  D             }|j        j                                      rJ |d         dk    sJ |dd          S )Nr   zdummy c                      g | ]
}|         S r   r   ).0ilpargss     r   
<listcomp>z'WindowsParser.split.<locals>.<listcomp>C   s    666aq	666r   dummy   )ctypeswindllAttributeErrorr   shell32CommandLineToArgvWPOINTER	c_wchar_prestypec_intargtypesbyrefrangevaluekernel32	LocalFree)r   r+   r/   nargsargsr'   s        @r   r   zWindowsParser.split/   s)   	&MMM 	& 	& 	&%%	&
  	In#]2E%+^^F4D%E%E"'-'79U9U&V###Ce)<)<==66665#5#5666=)33F;;;;; Aw'!!!!ABBxs    !Nr   r   r   r   r   r   #   sT          - - \-   \  r   r   c                   >    e Zd ZdZed             Zed             ZdS )r   zX
    The parsing behavior used by `subprocess.call("string", shell=True)` on Posix.
    c                 @    d                     d | D                       S )N c              3   4   K   | ]}t          |          V  d S r    r   )r%   args     r   	<genexpr>z#PosixParser.join.<locals>.<genexpr>Q   s(      33sc

333333r   )r   r   s    r   r   zPosixParser.joinO   s#    xx33d333333r   c                 .    t          j        | d          S )NT)posix)shlexr   r   s    r   r   zPosixParser.splitS   s    {3d++++r   Nr   r   r   r   r   r   K   sT          4 4 \4 , , \, , ,r   r   ntrC   )r   osrD   r!   r   ImportErrorpipes__all__r	   r   r   namer   r   r   r   <module>rK      s6    
			         ;
:
:" " " " " " " "&% % % % % % % %P
, 
, 
, 
, 
, 
, 
, 
, 7d?? LLLWLLL s    %%