mirror of
https://github.com/clearml/wexpect-venv
synced 2025-01-31 02:46:59 +00:00
replace CreateProcess to subprocess.Popen
This commit is contained in:
parent
c8977d8460
commit
8f7008d72f
@ -386,10 +386,12 @@ class SpawnBase:
|
|||||||
logger.info(f'Console starter command:{commandLine}')
|
logger.info(f'Console starter command:{commandLine}')
|
||||||
|
|
||||||
# start the console-reader
|
# start the console-reader
|
||||||
_, _, self.console_pid, __otid = win32process.CreateProcess(
|
import subprocess
|
||||||
None, commandLine, None, None, False, win32process.CREATE_NEW_CONSOLE, environ,
|
startupinfo = subprocess.STARTUPINFO()
|
||||||
self.cwd, si
|
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
||||||
)
|
|
||||||
|
proc = subprocess.Popen(commandLine,creationflags=subprocess.CREATE_NEW_CONSOLE, startupinfo=startupinfo)
|
||||||
|
self.console_pid = proc.pid
|
||||||
|
|
||||||
def get_console_process(self, force=False):
|
def get_console_process(self, force=False):
|
||||||
if force or self.console_process is None:
|
if force or self.console_process is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user