alexmojaki / alexmojaki/python_runner

Flush each print() call

オープン
#5 コメント 1 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。