class_docstr: A KernelClient with blocking APIs
  
  ``get_[channel]_msg()`` methods wait for and return messages on channels,
  raising :exc:`queue.Empty` if no message arrives within ``timeout`` seconds.
class_docstr_tok: ["A","KernelClient","with","blocking","APIs","``","get_","[","channel","]","_msg","(",")","``","methods","wait","for","and","return","messages","on","channels",",","raising",":","exc",":","`","queue.Empty","`","if","no","message","arrives","within","``","timeout","``","seconds","."]
docstr: Handle an input request
docstr_tok: ["Handle","an","input","request"]
code: def _stdin_hook_default(self, msg):
      """Handle an input request"""
      content = msg["content"]
      if content.get("password", False):
          prompt = getpass
      elif sys.version_info < (3,):
          prompt = raw_input
      else:
          prompt = input
  
      try:
          raw_data = prompt(content["prompt"])
      except EOFError:
          # turn EOFError into EOF character
          raw_data = "\x04"
      except KeyboardInterrupt:
          sys.stdout.write("\n")
          return
  
      # only send stdin reply if there *was not* another request
      # or execution finished while we were reading.
      if not (
          self.stdin_channel.msg_ready()
          or self.shell_channel.msg_ready()
      ):
          self.input(raw_data)
  
file_path: catboost/contrib/python/jupyter-client/py2/jupyter_client/blocking/client.py
imports: from __future__ import print_function
  from functools import partial
  from getpass import getpass
  import sys
  import time
  import zmq
  from traitlets import Type
  from jupyter_client.channels import HBChannel
  from jupyter_client.client import KernelClient
  from .channels import ZMQSocketChannel
label_desc: Use image node_id 3 for calling the BlockingKernelClient obj's underlying member method code with example usage: obj._stdin_hook_default(msg) without return types