MCPcopy Index your code
hub / github.com/pywebio/PyWebIO / put_text

Function put_text

pywebio/output.py:383–400  ·  view source on GitHub ↗

Output plain text :param texts: Texts need to output. The type can be any object, and the `str()` function will be used for non-string objects. :param str sep: The separator between the texts :param bool inline: Use text as an inline element (no line break at the end of the text).

(*texts: Any, sep: str = ' ', inline: bool = False, scope: str = None,
             position: int = OutputPosition.BOTTOM)

Source from the content-addressed store, hash-verified

381
382
383def put_text(*texts: Any, sep: str = ' ', inline: bool = False, scope: str = None,
384 position: int = OutputPosition.BOTTOM) -> Output:
385 """
386 Output plain text
387
388 :param texts: Texts need to output. The type can be any object, and the `str()` function will be used for non-string objects.
389 :param str sep: The separator between the texts
390 :param bool inline: Use text as an inline element (no line break at the end of the text). Default is ``False``
391 :param str scope: The target scope to output. If the scope does not exist, no operation will be performed.
392
393 Can specify the scope name or use a integer to index the runtime scope stack.
394 :param int position: The position where the content is output in target scope
395
396 For more information about ``scope`` and ``position`` parameter, please refer to :ref:`User Manual <scope_param>`
397 """
398 content = sep.join(str(i) for i in texts)
399 spec = _get_output_spec('text', content=content, inline=inline, scope=scope, position=position)
400 return Output(spec)
401
402
403def _put_message(color, contents, closable=False, scope=None, position=OutputPosition.BOTTOM) -> Output:

Callers 15

targetFunction · 0.85
widgetsFunction · 0.85
show_popupFunction · 0.85
targetFunction · 0.85
scoped_funcFunction · 0.85
show_msgFunction · 0.85
basic_outputFunction · 0.85
edit_rowFunction · 0.85
background_outputFunction · 0.85
backgroundFunction · 0.85
coro_background_outputFunction · 0.85
basic_inputFunction · 0.85

Calls 2

_get_output_specFunction · 0.85
OutputClass · 0.85

Tested by 1

targetFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…