(*popenargs, timeout=None, **kwargs)
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"])
Run command with arguments.  Wait for command to complete or
    timeout, then return the returncode attribute.
Run command with arguments . Wait for command to complete or timeout then return the returncode attribute .
def call(*popenargs, timeout=None, **kwargs):
    """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"])
    """
    with Popen(*popenargs, **kwargs) as p:
        try:
            return p.wait(timeout=timeout)
        except:  # Including KeyboardInterrupt, wait handled that.
            p.kill()
            # We don't call p.wait() again as p.__exit__ does that for us.
            raise
def call ( * popenargs , timeout = None , * * kwargs ) : with Popen ( * popenargs , * * kwargs ) as p : try : return p . wait ( timeout = timeout ) except : # Including KeyboardInterrupt, wait handled that. p . kill ( ) # We don't call p.wait() again as p.__exit__ does that for us. raise