Skip to content

Commit

Permalink
clear_end_line
Browse files Browse the repository at this point in the history
  • Loading branch information
rsalmei committed Mar 21, 2022
1 parent 9234e29 commit e298dfe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion alive_progress/animations/bars.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def animate(bar): # pragma: no cover
rendition, percent = next(bar_gen)
print(f'\r{join_cells(rendition)}', CYAN(max(0., percent), "6.1%"))
print(DIM('(press CTRL+C to stop)'), end='')
FULL.clear_end()
FULL.clear_end_line()
time.sleep(1 / 15)
FULL.cursor_up_1()
except KeyboardInterrupt:
Expand Down
2 changes: 1 addition & 1 deletion alive_progress/animations/spinner_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def animate(spec): # pragma: no cover
n = next(frames)
print(f'\r{CYAN(c, cf)}:{CYAN(i, lf)} -->{join_cells(f)}<-- {CYAN(n, tf)} ')
print(DIM('(press CTRL+C to stop)'), end='')
FULL.clear_end()
FULL.clear_end_line()
time.sleep(1 / 15)
FULL.cursor_up_1()
except KeyboardInterrupt:
Expand Down
6 changes: 3 additions & 3 deletions alive_progress/styles/exhibit.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,20 +169,20 @@ def message(m, s=None):

title = 'Welcome to alive-progress!', next(logo)
print_cells(title, cols) # line 1.
FULL.clear_end()
FULL.clear_end_line()
print()

info = fps_monitor.format(frame / (current - start)), next(info_player)
print_cells(info, cols) # line 2.
FULL.clear_end()
FULL.clear_end_line()

content = [next(gen) for gen in gens] # always consume gens, to maintain them in sync.
for line_num, fragments in enumerate(content, 3):
if line_num > lines:
break
print()
print_cells(fragments, cols)
FULL.clear_end()
FULL.clear_end_line()

frame += 1
current = time.perf_counter()
Expand Down

0 comments on commit e298dfe

Please sign in to comment.