diff options
author | Raymond Hettinger <python@rcn.com> | 2002-05-21 17:00:20 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2002-05-21 17:00:20 (GMT) |
commit | 7f7d5bf43873b13c21cff8ab452df3ebde3a39ce (patch) | |
tree | 96808a1a4f8f180ec5592b20903386930ca88506 /Tools | |
parent | f79f2f94d5f7e13e0d409d5c00f752280fd3d628 (diff) | |
download | cpython-7f7d5bf43873b13c21cff8ab452df3ebde3a39ce.zip cpython-7f7d5bf43873b13c21cff8ab452df3ebde3a39ce.tar.gz cpython-7f7d5bf43873b13c21cff8ab452df3ebde3a39ce.tar.bz2 |
Patch 543222. Disable script bindings in shell window.
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/idle/EditorWindow.py | 1 | ||||
-rw-r--r-- | Tools/idle/PyShell.py | 1 | ||||
-rw-r--r-- | Tools/idle/ScriptBinding.py | 3 |
3 files changed, 5 insertions, 0 deletions
diff --git a/Tools/idle/EditorWindow.py b/Tools/idle/EditorWindow.py index 47d2242..9535261 100644 --- a/Tools/idle/EditorWindow.py +++ b/Tools/idle/EditorWindow.py @@ -95,6 +95,7 @@ class EditorWindow: about_text = about_text vars = {} + runnable = False # Shell window cannot Import Module or Run Script def __init__(self, flist=None, filename=None, key=None, root=None): edconf = idleconf.getsection('EditorWindow') diff --git a/Tools/idle/PyShell.py b/Tools/idle/PyShell.py index 2c471de..cf854d3 100644 --- a/Tools/idle/PyShell.py +++ b/Tools/idle/PyShell.py @@ -76,6 +76,7 @@ class PyShellEditorWindow(EditorWindow): # Regular text edit window when a shell is present # XXX ought to merge with regular editor window + runnable = True # Shell not present, enable Import Module and Run Script def __init__(self, *args): apply(EditorWindow.__init__, (self,) + args) diff --git a/Tools/idle/ScriptBinding.py b/Tools/idle/ScriptBinding.py index 4071681..19a20b2 100644 --- a/Tools/idle/ScriptBinding.py +++ b/Tools/idle/ScriptBinding.py @@ -51,6 +51,9 @@ class ScriptBinding: ] def __init__(self, editwin): + if not editwin.runnable: + self.menudefs = [] + self.keydefs = {} self.editwin = editwin # Provide instance variables referenced by Debugger # XXX This should be done differently |