[Python-checkins] cpython (merge 3.5 -> default): Merge with 3.5
terry.reedy
python-checkins at python.org
Wed Jan 27 11:52:41 EST 2016
https://hg.python.org/cpython/rev/96c88daac37a
changeset: 100078:96c88daac37a
parent: 100075:793dbf317f14
parent: 100077:86105a109830
user: Terry Jan Reedy <tjreedy at udel.edu>
date: Wed Jan 27 11:52:13 2016 -0500
summary:
Merge with 3.5
files:
Lib/idlelib/IOBinding.py | 11 ++++++++++-
Lib/idlelib/idle_test/htest.py | 3 +++
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/Lib/idlelib/IOBinding.py b/Lib/idlelib/IOBinding.py
--- a/Lib/idlelib/IOBinding.py
+++ b/Lib/idlelib/IOBinding.py
@@ -10,6 +10,7 @@
import tkinter.messagebox as tkMessageBox
from tkinter.simpledialog import askstring
+from idlelib.configHandler import idleConf
# Try setting the locale, so that we can find out
@@ -525,7 +526,6 @@
def _io_binding(parent): # htest #
from tkinter import Toplevel, Text
- from idlelib.configHandler import idleConf
root = Toplevel(parent)
root.title("Test IOBinding")
@@ -536,14 +536,23 @@
self.text = text
self.flist = None
self.text.bind("<Control-o>", self.open)
+ self.text.bind('<Control-p>', self.print)
self.text.bind("<Control-s>", self.save)
+ self.text.bind("<Alt-s>", self.saveas)
+ self.text.bind('<Control-c>', self.savecopy)
def get_saved(self): return 0
def set_saved(self, flag): pass
def reset_undo(self): pass
def open(self, event):
self.text.event_generate("<<open-window-from-file>>")
+ def print(self, event):
+ self.text.event_generate("<<print-window>>")
def save(self, event):
self.text.event_generate("<<save-window>>")
+ def saveas(self, event):
+ self.text.event_generate("<<save-window-as-file>>")
+ def savecopy(self, event):
+ self.text.event_generate("<<save-copy-of-window-as-file>>")
text = Text(root)
text.pack()
diff --git a/Lib/idlelib/idle_test/htest.py b/Lib/idlelib/idle_test/htest.py
--- a/Lib/idlelib/idle_test/htest.py
+++ b/Lib/idlelib/idle_test/htest.py
@@ -192,7 +192,10 @@
'msg': "Test the following bindings.\n"
"<Control-o> to open file from dialog.\n"
"Edit the file.\n"
+ "<Control-p> to print the file.\n"
"<Control-s> to save the file.\n"
+ "<Alt-s> to save-as another file.\n"
+ "<Control-c> to save-copy-as another file.\n"
"Check that changes were saved by opening the file elsewhere."
}
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list