mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Update display_during_execution
This commit is contained in:
parent
719cd8cde3
commit
8cac16b452
1 changed files with 3 additions and 2 deletions
|
@ -126,8 +126,9 @@ def dvi_to_svg(dvi_file, regen_if_exists=False):
|
|||
def display_during_execution(message):
|
||||
# Only show top line
|
||||
to_print = message.split("\n")[0]
|
||||
if len(to_print) > 80:
|
||||
to_print = to_print[:77] + "..."
|
||||
max_characters = os.get_terminal_size().columns - 1
|
||||
if len(to_print) > max_characters:
|
||||
to_print = to_print[:max_characters - 3] + "..."
|
||||
try:
|
||||
print(to_print, end="\r")
|
||||
yield
|
||||
|
|
Loading…
Add table
Reference in a new issue