Файловый менеджер - Редактировать - /home/digitalm/venv/lib/python3.7/site-packages/numpy/distutils/__pycache__/_shell_utils.cpython-37.pyc
Назад
B �5�g5 � @ s� d Z ddlZddlZddlZyddlmZ 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 �R/home/digitalm-up/venv/lib/python3.7/site-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 N)r )�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)� subprocess�list2cmdline)r r r r r * s zWindowsParser.joinc s� dd l }y |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)�lpargsr r � <listcomp>C s z'WindowsParser.split.<locals>.<listcomp>�dummy� )�ctypes�windll�AttributeErrorr Zshell32�CommandLineToArgvWZPOINTERZ c_wchar_p�restype�c_intZargtypesZbyref�range�value�kernel32Z LocalFree�AssertionError)r r r �nargs�argsr )r r r / s"