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,
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,