wL i>dZddlZddlZddlZddlmZdZdZdZy)acli-specific implementation of process utilities. cli - Common Language Infrastructure for IronPython. Code can run on any operating system. Check os.name for os- specific settings. This file is only meant to be imported by process.py, not by end-users. This file is largely untested. To become a full drop-in process interface for IronPython will probably require you to help fill in the details. N) arg_splitctjj|}d|_d|_tjj j |_d|_tjjj|}y)zY system(cmd) should work in a cli environment on Mac OSX, Linux, and Windows TFN) System DiagnosticsProcessStartInfoRedirectStandardOutputRedirectStandardErrorProcessWindowStyleNormal WindowStyleUseShellExecuteProcessStart)cmdpsiregs `/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/IPython/utils/_process_cli.pysystemrsg    - -c 2C!%C $C((;;BBCOC    $ $ * *3 /Cctjj|}d|_d|_tjj j |_d|_tjjj|}|j}|j}|j}|j}|S)z\ getoutput(cmd) should work in a cli environment on Mac OSX, Linux, and Windows TF)rrrr r r r r rrrStandardOutput ReadToEnd StandardError)rrrmyOutputoutputmyErrorerrors r getoutputr's    - -c 2C!%C $C((;;BBCOC    $ $ * *3 /C!!H    !FG    E Mrc tjjj|y#tj$rYytj $rYywxYw)z< Check if a process with the given PID (pid) exists TF)rrrGetProcessByIdInvalidOperationExceptionArgumentException)pids r check_pidr%:sM ""11#6  + +  # #s),AAA) __doc__clrros_process_commonrrrr%rrr+s+   ' 0& r