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!
This commit is contained in:
Kurt B. Kaiser 2003-01-04 01:43:53 +00:00
parent 506a224688
commit 1061e7270b
7 changed files with 55 additions and 27 deletions

View file

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