pretty print 2D arrays

Alan G Isaac aisaac at american.edu
Thu Aug 12 18:22:06 CEST 2004


I figure someone must have done this nicely but
I can't find it. I'd like structured printing of 2D
arrays, where an entry of None or '' should be
printed as whitespace. Something like:

Inputs: 2D array, 1D array of fixed field widths, 1D array of format
suggestions
Effect: formatted print of the 2D array (or its transpose)

Thanks,
Alan Isaac





More information about the Python-list mailing list