def execute(self, command, blocking=True, exec_create_kwargs=None, exec_start_kwargs=None):
logger.info("<STR_LIT>", command)<EOL>exec_create_kwargs = exec_create_kwargs or {}<EOL>exec_start_kwargs = exec_start_kwargs or {}<EOL>exec_start_kwargs["<STR_LIT>"] = True  <EOL>exec_i = self.d.exec_create(self.get_id(), command, **exec_create_kwargs)<EOL>output = self.d.exec_start(exec_i, **exec_start_kwargs)<EOL>if blocking:<EOL><INDENT>response = []<EOL>for line in output:<EOL><INDENT>response.append(line)<EOL>logger.info("<STR_LIT:%s>", line.decode("<STR_LIT:utf-8>").strip("<STR_LIT>"))<EOL><DEDENT>e_inspect = self.d.exec_inspect(exec_i)<EOL>exit_code = e_inspect["<STR_LIT>"]<EOL>if exit_code:<EOL><INDENT>logger.error("<STR_LIT>")<EOL>logger.info("<STR_LIT>", e_inspect)<EOL>raise ConuException("<STR_LIT>" % (<EOL>command, exit_code))<EOL><DEDENT>return response<EOL><DEDENT>return output<EOL>
Execute a command in this container -- the container needs to be running.

If the command fails, a ConuException is thrown.

This is a blocking call by default and writes output of the command to logger
using the INFO level -- this behavior can be changed if you set
the argument `blocking` to `False`.

If not blocking, you should consume the returned iterator in order to see logs or know
when the command finished:

::

    for line in container.execute(["ping", "-c", "4", "8.8.8.8"], blocking=False):
        print(line)
    print("command finished")

:param command: list of str, command to execute in the container
:param blocking: bool, if True blocks until the command finishes
:param exec_create_kwargs: dict, params to pass to exec_create()
:param exec_start_kwargs: dict, params to pass to exec_start()
:return: iterator if non-blocking or list of bytes if blocking