diff --git a/napari_console/qt_console.py b/napari_console/qt_console.py index 2033755..cd94dd2 100644 --- a/napari_console/qt_console.py +++ b/napari_console/qt_console.py @@ -178,7 +178,7 @@ def _capture(self): Capture variable from first enclosing scope that is not napari """ with CallerFrame(self._in_napari) as c: - if c.frame.f_globals.get("__name__", "") != "__main__" and "NAPARI_EMBED" not in c.frame.f_globals: + if "NAPARI_EMBED" not in c.frame.f_globals: self.push(dict(c.namespace)) def _update_theme(self, event=None):