Skip to content

Commit

Permalink
Don't forbid frame variable capture in main scripts (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
jni authored Sep 20, 2024
1 parent 2148590 commit c15d804
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion napari_console/qt_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit c15d804

Please sign in to comment.