Most viewed recipes tagged "pretty_printer"http://code.activestate.com/recipes/tags/pretty_printer/views/2013-12-30T23:05:55-08:00ActiveState Code RecipesPretty Print table in tabular format (Python)
2013-12-30T23:05:55-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578801-pretty-print-table-in-tabular-format/
<p style="color: grey">
Python
recipe 578801
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/pretty_printer/">pretty_printer</a>, <a href="/recipes/tags/print/">print</a>, <a href="/recipes/tags/printer/">printer</a>, <a href="/recipes/tags/printf/">printf</a>, <a href="/recipes/tags/printing/">printing</a>).
</p>
<p>A simple function to Pretty Print a table in tabular format.</p>
<p>Table maybe a list of lists or list of tuples.</p>
<p>Justify and column width are optional parameters.</p>
Generate HTML syntax-highlighted listings for any file using pygments (Python)
2011-02-01T14:21:59-08:00ccpizzahttp://code.activestate.com/recipes/users/4170754/http://code.activestate.com/recipes/576812-generate-html-syntax-highlighted-listings-for-any-/
<p style="color: grey">
Python
recipe 576812
by <a href="/recipes/users/4170754/">ccpizza</a>
(<a href="/recipes/tags/pretty_printer/">pretty_printer</a>, <a href="/recipes/tags/pygments/">pygments</a>, <a href="/recipes/tags/syntax_highlighter/">syntax_highlighter</a>).
Revision 6.
</p>
<p>Generates HTML highlighted code listings for source code files in any language known to
pygments. For a list of supported formats see <a href="http://pygments.org/languages" rel="nofollow">http://pygments.org/languages</a></p>
<p>Make sure you have <a href="http://pygments.org">pygments</a> is installed. Try <code>easy_install pygments</code>.</p>
<p>Example usage:</p>
<p><em>output to stdout:</em></p>
<pre class="prettyprint"><code>python highlight.py my_source_file.java
</code></pre>
<p><em>output to file:</em></p>
<pre class="prettyprint"><code>python highlight.py my_source_file.java > my_source_file.html
</code></pre>