alexmojaki / alexmojaki/python_runner

Flush each print() call

未關閉
#5 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
8
分支
0
PR 合併指標
30 天內沒有已合併 PR

描述

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

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。