MCPcopy Create free account
hub / github.com/pyinvoke/invoke / write_our_output

Method write_our_output

invoke/runners.py:730–748  ·  view source on GitHub ↗

Write ``string`` to ``stream``. Also calls ``.flush()`` on ``stream`` to ensure that real terminal streams don't buffer. :param stream: A file-like stream object, mapping to the ``out_stream`` or ``err_stream`` parameters of `run`.

(self, stream: IO, string: str)

Source from the content-addressed store, hash-verified

728 yield self.decode(data)
729
730 def write_our_output(self, stream: IO, string: str) -> None:
731 """
732 Write ``string`` to ``stream``.
733
734 Also calls ``.flush()`` on ``stream`` to ensure that real terminal
735 streams don't buffer.
736
737 :param stream:
738 A file-like stream object, mapping to the ``out_stream`` or
739 ``err_stream`` parameters of `run`.
740
741 :param string: A Unicode string object.
742
743 :returns: ``None``.
744
745 .. versionadded:: 1.0
746 """
747 stream.write(string)
748 stream.flush()
749
750 def _handle_output(
751 self,

Callers 2

_handle_outputMethod · 0.95
handle_stdinMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected