savkov / ChocolateBrownie

IPython pygment style and stylesheet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ChocolateBrownie

IPython pygment style and stylesheet.

Installation

Install pygments if required

pip install pygments

Look for the source folder of pygments by entering the following in IPython:

import pygments

pygments.__file__

Here is a sample output

'/usr/lib/python2.7/dist-packages/pygments/init.pyc'

Copy chocolatebrownie.py to

<pygments_dir>/styles/

Now you can give it a test run by running:

ipython qtconsole --stylesheet=\<ChocolateBrownie_path\>/css/chocolatebrownie.css --style=chocolatebrownie

To make chocolatebrownie your default qtconsole style you need to configure a profile. Start by running the following command to create a profile if there isn't one:

ipython profile create

This should create several configuration files. In the qtconsole configuration file

~/.ipython/profile_default/ipython_qtconsole_config.py

...set the following parameters as shown below:

c.IPythonWidget.syntax_style = u'chocolatebrownie'

c.IPythonQtConsoleApp.stylesheet = '<path to chocolatebrownie.css>'

Screenshot

screenshot

Colors

Names and HEX codes from http://www.colourlovers.com/

TODO

Add error and stack trace highlighting.

About

IPython pygment style and stylesheet

License:GNU General Public License v3.0


Languages

Language:Python 77.2%Language:CSS 22.8%