Popular recipes tagged "print" but not "pretty"http://code.activestate.com/recipes/tags/print-pretty/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>
No more UnicodeDecodeErrors when printing (Python)
2013-12-17T23:02:37-08:00Ádám Szieberthhttp://code.activestate.com/recipes/users/4188745/http://code.activestate.com/recipes/578788-no-more-unicodedecodeerrors-when-printing/
<p style="color: grey">
Python
recipe 578788
by <a href="/recipes/users/4188745/">Ádám Szieberth</a>
(<a href="/recipes/tags/decode/">decode</a>, <a href="/recipes/tags/error/">error</a>, <a href="/recipes/tags/print/">print</a>, <a href="/recipes/tags/terminal/">terminal</a>, <a href="/recipes/tags/unicode/">unicode</a>).
Revision 2.
</p>
<p>I hate getting UnicodeDecodeErrors when I use print() for bugtracing or for some other reason. I decided to make a module which spares me the headache.</p>
Recursively print (nested) dictionaries (Python)
2012-04-04T15:20:42-07:00Mauricio Dada Fonseca de Freitashttp://code.activestate.com/recipes/users/4179701/http://code.activestate.com/recipes/578094-recursively-print-nested-dictionaries/
<p style="color: grey">
Python
recipe 578094
by <a href="/recipes/users/4179701/">Mauricio Dada Fonseca de Freitas</a>
(<a href="/recipes/tags/dictionary/">dictionary</a>, <a href="/recipes/tags/print/">print</a>, <a href="/recipes/tags/recursion/">recursion</a>).
</p>
<p>Snippet of code that uses recursion to print nested dictionaries.
It does not sort the entries!</p>
Printing with Python and pyGTK (Python)
2009-06-25T13:54:34-07:00Mark Muzenhardthttp://code.activestate.com/recipes/users/4170846/http://code.activestate.com/recipes/576820-printing-with-python-and-pygtk/
<p style="color: grey">
Python
recipe 576820
by <a href="/recipes/users/4170846/">Mark Muzenhardt</a>
(<a href="/recipes/tags/drawingarea/">drawingarea</a>, <a href="/recipes/tags/gtk/">gtk</a>, <a href="/recipes/tags/print/">print</a>, <a href="/recipes/tags/pygtk/">pygtk</a>).
Revision 2.
</p>
<p>PyGTK is a very powerful GUI-Toolkit. Nearly everything is well documented, except how to print. I messed around for hours just to solve this problem so I decided to share this cool piece of code!</p>
print variables as a dictionarly (Python)
2009-03-27T07:39:13-07:00Maxim Khesinhttp://code.activestate.com/recipes/users/2591465/http://code.activestate.com/recipes/576700-print-variables-as-a-dictionarly/
<p style="color: grey">
Python
recipe 576700
by <a href="/recipes/users/2591465/">Maxim Khesin</a>
(<a href="/recipes/tags/debugging/">debugging</a>, <a href="/recipes/tags/inspection/">inspection</a>, <a href="/recipes/tags/print/">print</a>).
Revision 2.
</p>
<p>Often I need to print some diagnostic variables and have to construct a format string to include both name and value; but there is a quicker way! This is especially useful for tracing function call values (foo in example below)</p>