Patch 543222. Disable script bindings in shell window.

This commit is contained in:
Raymond Hettinger 2002-05-21 17:00:20 +00:00
parent f79f2f94d5
commit 7f7d5bf438
3 changed files with 5 additions and 0 deletions

View file

@ -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')

View file

@ -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)

View file

@ -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