diff options
author | Tim Peters <tim.peters@gmail.com> | 2004-07-18 06:16:08 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2004-07-18 06:16:08 (GMT) |
commit | 182b5aca27d376b08a2904bed42b751496f932f3 (patch) | |
tree | df13115820dbc879c0fe2eae488c9f8c0215a7da /Demo/tix/samples/Control.py | |
parent | e6ddc8b20b493fef2e7cffb2e1351fe1d238857e (diff) | |
download | cpython-182b5aca27d376b08a2904bed42b751496f932f3.zip cpython-182b5aca27d376b08a2904bed42b751496f932f3.tar.gz cpython-182b5aca27d376b08a2904bed42b751496f932f3.tar.bz2 |
Whitespace normalization, via reindent.py.
Diffstat (limited to 'Demo/tix/samples/Control.py')
-rwxr-xr-x | Demo/tix/samples/Control.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Demo/tix/samples/Control.py b/Demo/tix/samples/Control.py index e85ee84..3a344c1 100755 --- a/Demo/tix/samples/Control.py +++ b/Demo/tix/samples/Control.py @@ -20,7 +20,7 @@ import Tix -TCL_ALL_EVENTS = 0 +TCL_ALL_EVENTS = 0 def RunSample (root): control = DemoControl(root) @@ -46,7 +46,7 @@ class DemoControl: # $w.top.a allows only integer values # # [Hint] The -options switch sets the options of the subwidgets. - # [Hint] We set the label.width subwidget option of the Controls to + # [Hint] We set the label.width subwidget option of the Controls to # be 16 so that their labels appear to be aligned. # a = Tix.Control(top, label='Number of Engines: ', integer=1, @@ -83,7 +83,7 @@ class DemoControl: def okcmd (self): # tixDemo:Status "Selected %d of %s engines each of thrust %d", (demo_num_engines.get(), demo_maker.get(), demo_thrust.get()) self.quitcmd() - + def quitcmd (self): self.exit = 0 @@ -100,9 +100,9 @@ def adjust_maker(w, inc): i = maker_list.index(demo_maker.get()) i = i + inc if i >= len(maker_list): - i = 0 + i = 0 elif i < 0: - i = len(maker_list) - 1 + i = len(maker_list) - 1 # In Tcl/Tix we should return the string maker_list[i]. We can't # do that in Tkinter so we set the global variable. (This works). @@ -110,10 +110,10 @@ def adjust_maker(w, inc): def validate_maker(w): try: - i = maker_list.index(demo_maker.get()) + i = maker_list.index(demo_maker.get()) except ValueError: - # Works here though. Why ? Beats me. - return maker_list[0] + # Works here though. Why ? Beats me. + return maker_list[0] # Works here though. Why ? Beats me. return maker_list[i] |