Metadata-Version: 1.1
Name: columnize
Version: 0.3.7
Summary: Format a simple (i.e. not nested) list into aligned columns.
Home-page: https://github.com/rocky/pycolumnize
Author: Rocky Bernstein
Author-email: rocky@gnu.org
License: PSF2
Description: ![Downloads](https://pypip.in/download/columnize/badge.svg) [![Build Status](https://travis-ci.org/rocky/python2-trepan.svg)](https://travis-ci.org/rocky/columnize/) [![Latest Version](https://pypip.in/version/columnize/badge.svg?text=version)](https://pypi.python.org/pypi/columnize/) [![Supported Python versions](https://pypip.in/py_versions/columnize/badge.svg)](https://pypi.python.org/pypi/columnize/)
        
        In showing a long lists, sometimes one would prefer to see the value arranged aligned in columns. Some examples include listing methods of an object, listing debugger commands, or showing a numeric array with data aligned.
        
        This is a Python module to format a simple (i.e. not nested) list into aligned columns. A string with embedded newline characters is returned.
        
        Setup
        -----
        
        ```python
        $ python
        >>> import columnize
        ```
        
        With String data
        ----------------
        
        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.
        
        ```python
        >>> g = ('bibrons', 'golden', 'madascar', 'leopard', 'mourning', 'suras', 'tokay')
        >>> print(columnize.columnize(g, displaywidth=15)
        bibrons   suras
        golden    tokay
        madascar
        leopard
        mourning
        
        >>> print(columnize.columnize(g, displaywidth=19, colsep=' | '))
        bibrons  | suras
        golden   | tokay
        madascar
        leopard
        mourning
        
        >>> print(columnize.columnize(g, displaywidth=18, colsep=' | ', ljust=False))
        bibrons  | mourning
        golden   | suras
        madascar | tokay
        leopard
        ```
        
        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.
        
        With numeric data
        -----------------
        
        ```python
        >>> print(columnize.columnize(['1', '2', '3', '4'], displaywidth=6)) # => '1  3\n2  4\n')
        1  3
        2  4
        
        >>> print(columnize.columnize(list(range(1,6)), displaywidth=8))
        1  3  5
        2  4
        ```
        
        By default entries are left justified:
        
        ```python
        >>>  print(columnize.columnize(list(range(1,16)), displaywidth=10))
        
        1  6   11
        2  7   12
        3  8   13
        4  9   14
        5  10  15
        ```
        but you can change that with *ljust* or if *arrange_array* is set to *True*:
        
        ```python
        >>>  print(columnize.columnize(list(range(1,16)), displaywidth=10, ljust=False))
        1   6  11
        2   7  12
        3   8  13
        4   9  14
        5  10  15
        
        >>> print(columnize.columnize(list(range(1,5)), opts={'arrange_array':True, 'displaywidth':6}))
        [1, 2
         3, 4]
        
        
        ```
        
        Credits
        -------
        
        This module (essentially one function) was adapted from a private
        method of the same name from Python’s
        [cmd](http://docs.python.org/library/cmd.html) module. Some
        adjustments and generalizations have been made.
        
        Other stuff
        -----------
        
        Authors:   Rocky Bernstein <rockyb@rubyforge.org> [![endorse](https://api.coderwall.com/rocky/endorsecount.png)](https://coderwall.com/rocky)
        
        License: MIT
        
        
        0.3.7 05-01-13
        
        - Get terminal size more portably and reliably (Marc Abramowitz)
        - More complete test coverage and testing across python versions, and
          add an additional demo program (Marc Abramowitz)
        - README changes, move to github,
        
        0.3.6 04-22-13
        
        - Fix bugs in arrange_array
        
        0.3.5 04-18-13
        
        - Reinstate ability to run on older Pythons. In particular Python
          2.4.6 and 2.5.6 now. I suppose other version in between work too.
        
        - Add opts hash to bundle the growing options old and new:
          * arrange_array
          * arrange_vertical
          * arrange_horizontal
          * array_prefix
          * array_suffix
          * colsep
          * colfmt
          * displaywidth
          * lineprefix
          * linesuffix
          * ljust
        
        - Fixes to make source tarball work. (Added test files properly)
        
        0.3.4 01-03-13
        - Make 3k tolerant. This means it no longer works for versions less
          than Python 2.6.
        
        0.3.3 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
        
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Python Software Foundation License
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries :: Python Modules
