diff sat_frontends/jp/base.py @ 3481:7892585b7e17

core (setup), jp, primitivus: update console scripts + classifiers: - console scripts have been updated following the renaming with: - "libervia-cli" and "libervia-tui" for "jp" and "primitivus" - "li" alias as a shortcut for libervia-cli - "jp" and "primitivus" are kept as alias - updated classifiers to reflect Python 3.9 support
author Goffi <goffi@goffi.org>
date Sat, 20 Mar 2021 20:42:07 +0100
parents be6d91572633
children c9703067c700
line wrap: on
line diff
--- a/sat_frontends/jp/base.py	Sat Mar 20 20:42:04 2021 +0100
+++ b/sat_frontends/jp/base.py	Sat Mar 20 20:42:07 2021 +0100
@@ -84,7 +84,7 @@
     return date_utils.date_parse_ext(arg, default_tz=date_utils.TZ_LOCAL)
 
 
-class Jp(object):
+class LiberviaCli:
     """
     This class can be use to establish a connection with the
     bridge. Moreover, it should manage a main loop.
@@ -669,10 +669,14 @@
         except QuitException:
             return
 
-    def run(self, args=None, namespace=None):
+    def _run(self, args=None, namespace=None):
         self.loop = JPLoop()
         self.loop.run(self, args, namespace)
 
+    @classmethod
+    def run(cls):
+        cls()._run()
+
     def _read_stdin(self, stdin_fut):
         """Callback called by ainput to read stdin"""
         line = sys.stdin.readline()