Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b9d07b5

Browse files
author
Steven M. Gava
committed
A more lightweight (and read only) way to view help text
until the new help system is implemented. Removed some commented cruft.
1 parent d721c48 commit b9d07b5

1 file changed

Lines changed: 4 additions & 38 deletions

File tree

Lib/idlelib/EditorWindow.py

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import idlever
1818
import WindowList
1919
from IdleConf import idleconf
20-
import aboutDialog
20+
import aboutDialog, textView
2121

2222
# The default tab setting for a Text widget, in average-width characters.
2323
TK_TABWIDTH_DEFAULT = 8
@@ -78,27 +78,6 @@
7878
#$ event <<do-nothing>>
7979
#$ unix <Control-x>
8080

81-
82-
about_title = "About IDLEfork"
83-
about_text = """\
84-
IDLEfork %s
85-
86-
IDLE is an Integrated DeveLopment Environment for Python \
87-
by Guido van Rossum.
88-
89-
IDLEfork is an official experimental development version of IDLE. \
90-
Succesful new features in IDLEfork will be mereged back in to stable IDLE.
91-
92-
This version of IDLEfork is based on the work in stable IDLE version 0.8, \
93-
IDLE fork 0.7.1 released by David Scherer, and the VPython idle fork.
94-
95-
See README.txt and NEWS.txt for more details on this verion of IDLEfork.
96-
97-
WARNING: IDLEfork is at this stage alpha quality software, expect things \
98-
to be broken.
99-
100-
""" % (idlever.IDLE_VERSION)
101-
10281
class EditorWindow:
10382

10483
from Percolator import Percolator
@@ -109,9 +88,6 @@ class EditorWindow:
10988
from Tkinter import Toplevel
11089
from MultiStatusBar import MultiStatusBar
11190

112-
about_title = about_title
113-
about_text = about_text
114-
11591
vars = {}
11692

11793
def __init__(self, flist=None, filename=None, key=None, root=None):
@@ -297,25 +273,15 @@ def command(text=self.text, eventname=eventname):
297273
self.rmenu = rmenu
298274

299275
def about_dialog(self, event=None):
300-
#tkMessageBox.showinfo(self.about_title, self.about_text,
301-
# master=self.text)
302276
aboutDialog.AboutDialog(self.top,'About IDLEfork')
303277

304-
helpfile = "help.txt"
305-
306278
def good_advice(self, event=None):
307279
tkMessageBox.showinfo('Advice', "Don't Panic!", master=self.text)
308280

309281
def help_dialog(self, event=None):
310-
try:
311-
helpfile = os.path.join(os.path.dirname(__file__), self.helpfile)
312-
except NameError:
313-
helpfile = self.helpfile
314-
if self.flist:
315-
self.flist.open(helpfile)
316-
else:
317-
self.io.loadfile(helpfile)
318-
282+
fn=os.path.join(os.path.abspath(os.path.dirname(__file__)),'help.txt')
283+
textView.TextViewer(self.top,'Help',fn)
284+
319285
help_url = "http://www.python.org/doc/current/"
320286
if sys.platform[:3] == "win":
321287
fn = os.path.dirname(__file__)

0 commit comments

Comments
 (0)