diff -r 2efd269b3eb8 Lib/idlelib/EditorWindow.py
--- a/Lib/idlelib/EditorWindow.py Sun Sep 20 23:17:41 2015 +0500
+++ b/Lib/idlelib/EditorWindow.py Sun Sep 20 17:56:54 2015 -0400
@@ -21,6 +21,7 @@
from idlelib.configHandler import idleConf
from idlelib import aboutDialog, textView, configDialog
from idlelib import macosxSupport
+from idlelib import help
# The default tab setting for a Text widget, in average-width characters.
TK_TABWIDTH_DEFAULT = 8
@@ -42,6 +43,11 @@
class HelpDialog(object):
def __init__(self):
+ import warnings as w
+ w.warn("EditorWindow.HelpDialog is no longer used by Idle.\n"
+ "It will be removed in 3.6 or later.\n"
+ "It has been replaced by private help.HelpWindow\n",
+ DeprecationWarning, stacklevel=2)
self.parent = None # parent of help window
self.dlg = None # the help window iteself
@@ -539,11 +545,13 @@
configDialog.ConfigExtensionsDialog(self.top)
def help_dialog(self, event=None):
+ "Handle help doc event."
+ # edit maxosxSupport.overrideRootMenu.help_dialog to match
if self.root:
parent = self.root
else:
parent = self.top
- helpDialog.display(parent, near=self.top)
+ help.show_idlehelp(parent)
def python_docs(self, event=None):
if sys.platform[:3] == 'win':
@@ -1716,4 +1724,4 @@
if __name__ == '__main__':
from idlelib.idle_test.htest import run
- run(_help_dialog, _editor_window)
+ run(_editor_window)
diff -r 2efd269b3eb8 Lib/idlelib/help.txt
--- a/Lib/idlelib/help.txt Sun Sep 20 23:17:41 2015 +0500
+++ b/Lib/idlelib/help.txt Sun Sep 20 17:56:54 2015 -0400
@@ -1,3 +1,7 @@
+This file, idlelib/help.txt is out-of-date and no longer used by Idle.
+It is deprecated and will be removed in the future, possibly in 3.6
+----------------------------------------------------------------------
+
[See the end of this file for ** TIPS ** on using IDLE !!]
IDLE is the Python IDE built with the tkinter GUI toolkit.
diff -r 2efd269b3eb8 Lib/idlelib/idle_test/htest.py
--- a/Lib/idlelib/idle_test/htest.py Sun Sep 20 23:17:41 2015 +0500
+++ b/Lib/idlelib/idle_test/htest.py Sun Sep 20 17:56:54 2015 -0400
@@ -194,13 +194,6 @@
"should open that file \nin a new EditorWindow."
}
-_help_dialog_spec = {
- 'file': 'EditorWindow',
- 'kwds': {},
- 'msg': "If the help text displays, this works.\n"
- "Text is selectable. Window is scrollable."
- }
-
_io_binding_spec = {
'file': 'IOBinding',
'kwds': {},
@@ -279,6 +272,13 @@
"Right clicking an item will display a popup."
}
+show_idlehelp_spec = {
+ 'file': 'help',
+ 'kwds': {},
+ 'msg': "If the help text displays, this works.\n"
+ "Text is selectable. Window is scrollable."
+ }
+
_stack_viewer_spec = {
'file': 'StackViewer',
'kwds': {},
diff -r 2efd269b3eb8 Lib/idlelib/macosxSupport.py
--- a/Lib/idlelib/macosxSupport.py Sun Sep 20 23:17:41 2015 +0500
+++ b/Lib/idlelib/macosxSupport.py Sun Sep 20 17:56:54 2015 -0400
@@ -174,9 +174,8 @@
configDialog.ConfigDialog(root, 'Settings')
def help_dialog(event=None):
- from idlelib import textView
- fn = path.join(path.abspath(path.dirname(__file__)), 'help.txt')
- textView.view_file(root, 'Help', fn)
+ from idlelib import help
+ help.show_idlehelp(root)
root.bind('<