[erlang-questions] Pretty print list of strings in tabular way

Richard A. O'Keefe ok@REDACTED
Tue Oct 24 04:34:00 CEST 2017


I would normally handle tabular output by delegating to
another program.  Two simple ones (in Python and AWK) are
described in http://www.cs.otago.ac.nz/staffpriv/ok/tale.pdf.

These days I'd probably write a <table> to a temporary file
and tell a web browser to open it.  Or possibly get RStudio
to read it as a data frame and view it in the data viewer.

Much depends on
  - the number of rows in the table
  - the number of columns in the table
  - the size of the fields (are they tolerably short, or
    are they paragraphs)
  - whether the fields contain tabs, line break separators,
    bidirectional text, or other odd stuff
  - whether the table is to be read by people or programs
  - whether the table is large enough that a human reader
    might need machine help to search it
  - or do things like highlighting the current row/column
  - or sort on selected columns
  ...



More information about the erlang-questions mailing list