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: Get lines of history from a string of ranges, as used by magic
  commands %hist, %save, %macro, etc.
  
  Parameters
  ----------
  rangestr : str
      A string specifying ranges, e.g. "5 ~2/1-4". If empty string is used,
      this will return everything from current session's history.
  
      See the documentation of :func:`%history` for the full details.
  
  raw, output : bool
      As :meth:`get_range`
  
  Returns
  -------
  Tuples as :meth:`get_range`
docstr_tok: ["Get","lines","of","history","from","a","string","of","ranges",",","as","used","by","magic","commands","%","hist",",","%","save",",","%","macro",",","etc",".","Parameters","--","--","--","--","--","rangestr",":","str","A","string","specifying","ranges",",","e.g",".","``","5","~2\/1-4","''",".","If","empty","string","is","used",",","this","will","return","everything","from","current","session","'s","history",".","See","the","documentation","of",":","func",":","`","%","history","`","for","the","full","details",".","raw",",","output",":","bool","As",":","meth",":","`","get_range","`","Returns","--","--","--","-","Tuples","as",":","meth",":","`","get_range","`"]
code: def get_range_by_str(self, rangestr, raw=True, output=False):
      """Get lines of history from a string of ranges, as used by magic
      commands %hist, %save, %macro, etc.
  
      Parameters
      ----------
      rangestr : str
          A string specifying ranges, e.g. "5 ~2/1-4". If empty string is used,
          this will return everything from current session's history.
  
          See the documentation of :func:`%history` for the full details.
  
      raw, output : bool
          As :meth:`get_range`
  
      Returns
      -------
      Tuples as :meth:`get_range`
      """
      for sess, s, e in extract_hist_ranges(rangestr):
          for line in self.get_range(
              sess, s, e, raw=raw, output=output
          ):
              yield line
  
imports: import atexit
  import datetime
  from pathlib import Path
  import re
  import sqlite3
  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 traitlets import Any, Bool, Dict, Instance, Integer, List, Unicode, Union, TraitError, default, observe
label_desc: Use image node_id 13 for calling the HistoryAccessor obj's underlying member method code with example usage: obj.get_range_by_str(rangestr, raw, output) without return types