[Python] PUDB - unwanted output from _io.TextIOWrapper

Discussão em 'Python' iniciado por Stack, Agosto 1, 2025.

  1. Stack

    Stack Membro Participativo

    I've just started trying out PUDB and it seems great, but it keeps printing these types of unwanted messages that overwrite the window:

    2024-11-25 11:13:30,601 DEBUG Waiting for input: descriptors=[<socket.socket fd=3, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>, <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>], timeout=0
    2024-11-25 11:13:30,601 DEBUG Input ready: [(SelectorKey(fileobj=<_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>, fd=0, events=1, data=None), 1)]
    2024-11-25 11:13:30,601 DEBUG Decoded codes: ['down'], raw codes: [27, 91, 66]
    2024-11-25 11:13:30,603 DEBUG Drawing screen with size (237, 63)


    I don't get anything like this when debugging using pdb. The log level in my program is set to DEBUG, so I assume it's some DEBUG output from a module being used by PUDB.

    If it helps, I'm running this using python 3 via PuTTY on Ubuntu 20; there's no XServer, so PUDB uses the terminal window rather than popping up a new window. I'm simply doing python3 -m pudb.run <myscriptname & parameters>

    I've searched for answers on StackOverflow and elsewhere but not seen this kind of thing mentioned anywhere. Any suggestions on how to prevent these messages being printed to stdout?

    Continue reading...

Compartilhe esta Página