MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / print_text_animated

Function print_text_animated

camel/utils/commons.py:51–63  ·  view source on GitHub ↗

r"""Prints the given text with an animated effect. Args: text (str): The text to print. delay (float, optional): The delay between each character printed. (default: :obj:`0.02`) end (str, optional): The end character to print after each character

(text, delay: float = 0.02, end: str = "")

Source from the content-addressed store, hash-verified

49
50
51def print_text_animated(text, delay: float = 0.02, end: str = ""):
52 r"""Prints the given text with an animated effect.
53
54 Args:
55 text (str): The text to print.
56 delay (float, optional): The delay between each character printed.
57 (default: :obj:`0.02`)
58 end (str, optional): The end character to print after each
59 character of text. (default: :obj:`""`)
60 """
61 for char in text:
62 print(char, end=end, flush=True)
63 time.sleep(delay)
64
65
66def get_prompt_template_key_words(template: str) -> Set[str]:

Callers 7

display_optionsMethod · 0.90
get_inputMethod · 0.90
_process_taskMethod · 0.90
_process_taskMethod · 0.90
stepMethod · 0.90
get_optionMethod · 0.90
reduce_stepMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected