Making IT simple

Open Source

py2html

A MS Windows version of nice pygments python script.

The py2html is a very simple MS Windows executable file that highlights your python code in nice HTML files. 
It make use of the pygment modules to highlight the code, but you don't need to install the pygment or have python interpreter installed. 

The pygmentize python (unix like script) was converted in py2html.exe by py2exe (thanks http://www.py2exe.org)
therefore all options applicable to pygmentize is also applicable to py2html

Compare the linux pygmentize statement and MS Windows py2html.exe version:

linux pygmentize command line for a html div:

$pygmentize -f html -o test.html test.py


MS Windows py2html command line for a html div:

py2html -f html -o test.html test.py

yeah, sounds good, uh?!

Please, try out some of the following combinations:

 

Generating the complete html code:

       py2html -f html -O style=colorful,linenos=1 -l python test.py

       py2html -O full,style=emacs -o setup.html setup.py

  

Generating a stylesheet (css) to be included in your html file

       py2html -f html -S colorful -a .syntax

See more examples at:


Now that you are ready to download it




Many thanks to: 
  • Georg Brand and Armin Ronacher - Pygments is the best
  • Thomas Heller, Jimmy Retzlaff, Mark Hammond - py2exe is unique!!!
Greetings
marco A zoqui

Attachments (1)

  • py2html_1_0_0.zip - on Oct 20, 2009 11:18 AM by Marco Aurelio Zoqui (version 1)
    2522k Download