IPython Documentation

Table Of Contents

Previous topic

Module: nbconvert.utils.exceptions

Next topic

Module: nbconvert.utils.pandoc

This Page

Module: nbconvert.utils.lexers

A custom pygments lexer for IPython code cells.

Informs The pygments highlighting library of the quirks of IPython’s superset of Python – magic commands, !shell commands, etc.

1 Class

class IPython.nbconvert.utils.lexers.IPythonLexer(**options)

Bases: pygments.lexers.agile.PythonLexer

Pygments Lexer for use with IPython code. Inherits from PythonLexer and adds information about IPython specific keywords (i.e. magic commands, shell commands, etc.)