Malay Keshav

Download Resume PDF

Malay Keshav

Netaji Subhas Institute of Technology

Getting Started with Pygments

October 9, 2013, by malay.keshav, category All, Open Source, Pygments, Python

Pygments is a generic syntax highlighter for general use in all kinds of software such as forum systems, wikis or other applications that need to prettify source code.

Website : Pygments.org

Setting Up Pygments on MAC OSX for Development

Download and install Mercurial 

hg clone http://bitbucket.org/birkenfeld/pygments-main pygments
cd pygments
python setup.py develop

Pygments uses the Python Image Library (PIL) to Output the source code in a PNG format. To use this feature PIL is required.
To setup PIL, run the following :

#JPG Source Library
curl -O http://www.ijg.org/files/jpegsrc.v8c.tar.gz
tar -xvzf jpegsrc.v8c.tar.gz
cd jpeg-8c
./configure
make
sudo make install
cd ../

#Freetype Library
curl -O http://ftp.igh.cnrs.fr/pub/nongnu/freetype/freetype-2.4.5.tar.gz
tar -xvzf freetype-2.4.5.tar.gz
cd freetype-2.4.5
./configure
make
sudo make install
cd ../

#PIL
curl -O -L http://effbot.org/media/downloads/Imaging-1.1.7.tar.gz
tar -xzf Imaging-1.1.7.tar.gz
cd Imaging-1.1.7
python setup.py build
sudo python setup.py install

So, what do you think ?