MCPcopy Index your code
hub / github.com/python/cpython / call

Function call

Lib/subprocess.py:387–401  ·  view source on GitHub ↗

Run command with arguments. Wait for command to complete or for timeout seconds, then return the returncode attribute. The arguments are the same as for the Popen constructor. Example: retcode = call(["ls", "-l"])

(*popenargs, timeout=None, **kwargs)

Source from the content-addressed store, hash-verified

385
386
387def call(*popenargs, timeout=None, **kwargs):
388 """Run command with arguments. Wait for command to complete or
389 for timeout seconds, then return the returncode attribute.
390
391 The arguments are the same as for the Popen constructor. Example:
392
393 retcode = call(["ls", "-l"])
394 """
395 with Popen(*popenargs, **kwargs) as p:
396 try:
397 return p.wait(timeout=timeout)
398 except: # Including KeyboardInterrupt, wait handled that.
399 p.kill()
400 # We don't call p.wait() again as p.__exit__ does that for us.
401 raise
402
403
404def check_call(*popenargs, **kwargs):

Callers 1

check_callFunction · 0.70

Calls 3

PopenClass · 0.70
waitMethod · 0.45
killMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…