summaryrefslogtreecommitdiff
path: root/Lib/idlelib/PyShell.py
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2003-01-04 01:43:53 +0000
committerKurt B. Kaiser <kbk@shore.net>2003-01-04 01:43:53 +0000
commit1061e7270b13a0e632c5a28791a46e38b48a39a0 (patch)
treed2bf495b5757fd7f0bdf0101177ffb762f4cba8b /Lib/idlelib/PyShell.py
parent506a224688fae06e8b30d88c4db36306788c6eb2 (diff)
downloadcpython-git-1061e7270b13a0e632c5a28791a46e38b48a39a0.tar.gz
M AutoExpand.py
M Bindings.py M EditorWindow.py M PyShell.py M config-keys.def M configHandler.py M help.txt 1. Annotate the shell window with last restart boundary upon restart. 2. Provide a shell menu entry and hot key (F6) to jump to the last restart boundary. 3. Add a new shell menu feature to restart the shell. 4. Update the help menu to add these features. 5. Update the help menu to put text in same order as the menus. 6. Correct a capitalization inconsistency on the Edit menu: Expand Word 7. Rename the "Debug" menu to be "Shell": it's doing more now. 8. Rearrange the "Shell" menu to make the StackViewer entries adjacent. 9. Add a get_geometry method to EditorWindow, which may be of use in making window positions persisent. 10. Make <ctrl-v> the "Classic Windows" paste key. 11. Restore decorum on the Help menu by removing "Advice". As Guido said, things will never be the same. Thanks, David!
Diffstat (limited to 'Lib/idlelib/PyShell.py')
-rw-r--r--Lib/idlelib/PyShell.py22
1 files changed, 19 insertions, 3 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index 61143594fb..77e4cf1e01 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -366,6 +366,12 @@ class ModifiedInterpreter(InteractiveInterpreter):
self.spawn_subprocess()
self.rpcclt.accept()
self.transfer_path()
+ # annotate restart in shell window and mark it
+ console = self.tkconsole
+ halfbar = ((int(console.width) - 16) // 2) * '='
+ console.write(halfbar + ' RESTART ' + halfbar)
+ console.text.mark_set("restart", "end-1c")
+ console.text.mark_gravity("restart", "left")
# restart remote debugger
if debug:
gui = RemoteDebugger.restart_subprocess_debugger(self.rpcclt)
@@ -652,8 +658,8 @@ class PyShell(OutputWindow):
menu_specs = [
("file", "_File"),
("edit", "_Edit"),
- ("debug", "_Debug"),
- ("settings", "_Settings"),
+ ("shell", "_Shell"),
+ ("options", "_Options"),
("windows", "_Windows"),
("help", "_Help"),
]
@@ -687,6 +693,8 @@ class PyShell(OutputWindow):
text.bind("<<toggle-debugger>>", self.toggle_debugger)
text.bind("<<open-python-shell>>", self.flist.open_shell)
text.bind("<<toggle-jit-stack-viewer>>", self.toggle_jit_stack_viewer)
+ text.bind("<<view-restart>>", self.view_restart_mark)
+ text.bind("<<restart-shell>>", self.restart_shell)
#
self.save_stdout = sys.stdout
self.save_stderr = sys.stderr
@@ -727,7 +735,7 @@ class PyShell(OutputWindow):
db = self.interp.getdebugger()
self.setvar("<<toggle-debugger>>", not not db)
- def toggle_jit_stack_viewer( self, event=None):
+ def toggle_jit_stack_viewer(self, event=None):
pass # All we need is the variable
def close_debugger(self):
@@ -1024,6 +1032,14 @@ class PyShell(OutputWindow):
from StackViewer import StackBrowser
sv = StackBrowser(self.root, self.flist)
+ def view_restart_mark(self, event=None):
+ self.text.see("iomark")
+ self.text.see("restart")
+
+ def restart_shell(self, event=None):
+ self.interp.restart_subprocess()
+ self.showprompt()
+
def showprompt(self):
self.resetoutput()
try: