Skip to content
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

[QUESTION] What kind of interface does textual require to render properly in a custom terminal? #3671

Open
acamilo opened this issue Mar 20, 2025 · 1 comment

Comments

@acamilo
Copy link

acamilo commented Mar 20, 2025

I'm trying to display logging info inside a pyQT application, I found an excellent widget that emulates a terminal (using termqt. https://github.com/wyzula-jan/termqt-qtpy/tree/master

I've written a shim to redirect stdout and stderror into the widget by creating an object with the write method.

def write(self, m): self.widget.stdout(m.encode('utf-8'))

This seems to work, I see logging output with all the right colors. There is some weird behavior, for example, the source file:line number additions are missing at the end of each log line.

I was wondering if I'm not providing a complete interface to rich and the logger. What does rich need from my interface? Do I need to implement more than just write? Is there some metadata i need to provide to rich?

Thanks,

Copy link

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

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