File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 1010import signal
1111import traceback
1212import logging
13+ from functools import partial
1314from io import TextIOWrapper , FileIO
1415from logging import StreamHandler
1516
@@ -162,6 +163,12 @@ def abs_connection_file(self):
162163 displayhook_class = DottedObjectName ('ipykernel.displayhook.ZMQDisplayHook' ,
163164 help = "The importstring for the DisplayHook factory" ).tag (config = True )
164165
166+ capture_fd_output = Bool (
167+ True ,
168+ help = """Attempt to capture and forward low-level output, e.g. produced by Extension libraries.
169+ """ ,
170+ ).tag (config = True )
171+
165172 # polling
166173 parent_handle = Integer (int (os .environ .get ('JPY_PARENT_PID' ) or 0 ),
167174 help = """kill this process if its parent dies. On Windows, the argument
@@ -413,6 +420,9 @@ def init_io(self):
413420 e_stdout = None if self .quiet else sys .__stdout__
414421 e_stderr = None if self .quiet else sys .__stderr__
415422
423+ if not self .capture_fd_output :
424+ outstream_factory = partial (outstream_factory , watchfd = False )
425+
416426 sys .stdout = outstream_factory (self .session , self .iopub_thread ,
417427 'stdout' ,
418428 echo = e_stdout )
You can’t perform that action at this time.
0 commit comments