← Back
Editing: process.cpython-311.pyc
� �@�cV � �� � d Z ddlZddlZddlZej dk r ddlmZmZmZm Z n$ej dk r ddl mZmZmZm Z nddlmZmZmZm Z ddlm Z mZmZ G d� d e� � Zd � Zd� ZdS )z0 Utilities for working with external processes. � N�win32� )�system� getoutput� arg_split� check_pid�cli)�getoutputerror�get_output_error_code�process_handlerc � � e Zd ZdS )�FindCmdErrorN)�__name__� __module__�__qualname__� � �7/usr/lib/python3/dist-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. Nzcommand could not be found: %s)�shutil�whichr )�cmd�paths r �find_cmdr s1 � �&