parameters: (self)
docstring: Redirect input streams and set a display hook.
docstring_summary: Redirect input streams and set a display hook.
docstring_tokens: Redirect input streams and set a display hook .
function: def init_io(self):
          """Redirect input streams and set a display hook."""
          if self.outstream_class:
              outstream_factory = import_item(str(self.outstream_class))
              sys.stdout = outstream_factory(self.session, self.iopub_socket, u'stdout')
              sys.stderr = outstream_factory(self.session, self.iopub_socket, u'stderr')
          if self.displayhook_class:
              displayhook_factory = import_item(str(self.displayhook_class))
              sys.displayhook = displayhook_factory(self.session, self.iopub_socket)
function_tokens: def init_io ( self ) : if self . outstream_class : outstream_factory = import_item ( str ( self . outstream_class ) ) sys . stdout = outstream_factory ( self . session , self . iopub_socket , u'stdout' ) sys . stderr = outstream_factory ( self . session , self . iopub_socket , u'stderr' ) if self . displayhook_class : displayhook_factory = import_item ( str ( self . displayhook_class ) ) sys . displayhook = displayhook_factory ( self . session , self . iopub_socket )