Format: application/x-python-code
⬇ Download File (1.8 KB)
   1  o
   2  
   3  ��h��@sDdZddlZddlZddlZddlmZdd�Zdd�Zd	d
   4  �ZdS)a�cli-specific implementation of process utilities.
   5  
   6  cli - Common Language Infrastructure for IronPython. Code
   7        can run on any operating system. Check os.name for os-
   8        specific settings.
   9  
  10  This file is only meant to be imported by process.py, not by end-users.
  11  
  12  This file is largely untested. To become a full drop-in process
  13  interface for IronPython will probably require you to help fill
  14  in the details. 
  15  �N�)�	arg_splitcCs<tj�|�}d|_d|_tjjj|_d|_tjj	�
  16  |�}dS)zY
  17      system(cmd) should work in a cli environment on Mac OSX, Linux,
  18      and Windows
  19      TFN)�System�Diagnostics�ProcessStartInfo�RedirectStandardOutput�RedirectStandardError�ProcessWindowStyle�Normal�WindowStyle�UseShellExecute�Process�Start)�cmd�psi�reg�r�Pc:\Users\shubh\Videos\agent\nova\Lib\site-packages\IPython/utils/_process_cli.py�systemsrcCsXtj�|�}d|_d|_tjjj|_d|_tjj	�
  20  |�}|j}|��}|j
  21  }|��}|S)z\
  22      getoutput(cmd) should work in a cli environment on Mac OSX, Linux,
  23      and Windows
  24      TF)rrrrrr	r
  25  rrr
  26  rZStandardOutputZ	ReadToEnd�
  27  StandardError)rrrZmyOutput�outputZmyError�errorrrr�	getoutput'srcCs@z
  28  tjj�|�WdStjyYdStjyYdSw)z<
  29      Check if a process with the given PID (pid) exists
  30      TF)rrr
  31  ZGetProcessByIdZInvalidOperationExceptionZArgumentException)�pidrrr�	check_pid:s�r)	�__doc__Zclrr�osZ_process_commonrrrrrrrr�<module>s