MCPcopy Index your code
hub / github.com/RustPython/RustPython / kill_python

Function kill_python

Lib/test/support/script_helper.py:219–228  ·  view source on GitHub ↗

Run the given Popen process until completion and return stdout.

(p)

Source from the content-addressed store, hash-verified

217
218
219def kill_python(p):
220 """Run the given Popen process until completion and return stdout."""
221 p.stdin.close()
222 data = p.stdout.read()
223 p.stdout.close()
224 # try to cleanup the child so we don't appear to leak when running
225 # with regrtest -R.
226 p.wait()
227 subprocess._cleanup()
228 return data
229
230
231def make_script(script_dir, script_basename, source, omit_suffix=False):

Calls 4

closeMethod · 0.45
readMethod · 0.45
waitMethod · 0.45
_cleanupMethod · 0.45