This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def col_print(lines, term_width=None, indent=0, pad=2): | |
"""Print list of strings in multiple columns | |
Original: https://gist.github.com/critiqjo/2ca84db26daaeb1715e1 | |
Adjusted: https://gist.github.com/Nachtalb/8a85c0793b4bea0a102b7414be5888d4 | |
""" | |
if not term_width: | |
size = shutil.get_terminal_size((80, 20)) | |
term_width = size.columns |