Skip to content

Commit 3f67a62

Browse files
committed
Add a flush() method to FakeStdin.
1 parent 328fd7b commit 3f67a62

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bpython/cli.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ def __init__(self, interface):
105105
def __iter__(self):
106106
return iter(self.readlines())
107107

108+
def flush(self):
109+
"""Flush the internal buffer. This is a no-op. Flushing stdin
110+
doesn't make any sense anyway."""
111+
108112
def write(self, value):
109113
# XXX IPython expects sys.stdin.write to exist, there will no doubt be
110114
# others, so here's a hack to keep them happy

0 commit comments

Comments
 (0)