MCPcopy Index your code
hub / github.com/plotly/dash / run_command_with_process

Function run_command_with_process

dash/_utils.py:238–249  ·  view source on GitHub ↗
(cmd)

Source from the content-addressed store, hash-verified

236
237
238def run_command_with_process(cmd):
239 is_win = sys.platform == "win32"
240 with subprocess.Popen(shlex.split(cmd, posix=is_win), shell=is_win) as proc:
241 proc.wait()
242 if proc.poll() is None:
243 logger.warning("🚨 trying to terminate subprocess in safe way")
244 try:
245 proc.communicate()
246 except Exception: # pylint: disable=broad-except
247 logger.exception("🚨 first try communicate failed")
248 proc.kill()
249 proc.communicate()
250
251
252def compute_hash(path):

Callers 2

npmMethod · 0.85
bundlesMethod · 0.85

Calls 1

killMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…