How can I calculate optimal column widths?
I have a small set of column data values that I want to display in a variable-width display. One column has a small range of plausible sizes (say, 8-10 characters), one displays a UUID (always 36 chars), and the others are variable-length identifiers.

I want to maximize the amount of data I can display, given that the terminal may be expected to be as narrow as 72 characters and as wide as about 400.

How should I calculate this?

I'm using python, if it matters to anyone.
How can I calculate optimal column widths?
===

I have a small set of column data values that I want to display in a variable-width display. One column has a small range of plausible sizes (say, 8-10 characters), one displays a UUID (always 36 chars), and the others are variable-length identifiers.

I want to maximize the amount of data I can display, given that the terminal may be expected to be as narrow as 72 characters and as wide as about 400.

How should I calculate this?

I'm using python, if it matters to anyone.