Closed indrajitmajumdar closed 2 years ago
I agree with your observation that it would be helpful to have a way to retrieve the current cursor position.
However, it is not Colorama's goal to be a capable terminal user interface (TUI) library. Colorama focuses on converting ANSI codes into something that will work on older MS Windows terminals, so that programs which use ANSI codes can work on all common consumer operating systems. Colorama does also provide a few shorthand ANSI codes, like Cursor.UP and Fore.RED, but there is no intention to provide more sophisticated facilities than that.
For users who want things like that, I'd recommend other libraries like termcolor or Rich, which focus on the kind of things you describe as their central reason for existence, and they do a much better job at it than Colorama. While using them, you might want to continue using Colorama.init() as well, so that your program continues to work on MS Windows.
Good luck with your programs!
Supposedly, if i write
print(f"{Cursor.UP(5)}SOME TEXT")
then i can calculate back the original position from were i started in relative terms but if i writeprint(f"{Cursor.POS(0,0)}SOME TEXT")
then there is no way to calculate back the previous original position. So I think it is necessary to have a mathod to retrieve the current cursorx
andy
coordinate position.@tartley Warm Regards, Indrajit Majumdar. Thanks in Advance.