diff options
Diffstat (limited to 'Lib/idlelib/pyshell.py')
-rwxr-xr-x | Lib/idlelib/pyshell.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Lib/idlelib/pyshell.py b/Lib/idlelib/pyshell.py index 295d06e4a5f..74a0e03994f 100755 --- a/Lib/idlelib/pyshell.py +++ b/Lib/idlelib/pyshell.py @@ -877,10 +877,9 @@ class PyShell(OutputWindow): from idlelib.sidebar import ShellSidebar def __init__(self, flist=None): - if use_subprocess: - ms = self.menu_specs - if ms[2][0] != "shell": - ms.insert(2, ("shell", "She_ll")) + ms = self.menu_specs + if ms[2][0] != "shell": + ms.insert(2, ("shell", "She_ll")) self.interp = ModifiedInterpreter(self) if flist is None: root = Tk() @@ -954,6 +953,11 @@ class PyShell(OutputWindow): self.text.insert = self.per.top.insert self.per.insertfilter(UserInputTaggingDelegator()) + if not use_subprocess: + # Menu options "View Last Restart" and "Restart Shell" are disabled + self.update_menu_state("shell", 0, "disabled") + self.update_menu_state("shell", 1, "disabled") + def ResetFont(self): super().ResetFont() @@ -1346,7 +1350,7 @@ class PyShell(OutputWindow): self.text.see("insert") self.text.undo_block_stop() - _last_newline_re = re.compile(r"[ \t]*(\n[ \t]*)?\Z") + _last_newline_re = re.compile(r"[ \t]*(\n[ \t]*)?\z") def runit(self): index_before = self.text.index("end-2c") line = self.text.get("iomark", "end-1c") |