commit 42564bcca4c81b86c1d41542d726a7d91d5f9117
parent 88369d4915ac11d712b005a90d8e6edd574e5ebd
Author: Isak Lindhé <isak.e.lindhe@gmail.com>
Date: Tue, 19 Mar 2019 14:40:50 +0100
pulled main cli functionality into its own function.
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/txtv.py b/src/txtv.py
@@ -180,7 +180,7 @@ commands = [
]
-if __name__ == '__main__':
+def run():
colorama.init()
cfg = get_or_gen_config()
if len(sys.argv) > 2:
@@ -197,3 +197,7 @@ if __name__ == '__main__':
else:
err("That's not a command, kompis. 'txtv.py help' gives you a list of commands.")
colorama.deinit()
+
+if __name__ == '__main__':
+ run()
+