def _csv_logging_button_fired(self): if not os.path.exists(self.directory_name) and not self.csv_logging: confirm_prompt = CallbackPrompt( title="Logging directory creation", actions=[ok_button], callback=self._csv_logging_button_action) confirm_prompt.text = "\nThe selected logging directory does not exist and will be created." confirm_prompt.run(block=False) else: self._csv_logging_button_action()
def _prompt_setting_error(self, text): """Nonblocking prompt for a device setting error. Parameters ---------- text : str Helpful error message for the user """ prompt = CallbackPrompt(title="Setting Error", actions=[close_button]) prompt.text = text prompt.run(block=False)
def _prompt_dep_warning(self, text): """Nonblocking prompt for a deprecation warning. Parameters ---------- txt : str Helpful error message for the user """ from piksi_tools.console.callback_prompt import CallbackPrompt, close_button prompt = CallbackPrompt(title="Deprecation Warning", actions=[close_button]) prompt.text = text prompt.run(block=False)