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". See :func:`magic_history` for full details. raw, output :
(self, rangestr, raw=True, output=False)
| 449 | params, raw=raw, output=output) |
| 450 | |
| 451 | def get_range_by_str(self, rangestr, raw=True, output=False): |
| 452 | """Get lines of history from a string of ranges, as used by magic |
| 453 | commands %hist, %save, %macro, etc. |
| 454 | |
| 455 | Parameters |
| 456 | ---------- |
| 457 | rangestr : str |
| 458 | A string specifying ranges, e.g. "5 ~2/1-4". See |
| 459 | :func:`magic_history` for full details. |
| 460 | raw, output : bool |
| 461 | As :meth:`get_range` |
| 462 | |
| 463 | Returns |
| 464 | ------- |
| 465 | Tuples as :meth:`get_range` |
| 466 | """ |
| 467 | for sess, s, e in extract_hist_ranges(rangestr): |
| 468 | for line in self.get_range(sess, s, e, raw=raw, output=output): |
| 469 | yield line |
| 470 | |
| 471 | |
| 472 | class HistoryManager(HistoryAccessor): |
no test coverage detected