def emit(self, msg, level=<NUM_LIT:1>, debug=False):
<EOL>if debug:<EOL><INDENT>if not self.debug:<EOL><INDENT>return<EOL><DEDENT>stream = sys.stderr<EOL><DEDENT>else:<EOL><INDENT>if self.verbose < level:<EOL><INDENT>return<EOL><DEDENT>stream = sys.stdout<EOL><DEDENT>print(msg, file=stream)<EOL>stream.flush()<EOL>
Emit a message to the user.

:param msg: The message to emit.  If ``debug`` is ``True``,
            the message will be emitted to ``stderr`` only if
            the ``debug`` attribute is ``True``.  If ``debug``
            is ``False``, the message will be emitted to
            ``stdout`` under the control of the ``verbose``
            attribute.
:param level: Ignored if ``debug`` is ``True``.  The message
              will only be emitted if the ``verbose``
              attribute is greater than or equal to the value
              of this parameter.  Defaults to 1.
:param debug: If ``True``, marks the message as a debugging
              message.  The message will only be emitted if
              the ``debug`` attribute is ``True``.