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 = "")
| 49 | |
| 50 | |
| 51 | def 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 | |
| 66 | def get_prompt_template_key_words(template: str) -> Set[str]: |
no outgoing calls
no test coverage detected