Skip to content

Commit a3623c8

Browse files
committed
Improve idlelib.textview comments.
1 parent 83a1045 commit a3623c8

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Lib/idlelib/textview.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77

88

99
class TextViewer(Toplevel):
10-
"""A simple text viewer dialog for IDLE
10+
"A simple text viewer dialog for IDLE."
1111

12-
"""
1312
def __init__(self, parent, title, text, modal=True, _htest=False):
1413
"""Show the given text in a scrollable window with a 'close' button
1514
@@ -21,11 +20,11 @@ def __init__(self, parent, title, text, modal=True, _htest=False):
2120
"""
2221
Toplevel.__init__(self, parent)
2322
self.configure(borderwidth=5)
24-
# place dialog below parent if running htest
23+
# Place dialog below parent if running htest.
2524
self.geometry("=%dx%d+%d+%d" % (750, 500,
2625
parent.winfo_rootx() + 10,
2726
parent.winfo_rooty() + (10 if not _htest else 100)))
28-
#elguavas - config placeholders til config stuff completed
27+
# TODO: get fg/bg from theme.
2928
self.bg = '#ffffff'
3029
self.fg = '#000000'
3130

@@ -34,9 +33,9 @@ def __init__(self, parent, title, text, modal=True, _htest=False):
3433
self.protocol("WM_DELETE_WINDOW", self.Ok)
3534
self.parent = parent
3635
self.textView.focus_set()
37-
#key bindings for this dialog
38-
self.bind('<Return>',self.Ok) #dismiss dialog
39-
self.bind('<Escape>',self.Ok) #dismiss dialog
36+
# Bind keys for closing this dialog.
37+
self.bind('<Return>',self.Ok)
38+
self.bind('<Escape>',self.Ok)
4039
self.textView.insert(0.0, text)
4140
self.textView.config(state=DISABLED)
4241

0 commit comments

Comments
 (0)