bundles / IPython latest / IPython / terminal / ptutils / _LazyPygmentsLexer
class
IPython.terminal.ptutils:_LazyPygmentsLexer
Signature
class _LazyPygmentsLexer(pygments_cls_name: str)Members
Summary
A PygmentsLexer-like object that only builds the real lexer (and imports the pygments submodule backing it) the first time it's actually asked to highlight something.
Extended Summary
Most sessions only ever use the Python lexer; building all the per-%%magic lexers (bash, html, javascript, perl, ruby, latex...) up front measurably slows down every terminal startup for languages that may never come up in that session.
Aliases
IPython.terminal.ptutils._LazyPygmentsLexer