skip to navigation
skip to content

columnize 0.3.3

Format a simple (i.e. not nested) list into aligned columns.

Downloads ↓

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


0.3.4 10-28-10 -
- Work on packaging
- Remove pyflakes warnings
- Correct licensing information

0.3.2 03-08-09 - Ron Frankel -1 Release

- Relax restriction that array has to be string. Now is just something
  we can call str() on each of the elements on.

- Correct bug in vertical alignment

- Add an optional initial line prefix string

0.3.1 01-10-09 - Sam Woodward Release
- Some small typos fixed.

0.3.0 01-05-09

- 0.2.0 had bad bugs - don't use.
  Allow specifying right justification as well as left justification

0.2.0 12-31-08

- Add ability to run columns vertically
 
File Type Py Version Uploaded on Size # downloads
columnize-0.3.3-py2.6.egg (md5) Python Egg 2.6 2010-10-28 6KB 451
columnize-0.3.3-py2.7.egg (md5) Python Egg 2.7 2010-10-28 6KB 626
columnize-0.3.3.tar.gz (md5) Source 2010-10-28 7KB 538