MCPcopy Create free account
hub / github.com/bugy/script-server / create_process_wrapper

Function create_process_wrapper

src/execution/executor.py:23–36  ·  view source on GitHub ↗
(executor, command, working_directory, all_env_variables)

Source from the content-addressed store, hash-verified

21
22
23def create_process_wrapper(executor, command, working_directory, all_env_variables):
24 run_pty = executor.config.requires_terminal
25 if run_pty and not os_utils.is_pty_supported():
26 LOGGER.warning(
27 "Requested PTY mode, but it's not supported for this OS (" + sys.platform + '). Falling back to POpen')
28 run_pty = False
29
30 if run_pty:
31 from execution import process_pty
32 process_wrapper = process_pty.PtyProcessWrapper(command, working_directory, all_env_variables)
33 else:
34 process_wrapper = process_popen.POpenProcessWrapper(command, working_directory, all_env_variables)
35
36 return process_wrapper
37
38
39_process_creator = create_process_wrapper

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected