From a79042bc2896350b3b4c6dbb984bfa42f99bc4c8 Mon Sep 17 00:00:00 2001 From: Claudio Jolowicz Date: Sat, 22 Aug 2020 13:49:01 +0200 Subject: [PATCH] Add `main` function as entry point for console script --- bpytop.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bpytop.py b/bpytop.py index 129037a..d67be4f 100755 --- a/bpytop.py +++ b/bpytop.py @@ -4306,7 +4306,7 @@ def process_keys(): CPU_NAME: str = get_cpu_name() -if __name__ == "__main__": +def main(): #? Init --------------------------------------------------------------------------------------> if DEBUG: TimeIt.start("Init") @@ -4490,3 +4490,7 @@ if __name__ == "__main__": else: #? Quit cleanly even if false starts being true... clean_quit() + + +if __name__ == "__main__": + main()