0

How can I update multi lines in python after print them?

Like this example:

enter image description here

Something like tput ( https://linux.die.net/man/1/tput ) inside python.

Thanks

Rui Martins
  • 3,337
  • 5
  • 35
  • 40

1 Answers1

1

Have you looked at the package rich? I believe it can do something like what you want.

https://github.com/willmcgugan/rich

K.Cl
  • 1,615
  • 2
  • 9
  • 18
  • @K.CI For Downloads `rich` looks perfect, thanks, however, my idea was to have a solution to print in any coordinate X, Y in console, like `tput`, Download progress was just an example – Rui Martins Mar 27 '21 at 23:23
  • 1
    I see. I was thinking not only about the progress bar, but also Live Display (https://rich.readthedocs.io/en/latest/live.html). I guess that would limit you to whatever space you reserved for it, though. If you want something closer to `tput`, then I'm afraid I can't help you at the moment. – K.Cl Mar 28 '21 at 00:06
  • Perfect! I'll try this! Thanks :) (I ran this example: `python -m rich.live`, and is this what I want) – Rui Martins Mar 29 '21 at 09:03