From c93920f4c59ffb911c0961af0d7432e2dd54ce02 Mon Sep 17 00:00:00 2001 From: rune Date: Wed, 3 Jul 2024 11:37:56 +0200 Subject: [PATCH] Changed output to columns --- app.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app.py b/app.py index c51b477..a5409a8 100644 --- a/app.py +++ b/app.py @@ -1,5 +1,6 @@ #!/usr/bin/python3 import sys +import cmd sys.path.append("/opt/homebrew/lib/python3.11/site-packages") import sqlite3 @@ -37,14 +38,11 @@ def parse(): final_list = the_list.sort() # sorts normally by alphabetical order the_list = sorted(the_list, key=len, reverse=False) if len(the_list) > 0: - print(*the_list, sep="\n") + out = cmd.Cmd() + out.columnize(the_list, displaywidth=80) else: print("No expired domains with the length citeria you wanted!") -def main(): - parse() - - if __name__ == "__main__": - main() + parse()