Skip to main content

Format a list of strings into a single compact string

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

columnize-0.3.0.zip (9.9 kB view details)

Uploaded Source

columnize-0.3.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

columnize-0.3.0-py2.6.egg (6.1 kB view details)

Uploaded Egg

columnize-0.3.0-py2.5.egg (6.1 kB view details)

Uploaded Egg

File details

Details for the file columnize-0.3.0.zip.

File metadata

  • Download URL: columnize-0.3.0.zip
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for columnize-0.3.0.zip
Algorithm Hash digest
SHA256 42400cd581af2e1cfc0d18cfbfee780acd9105f39bb24f71b95a23dc3e56beac
MD5 16c832cc4aadeb2e1fe9eea86ce7bc85
BLAKE2b-256 ca3e6d00e99e4d5f242cbb9a757c65ee8d7f86b4d41b3ac729d67c794d1881d9

See more details on using hashes here.

File details

Details for the file columnize-0.3.0.tar.gz.

File metadata

  • Download URL: columnize-0.3.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for columnize-0.3.0.tar.gz
Algorithm Hash digest
SHA256 e57ce7312cff76be62beab2c2d83fa415f074aa106020645c0aa7c955e40f95b
MD5 f5d637c2587409dd10c819b53c672b8b
BLAKE2b-256 7b3fb50c58299f9d84a96b6c298811823d8869beefb9911e6e5506088e597fa5

See more details on using hashes here.

File details

Details for the file columnize-0.3.0-py2.6.egg.

File metadata

  • Download URL: columnize-0.3.0-py2.6.egg
  • Upload date:
  • Size: 6.1 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for columnize-0.3.0-py2.6.egg
Algorithm Hash digest
SHA256 8d00c8978d58fd83fa7d90b6ac72847164a1f6a6a05b7fd6b7f89cbb81253959
MD5 c4f03c7768e26d61d250e608815660b3
BLAKE2b-256 407bf343bb46846b5f2c6449cd427854e3a6696efda213d29370eccbad21c300

See more details on using hashes here.

File details

Details for the file columnize-0.3.0-py2.5.egg.

File metadata

  • Download URL: columnize-0.3.0-py2.5.egg
  • Upload date:
  • Size: 6.1 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for columnize-0.3.0-py2.5.egg
Algorithm Hash digest
SHA256 34e8cfe38ff0d14e3402d5034821e1c3755ac51f7068ca59795a1af84ca9c2a5
MD5 e699e780808e7d153a4e84dccd9c03fb
BLAKE2b-256 dde0cc7cd65ece19c42f3eed39f79f53051f546f1b69b8da10daa0804978f12e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page