Skip to content

Full-screen App with Terminal Characters #1258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Queuecumber opened this issue Sep 29, 2020 · 2 comments
Open

Full-screen App with Terminal Characters #1258

Queuecumber opened this issue Sep 29, 2020 · 2 comments

Comments

@Queuecumber
Copy link

I'm writing a full screen app that takes input from multiple files which are being written to by remote processes. These processes use tqdm to display progress bars (their output is redirected to the files). If I read the files using standard python and use the print function, the bars display fine. Now I want to display all the files at the same time so I'm using this library to make a split screen full screen app. The problem is the display looks like this:

Screenshot from 2020-09-28 20-15-22

with each update printed on a new line preceded by ^M

is there a way to display this properly?

@Queuecumber
Copy link
Author

The actual character that it's using is \x1b[A "cursor up"

@Queuecumber
Copy link
Author

I see that it's supported in some capacity here: https://github.com/prompt-toolkit/python-prompt-toolkit/pull/1080/files#diff-0a8bfa00afa04946b2b3c8faaa853e12L58 but I'm not sure how to translate that into what I'm doing. I currently am writing the strings to a TextArea using ANSI formatted text with the tricks from #711

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant