From dcbf444872b81248ce958f05d47abad6e8a237a7 Mon Sep 17 00:00:00 2001 From: robot-piglet Date: Wed, 18 Dec 2024 11:04:10 +0300 Subject: Intermediate changes commit_hash:1f2ebe313aea1039145a9d68dcd511d5f22f383a --- contrib/python/ipython/py3/IPython/utils/_process_cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'contrib/python/ipython/py3/IPython/utils/_process_cli.py') diff --git a/contrib/python/ipython/py3/IPython/utils/_process_cli.py b/contrib/python/ipython/py3/IPython/utils/_process_cli.py index 86e918a8d02..e303202e8ad 100644 --- a/contrib/python/ipython/py3/IPython/utils/_process_cli.py +++ b/contrib/python/ipython/py3/IPython/utils/_process_cli.py @@ -35,6 +35,7 @@ def system(cmd): # Start up process: reg = System.Diagnostics.Process.Start(psi) + def getoutput(cmd): """ getoutput(cmd) should work in a cli environment on Mac OSX, Linux, @@ -53,6 +54,7 @@ def getoutput(cmd): error = myError.ReadToEnd() return output + def check_pid(pid): """ Check if a process with the given PID (pid) exists @@ -66,4 +68,4 @@ def check_pid(pid): return True except System.ArgumentException: # process with given pid isn't running - return False + return False -- cgit v1.3