1 2 3 4 5
| import subprocess startupinfo = subprocess.STARTUPINFO() startupinfo.dwFlags = subprocess.CREATE_NEW_CONSOLE | subprocess.STARTF_USESHOWWINDOW startupinfo.wShowWindow = subprocess.SW_HIDE subprocess.Popen(["ping", "-c 1", ip], stdout=subprocess.PIPE, stderr=subprocess.PIPE, startupinfo=startupinfo)
|