Skip to content

Commit 4f94d51

Browse files
authored
wxGUI/gconsole: avoid infinite GUI-in-GUI loops for python scripts with no required params (#5603)
fix #5524
1 parent 2e55b15 commit 4f94d51

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gui/wxpython/core/gconsole.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,9 @@ def load_source(modname, filename):
673673
return
674674

675675
skipInterface = True
676-
if os.path.splitext(command[0])[1] in {".py", ".sh"}:
676+
if os.path.splitext(command[0])[1] in {".py", ".sh"} and not isinstance(
677+
self._guiparent, FormNotebook
678+
):
677679
try:
678680
with open(command[0]) as sfile:
679681
for line in sfile:

0 commit comments

Comments
 (0)