Skip to content
This repository was archived by the owner on Apr 18, 2018. It is now read-only.

sanguineturtle/pygments-ipython-console

Folders and files

NameName
Last commit message
Last commit date
Feb 18, 2016
Feb 18, 2016
Feb 18, 2016
Feb 18, 2016
Feb 18, 2016
Feb 18, 2016
Feb 18, 2016

Repository files navigation

pygments-ipython-console

Syntax coloring for IPython Console Files

Overview

This package provides a Pygments lexer for IPython Console Files. The lexer is published as an entry point and, once installed, Pygments will pick it up automatically.

You can then use the ipython language with Pygments:

$ pygmentize -l ipython test.ipy

[Or use the standard sphinx import of ipython_console_highlight.py] In Sphinx documents the lexer is selected with the highlight directive:

.. highlight:: ipython

Thanks to pygments-openssl project for providing a template

Requirements

This needs IPython 2.0+ for lexers module

Installation

Use your favorite installer to install pygments-ipython into the same Python you have installed Pygments. Constructing an egg from repository:

$ git clone https://sanguineturtle@bitbucket.org/sanguineturtle/pygments-ipython-console.git
$ cd pygments-ipython-console
$ python setup.py bdist_egg

For example [change directory to dist/ folder to locate egg file]:

$ easy_install pygments-ipython-console.egg

To verify the installation run:

$ pygmentize -L lexer | grep -i ipython
* ipython:
IPython console session (filenames *.ipy)

Notes:

[1] This installs the Lexer: IpythonLexer. There are other lexers in IPython2.0 and you can change them by editing the simple lexer.py file

About

IPython Console Installer for Pygments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published