Skip to content

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

@acamilo

Description

@acamilo

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,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions