### Navigation

- index
- modules |
- next |
- previous |
- home|
- search|
- documentation »
- The IPython API »

# Module: `sphinxext.ipython_console_highlighting`

reST directive for syntax-highlighting ipython interactive sessions.

XXX - See what improvements can be made based on the new (as of Sept 2009) ‘pycon’ lexer for the python console. At the very least it will give better highlighted tracebacks.

## 1 Class

class `IPython.sphinxext.ipython_console_highlighting.``IPythonConsoleLexer`(**options)

  Bases: `pygments.lexer.Lexer`

  For IPython console output or doctests, such as:

      In [1]: a = 'foo'

      In [2]: a
      Out[2]: 'foo'

      In [3]: print a
      foo

      In [4]: 1 / 0

  Notes:

  > - Tracebacks are not currently supported.
  > - It assumes the default IPython prompts, not customized ones.

## 1 Function

`IPython.sphinxext.ipython_console_highlighting.``setup`(app)

  Setup as a sphinx extension.

### Navigation

- index
- modules |
- next |
- previous |
- home|
- search|
- documentation »
- The IPython API »