code: def text_ui(self):
          
          self.logger.info("Starting command line interface")
          self.help()
          try:
              self.ipython_ui()
          except ImportError:
              self.fallback_ui()
          self.system.cleanup()
docs: Start Text UI main loop