OwlCyberSecurity - MANAGER
Edit File: _shell_utils.cpython-38.pyc
U �p�]5 � @ s� d Z ddlZddlZddlZzddlmZ W n ek rL ddlmZ Y nX dddgZG dd� d�ZG d d� d�Z G d d� d�Z ejdkr�e Znejdkr�e ZdS ) zq Helper functions for interacting with the shell, and consuming shell-style parameters provided in config files. � N��quote� WindowsParser�PosixParser�NativeParserc @ s( e Zd ZdZedd� �Zedd� �ZdS )�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 C s t �dS )z5 Join a list of arguments into a command line string N��NotImplementedError��argv� r �>/usr/lib/python3/dist-packages/numpy/distutils/_shell_utils.py�join s zCommandLineParser.joinc C s t �dS )z6 Split a command line string into a list of arguments Nr ��cmdr r r �split s zCommandLineParser.splitN��__name__� __module__�__qualname__�__doc__�staticmethodr r r r r r r s r c @ s( e Zd ZdZedd� �Zedd� �ZdS )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 C s t �| �S �N)� subprocessZlist2cmdliner r r r r * s zWindowsParser.joinc s� dd l }z |j W n tk r* t�Y nX | s4g S d| } |jjj}|�|j�|_|j|�|j �f|_ |� � }|| |�|��� � fdd�t|j �D �}|jj�� �r�t�|d dks�t�|dd � S )Nr zdummy c s g | ]}� | �qS r r )�.0�i�Zlpargsr r � <listcomp>C s z'WindowsParser.split.<locals>.<listcomp>Zdummy� )�ctypesZwindll�AttributeErrorr Zshell32�CommandLineToArgvWZPOINTERZ c_wchar_pZrestypeZc_intZargtypesZbyref�range�valueZkernel32Z LocalFree�AssertionError)r r r! �nargs�argsr r r r / s"