Created method to sort any list as menu

This commit is contained in:
sTiKyt 2020-05-10 15:57:13 +03:00
parent 6b3c59c7d4
commit 45df961f4d
No known key found for this signature in database
GPG Key ID: 510E1C3C9B2414B4

View File

@ -8,7 +8,10 @@ import os
default_palette = theme.default_palette
module_loading_message = simple_informant.module_loading_message
def print_sorted_as_menu(sorting_list):
col_width = max(len(word) for row in sorting_list for word in row) + 2
for row in sorting_list:
print("".join(word.ljust(col_width) for word in row).format(default_palette[0], default_palette[2]))
def start_main_menu():