class_docstr: ::
  
      with raw_mode(stdin):
          ''' the windows terminal is now in 'raw' mode. '''
  
  The ``fileno`` attribute is ignored. This is to be compatble with the
  `raw_input` method of `.vt100_input`.
class_docstr_tok: [":",":","with","raw_mode","(","stdin",")",":","``","'","the","windows","terminal","is","now","in","'raw","'","mode.","``","'","The","``","fileno","``","attribute","is","ignored",".","This","is","to","be","compatble","with","the","`","raw_input","`","method","of","`",".vt100_input","`","."]
code: def __enter__(self):
      # Remember original mode.
      original_mode = DWORD()
      windll.kernel32.GetConsoleMode(
          self.handle, pointer(original_mode)
      )
      self.original_mode = original_mode
  
      self._patch()
  
imports: from __future__ import unicode_literals
  from ctypes import windll, pointer
  from ctypes.wintypes import DWORD, HANDLE
  from six.moves import range
  from prompt_toolkit.key_binding.input_processor import KeyPress
  from prompt_toolkit.keys import Keys
  from prompt_toolkit.mouse_events import MouseEventType
  from prompt_toolkit.win32_types import EventTypes, KEY_EVENT_RECORD, MOUSE_EVENT_RECORD, INPUT_RECORD, STD_INPUT_HANDLE
  import msvcrt
  import os
  import sys
  import six
label_desc: Use image node_id 2 for calling the raw_mode obj's underlying member method code with example usage: obj.__enter__() without return types