skip to navigation
skip to content

columnize 0.3.0

Format a list of strings into a single compact string

Latest Version: 0.3.2

Return a list of strings as a compact set of columns arranged
horizontally or vertically.

For example, for a line width of 4 characters (arranged vertically):
    ['1', '2,', '3', '4'] => '1  3\n2  4\n'

or arranged horizontally:
    ['1', '2,', '3', '4'] => '1  2\n3  4\n'

Each column is only as wide as necessary.  By default, columns are
separated by two spaces - one was not legible enough. Set "colsep"
to adjust the string separate columns. Set `displaywidth' to set
the line width.

Normally, consecutive items go down from the top to bottom from
the left-most column to the right-most. If +arrange_vertical+ is
set false, consecutive items will go across, left to right, top to
bottom.

Adapted from the routine of the same name inside cmd.py
File Type Py Version Uploaded on Size # downloads
columnize-0.3.0.tar.gz (md5) Source 2009-01-06 03:49:58 5KB 56
columnize-0.3.0-py2.6.egg (md5) Python Egg 2.6 2009-01-06 03:57:44 5KB 122
columnize-0.3.0-py2.5.egg (md5) Python Egg 2.5 2009-01-06 03:49:59 5KB 106
columnize-0.3.0.zip (md5) Source 2009-01-06 03:57:43 9KB 49

Log in to rate this package.