summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk/tkSimpleDialog.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-10-23 18:31:14 (GMT)
committerFred Drake <fdrake@acm.org>2000-10-23 18:31:14 (GMT)
commitd038ca830fd5a6bafbd24b70eb71aeae83d362d3 (patch)
tree1a1febed0b11a25efb04bc50be91d4be3003e497 /Lib/lib-tk/tkSimpleDialog.py
parent16f6329e6153c4b92f2175a5560e372a762befe6 (diff)
downloadcpython-d038ca830fd5a6bafbd24b70eb71aeae83d362d3.zip
cpython-d038ca830fd5a6bafbd24b70eb71aeae83d362d3.tar.gz
cpython-d038ca830fd5a6bafbd24b70eb71aeae83d362d3.tar.bz2
Make reindent.py happy (convert everything to 4-space indents!).
Diffstat (limited to 'Lib/lib-tk/tkSimpleDialog.py')
-rw-r--r--Lib/lib-tk/tkSimpleDialog.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/Lib/lib-tk/tkSimpleDialog.py b/Lib/lib-tk/tkSimpleDialog.py
index 395a369..0dc5c84 100644
--- a/Lib/lib-tk/tkSimpleDialog.py
+++ b/Lib/lib-tk/tkSimpleDialog.py
@@ -86,18 +86,18 @@ class Dialog(Toplevel):
def body(self, master):
'''create dialog body.
- return widget that should have initial focus.
+ return widget that should have initial focus.
This method should be overridden, and is called
by the __init__ method.
'''
pass
def buttonbox(self):
- '''add standard button box.
+ '''add standard button box.
override if you don't want the standard buttons
'''
-
+
box = Frame(self)
w = Button(box, text="OK", width=10, command=self.ok, default=ACTIVE)
@@ -138,7 +138,7 @@ class Dialog(Toplevel):
def validate(self):
'''validate the data
- This method is called automatically to validate the data before the
+ This method is called automatically to validate the data before the
dialog is destroyed. By default, it always validates OK.
'''
@@ -227,7 +227,7 @@ class _QueryDialog(Dialog):
parent = self
)
return 0
-
+
self.result = result
return 1
@@ -289,7 +289,7 @@ def askstring(title, prompt, **kw):
d = apply(_QueryString, (title, prompt), kw)
return d.result
-if __name__ == "__main__":
+if __name__ == "__main__":
root = Tk()
root.update()
@@ -297,4 +297,3 @@ if __name__ == "__main__":
print askinteger("Spam", "Egg count", initialvalue=12*12)
print askfloat("Spam", "Egg weight\n(in tons)", minvalue=1, maxvalue=100)
print askstring("Spam", "Egg label")
-