class_docstr: Implement Idle Shell history mechanism.
  
  store - Store source statement (called from pyshell.resetoutput).
  fetch - Fetch stored statement matching prefix already entered.
  history_next - Bound to <<history-next>> event (default Alt-N).
  history_prev - Bound to <<history-prev>> event (default Alt-P).
docstr: Initialize data attributes and bind event methods.
  
  .text - Idle wrapper of tk Text widget, with .bell().
  .history - source statements, possibly with multiple lines.
  .prefix - source already entered at prompt; filters history list.
  .pointer - index into history.
  .cyclic - wrap around history list (or not).
docstr_tok: ["Initialize","data","attributes","and","bind","event","methods",".",".text","-","Idle","wrapper","of","tk","Text","widget",",","with",".bell","(",")",".",".history","-","source","statements",",","possibly","with","multiple","lines",".",".prefix","-","source","already","entered","at","prompt",";","filters","history","list",".",".pointer","-","index","into","history",".",".cyclic","-","wrap","around","history","list","(","or","not",")","."]
code: def __init__(self, text):
      """Initialize data attributes and bind event methods.
  
      .text - Idle wrapper of tk Text widget, with .bell().
      .history - source statements, possibly with multiple lines.
      .prefix - source already entered at prompt; filters history list.
      .pointer - index into history.
      .cyclic - wrap around history list (or not).
      """
      self.text = text
      self.history = []
      self.prefix = None
      self.pointer = None
      self.cyclic = idleConf.GetOption(
          "main", "History", "cyclic", 1, "bool"
      )
      text.bind("<<history-previous>>", self.history_prev)
      text.bind("<<history-next>>", self.history_next)
  
imports: from idlelib.config import idleConf
label_desc: Use image node_id 1 to create a new History object  with example: obj = History(text)