MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / call

Function call

tools/python-3.11.9-amd64/Lib/subprocess.py:381–395  ·  view source on GitHub ↗

Run command with arguments. Wait for command to complete or timeout, 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

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

Callers 2

mainFunction · 0.90
check_callFunction · 0.70

Calls 3

PopenClass · 0.70
waitMethod · 0.45
killMethod · 0.45

Tested by 1

mainFunction · 0.72