We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a58564 commit 8045b8fCopy full SHA for 8045b8f
src/prompt_toolkit/application/current.py
@@ -53,15 +53,15 @@ def __repr__(self) -> str:
53
54
@property
55
def input(self) -> Input:
56
- if self._input is None:
+ if self._input is None or self._input.closed:
57
from prompt_toolkit.input.defaults import create_input
58
59
self._input = create_input()
60
return self._input
61
62
63
def output(self) -> Output:
64
- if self._output is None:
+ if self._output is None or (self._output.stdout and self._output.stdout.closed):
65
from prompt_toolkit.output.defaults import create_output
66
67
self._output = create_output()
0 commit comments