https://github.com/doconce/pygments-ipython-console
Pygments lexer for IPython Console Files
https://github.com/doconce/pygments-ipython-console
Last synced: 3 months ago
JSON representation
Pygments lexer for IPython Console Files
- Host: GitHub
- URL: https://github.com/doconce/pygments-ipython-console
- Owner: doconce
- Created: 2020-11-22T08:31:05.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-11-22T08:34:29.000Z (over 5 years ago)
- Last Synced: 2025-10-31T05:02:37.863Z (9 months ago)
- Language: Python
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
Awesome Lists containing this project
README
========================
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)