async def execute_process(*cmd, log=None, loop=None):
    '''
    Wrapper around asyncio.create_subprocess_exec.

    '''
    p = await asyncio.create_subprocess_exec(
        *cmd,
        stdin=asyncio.subprocess.PIPE,
        stdout=asyncio.subprocess.PIPE,
        stderr=asyncio.subprocess.PIPE,
        loop=loop)
    stdout, stderr = await p.communicate()
    if log:
        log.debug("Exec %s -> %d", cmd, p.returncode)
        if stdout:
            log.debug(stdout.decode('utf-8'))
        if stderr:
            log.debug(stderr.decode('utf-8'))
    return p.returncode == 0
async def execute_process ( * cmd , log = None , loop = None ) : p = await asyncio . create_subprocess_exec ( * cmd , stdin = asyncio . subprocess . PIPE , stdout = asyncio . subprocess . PIPE , stderr = asyncio . subprocess . PIPE , loop = loop ) stdout , stderr = await p . communicate ( ) if log : log . debug ( "Exec %s -> %d" , cmd , p . returncode ) if stdout : log . debug ( stdout . decode ( 'utf-8' ) ) if stderr : log . debug ( stderr . decode ( 'utf-8' ) ) return p . returncode == 0
Wrapper around asyncio.create_subprocess_exec.