def console(self): """QtConsole: iPython console terminal integrated into the napari GUI.""" if self._console is None: try: from napari_console import QtConsole import napari with warnings.catch_warnings(): warnings.filterwarnings("ignore") self.console = QtConsole(self.viewer) self.console.push( {'napari': napari, 'action_manager': action_manager} ) except ModuleNotFoundError: warnings.warn( trans._( 'napari-console not found. It can be installed with' ' "pip install napari_console"' ) ) self._console = None except ImportError: traceback.print_exc() warnings.warn( trans._( 'error importing napari-console. See console for full error.' ) ) self._console = None return self._console
def console(self): """QtConsole: iPython console terminal integrated into the napari GUI.""" if self._console is None: try: from napari_console import QtConsole self.console = QtConsole(self.viewer) except ImportError: warnings.warn( 'napari-console not found. It can be installed with' ' "pip install napari_console"') self._console = None return self._console
def console(self): """QtConsole: iPython console terminal integrated into the napari GUI.""" if self._console is None: try: from napari_console import QtConsole import napari self.console = QtConsole(self.viewer) self.console.push({ 'napari': napari, 'action_manager': action_manager }) except ImportError: warnings.warn( trans._( 'napari-console not found. It can be installed with' ' "pip install napari_console"')) self._console = None return self._console