class_docstr: Access the history database without adding to it.
  
  This is intended for use by standalone history tools. IPython shells use
  HistoryManager, below, which is a subclass of this.
class_docstr_tok: ["Access","the","history","database","without","adding","to","it",".","This","is","intended","for","use","by","standalone","history","tools",".","IPython","shells","use","HistoryManager",",","below",",","which","is","a","subclass","of","this","."]
docstr: Retrieve input by session.
  
  Parameters
  ----------
  session : int
      Session number to retrieve.
  start : int
      First line to retrieve.
  stop : int
      End of line range (excluded from output itself). If None, retrieve
      to the end of the session.
  raw : bool
      If True, return untranslated input
  output : bool
      If True, attempt to include output. This will be 'real' Python
      objects for the current session, or text reprs from previous
      sessions if db_log_output was enabled at the time. Where no output
      is found, None is used.
  
  Returns
  -------
  entries
    An iterator over the desired lines. Each line is a 3-tuple, either
    (session, line, input) if output is False, or
    (session, line, (input, output)) if output is True.
docstr_tok: ["Retrieve","input","by","session",".","Parameters","--","--","--","--","--","session",":","int","Session","number","to","retrieve",".","start",":","int","First","line","to","retrieve",".","stop",":","int","End","of","line","range","(","excluded","from","output","itself",")",".","If","None",",","retrieve","to","the","end","of","the","session",".","raw",":","bool","If","True",",","return","untranslated","input","output",":","bool","If","True",",","attempt","to","include","output",".","This","will","be","'real","'","Python","objects","for","the","current","session",",","or","text","reprs","from","previous","sessions","if","db_log_output","was","enabled","at","the","time",".","Where","no","output","is","found",",","None","is","used",".","Returns","--","--","--","-","entries","An","iterator","over","the","desired","lines",".","Each","line","is","a","3-tuple",",","either","(","session",",","line",",","input",")","if","output","is","False",",","or","(","session",",","line",",","(","input",",","output",")",")","if","output","is","True","."]
code: def get_range(
      self, session, start=1, stop=None, raw=True, output=False
  ):
      """Retrieve input by session.
  
      Parameters
      ----------
      session : int
          Session number to retrieve.
      start : int
          First line to retrieve.
      stop : int
          End of line range (excluded from output itself). If None, retrieve
          to the end of the session.
      raw : bool
          If True, return untranslated input
      output : bool
          If True, attempt to include output. This will be 'real' Python
          objects for the current session, or text reprs from previous
          sessions if db_log_output was enabled at the time. Where no output
          is found, None is used.
  
      Returns
      -------
      entries
        An iterator over the desired lines. Each line is a 3-tuple, either
        (session, line, input) if output is False, or
        (session, line, (input, output)) if output is True.
      """
      if stop:
          lineclause = "line >= ? AND line < ?"
          params = (session, start, stop)
      else:
          lineclause = "line>=?"
          params = (session, start)
  
      return self._run_sql(
          "WHERE session==? AND %s" % lineclause,
          params,
          raw=raw,
          output=output,
      )
  
imports: from __future__ import print_function
  import atexit
  import datetime
  import os
  import re
  import threading
  from traitlets.config.configurable import LoggingConfigurable
  from decorator import decorator
  from IPython.utils.decorators import undoc
  from IPython.paths import locate_profile
  from IPython.utils import py3compat
  from traitlets import Any, Bool, Dict, Instance, Integer, List, Unicode, TraitError, default, observe
  from warnings import warn
label_desc: Use image node_id 11 for calling the HistoryAccessor obj's underlying member method code with example usage: obj.get_range(session, start, stop, raw, output) and returns: self