Commit 5a0c278a authored by Terry Jan Reedy's avatar Terry Jan Reedy

Issue #27156: Remove obsolete code not used by IDLE.

help.txt, replaced by help.html, is out-of-date and should not be used.
Its dedicated viewer has be replaced by the html viewer in help.py.
'import idlever; I = idlever.IDLE_VERSION' is the same as
'import sys; I = version[:version.index(' ')]'
parent dd780e44
...@@ -40,54 +40,6 @@ def _sphinx_version(): ...@@ -40,54 +40,6 @@ def _sphinx_version():
return release return release
class HelpDialog(object):
def __init__(self):
self.parent = None # parent of help window
self.dlg = None # the help window iteself
def display(self, parent, near=None):
""" Display the help dialog.
parent - parent widget for the help window
near - a Toplevel widget (e.g. EditorWindow or PyShell)
to use as a reference for placing the help window
"""
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)
if self.dlg is None:
self.show_dialog(parent)
if near:
self.nearwindow(near)
def show_dialog(self, parent):
self.parent = parent
fn=os.path.join(os.path.abspath(os.path.dirname(__file__)),'help.txt')
self.dlg = dlg = textview.view_file(parent,'Help',fn, modal=False)
dlg.bind('<Destroy>', self.destroy, '+')
def nearwindow(self, near):
# Place the help dialog near the window specified by parent.
# Note - this may not reposition the window in Metacity
# if "/apps/metacity/general/disable_workarounds" is enabled
dlg = self.dlg
geom = (near.winfo_rootx() + 10, near.winfo_rooty() + 10)
dlg.withdraw()
dlg.geometry("=+%d+%d" % geom)
dlg.deiconify()
dlg.lift()
def destroy(self, ev=None):
self.dlg = None
self.parent = None
helpDialog = HelpDialog() # singleton instance, no longer used
class EditorWindow(object): class EditorWindow(object):
from idlelib.percolator import Percolator from idlelib.percolator import Percolator
from idlelib.colorizer import ColorDelegator, color_config from idlelib.colorizer import ColorDelegator, color_config
......
This diff is collapsed.
"""
The separate Idle version was eliminated years ago;
idlelib.idlever is no longer used by Idle
and will be removed in 3.6 or later. Use
from sys import version
IDLE_VERSION = version[:version.index(' ')]
"""
# Kept for now only for possible existing extension use
import warnings as w
w.warn(__doc__, DeprecationWarning, stacklevel=2)
from sys import version
IDLE_VERSION = version[:version.index(' ')]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment