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 a18f007 commit 0c1db09Copy full SHA for 0c1db09
ipykernel/iostream.py
@@ -29,6 +29,8 @@
29
MASTER = 0
30
CHILD = 1
31
32
+PIPE_BUFFER_SIZE = 1000
33
+
34
# -----------------------------------------------------------------------------
35
# IO classes
36
@@ -367,11 +369,11 @@ def _watch_pipe_fd(self):
367
369
"""
368
370
371
try:
- bts = os.read(self._fid, 1000)
372
+ bts = os.read(self._fid, PIPE_BUFFER_SIZE)
373
while bts and self._should_watch:
- self.write(bts.decode())
374
+ self.write(bts.decode(errors='replace'))
375
os.write(self._original_stdstream_copy, bts)
376
377
except Exception:
378
self._exc = sys.exc_info()
379
0 commit comments