alexmojaki / alexmojaki/python_runner

Flush each print() call

Aberta
#5 1 comentário 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
8
Forks
0
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

Hi Alex,
Imagine the following code:
'''
print(1)
print(2)
print(3)
'''

Currently the output from these prints will accumulate in the OutputBuffer and sent according to its function should_flush.
I'm trying to flush immediately after each print().
I would overwrite the should_flush function, but since the Runner class has an instance of the OutputBuffer, I don't know how to overwrite that from the outside without rewriting the OutputBuffer class.

Is there a recommended way of changing the conditions for flushing?

The Big Picture is to build a custom debugger, thus needing to stop execution after each line of code.

Kind regards,
Jeff

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.