Skip to main content

Syntax coloring for IPython Console (Same as Sphinx)

Project description

======================== 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

.. _Pygments: http://pygments.org/ .. _Sphinx: http://sphinx-doc.org/

Thanks to pygments-openssl project for providing a template [https://github.com/stefanholek/pygments-openssl]

Requirements

This needs IPython 1.0+ for sphinxext 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 ipy
* ipy:
	IPy session (filenames *.ipy)

Changelog

  • Changed IPython lexer class name. [hplgit]

  • Initial release. [sanguineturtle]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygments-ipython-console-1.0.1.tar.gz (2.1 kB view hashes)

Uploaded Source

Built Distribution

pygments_ipython_console-1.0.1-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page