Skip to content

Commit 0cb5507

Browse files
author
tim_one
committed
Whitespace normalization, via reindent.py.
git-svn-id: http://svn.python.org/projects/python/trunk@36560 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent b425247 commit 0cb5507

File tree

453 files changed

+31802
-31936
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

453 files changed

+31802
-31936
lines changed

Demo/tix/samples/Balloon.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import Tix
1919

20-
TCL_ALL_EVENTS = 0
20+
TCL_ALL_EVENTS = 0
2121

2222
def RunSample (root):
2323
balloon = DemoBalloon(root)

Demo/tix/samples/BtnBox.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
2-
#
2+
#
33
# $Id$
44
#
55
# Tix Demostration Program
@@ -21,7 +21,7 @@ def RunSample(w):
2121
# Create the label on the top of the dialog box
2222
#
2323
top = Tix.Label(w, padx=20, pady=10, bd=1, relief=Tix.RAISED,
24-
anchor=Tix.CENTER, text='This dialog box is\n a demonstration of the\n tixButtonBox widget')
24+
anchor=Tix.CENTER, text='This dialog box is\n a demonstration of the\n tixButtonBox widget')
2525

2626
# Create the button box and add a few buttons in it. Set the
2727
# -width of all the buttons to the same value so that they
@@ -32,9 +32,9 @@ def RunSample(w):
3232
#
3333
box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
3434
box.add('ok', text='OK', underline=0, width=5,
35-
command=lambda w=w: w.destroy())
35+
command=lambda w=w: w.destroy())
3636
box.add('close', text='Cancel', underline=0, width=5,
37-
command=lambda w=w: w.destroy())
37+
command=lambda w=w: w.destroy())
3838
box.pack(side=Tix.BOTTOM, fill=Tix.X)
3939
top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
4040

Demo/tix/samples/CmpImg.py

+18-19
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
2-
#
2+
#
33
# $Id$
44
#
55
# Tix Demostration Program
@@ -22,13 +22,13 @@
2222
/* width height ncolors chars_per_pixel */
2323
"32 32 7 1",
2424
/* colors */
25-
" s None c None",
26-
". c #000000000000",
27-
"X c white",
28-
"o c #c000c000c000",
29-
"O c #404040",
30-
"+ c blue",
31-
"@ c red",
25+
" s None c None",
26+
". c #000000000000",
27+
"X c white",
28+
"o c #c000c000c000",
29+
"O c #404040",
30+
"+ c blue",
31+
"@ c red",
3232
/* pixels */
3333
" ",
3434
" .............. ",
@@ -69,11 +69,11 @@
6969
/* width height ncolors chars_per_pixel */
7070
"32 32 5 1",
7171
/* colors */
72-
" s None c None",
73-
". c #000000000000",
74-
"X c white",
75-
"o c #c000c000c000",
76-
"O c #800080008000",
72+
" s None c None",
73+
". c #000000000000",
74+
"X c white",
75+
"o c #c000c000c000",
76+
"O c #800080008000",
7777
/* pixels */
7878
" ",
7979
" ",
@@ -146,10 +146,10 @@
146146
def RunSample(w):
147147
w.img0 = Tix.Image('pixmap', data=network_pixmap)
148148
if not w.img0:
149-
w.img0 = Tix.Image('bitmap', data=network_bitmap)
149+
w.img0 = Tix.Image('bitmap', data=network_bitmap)
150150
w.img1 = Tix.Image('pixmap', data=hard_disk_pixmap)
151151
if not w.img0:
152-
w.img1 = Tix.Image('bitmap', data=hard_disk_bitmap)
152+
w.img1 = Tix.Image('bitmap', data=hard_disk_bitmap)
153153

154154
hdd = Tix.Button(w, padx=4, pady=1, width=120)
155155
net = Tix.Button(w, padx=4, pady=1, width=120)
@@ -163,7 +163,7 @@ def RunSample(w):
163163
w.hdd_img = Tix.Image('compound', window=hdd)
164164
w.hdd_img.tk.call(str(w.hdd_img), 'add', 'line')
165165
w.hdd_img.tk.call(str(w.hdd_img), 'add', 'text', '-text', 'Hard Disk',
166-
'-underline', '0')
166+
'-underline', '0')
167167
w.hdd_img.tk.call(str(w.hdd_img), 'add', 'space', '-width', '7')
168168
w.hdd_img.tk.call(str(w.hdd_img), 'add', 'image', '-image', w.img1)
169169

@@ -175,7 +175,7 @@ def RunSample(w):
175175
w.net_img = Tix.Image('compound', window=net)
176176
w.net_img.tk.call(str(w.net_img), 'add', 'line')
177177
w.net_img.tk.call(str(w.net_img), 'add', 'text', '-text', 'Network',
178-
'-underline', '0')
178+
'-underline', '0')
179179
w.net_img.tk.call(str(w.net_img), 'add', 'space', '-width', '7')
180180
w.net_img.tk.call(str(w.net_img), 'add', 'image', '-image', w.img0)
181181

@@ -184,7 +184,7 @@ def RunSample(w):
184184
net['image'] = w.net_img
185185

186186
close = Tix.Button(w, pady=1, text='Close',
187-
command=lambda w=w: w.destroy())
187+
command=lambda w=w: w.destroy())
188188

189189
hdd.pack(side=Tix.LEFT, padx=10, pady=10, fill=Tix.Y, expand=1)
190190
net.pack(side=Tix.LEFT, padx=10, pady=10, fill=Tix.Y, expand=1)
@@ -194,4 +194,3 @@ def RunSample(w):
194194
root = Tix.Tk()
195195
RunSample(root)
196196
root.mainloop()
197-

Demo/tix/samples/ComboBox.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
2-
#
2+
#
33
# $Id$
44
#
55
# Tix Demostration Program
@@ -27,25 +27,25 @@ def RunSample(w):
2727
# to invent new months?
2828
#
2929
# [Hint] The -options switch sets the options of the subwidgets.
30-
# [Hint] We set the label.width subwidget option of both comboboxes to
30+
# [Hint] We set the label.width subwidget option of both comboboxes to
3131
# be 10 so that their labels appear to be aligned.
3232
#
3333
a = Tix.ComboBox(top, label="Month: ", dropdown=1,
34-
command=select_month, editable=0, variable=demo_month,
35-
options='listbox.height 6 label.width 10 label.anchor e')
34+
command=select_month, editable=0, variable=demo_month,
35+
options='listbox.height 6 label.width 10 label.anchor e')
3636

3737
# $w.top.b is a non-drop-down combo box. It is not editable: we provide
3838
# four choices for the user, but he can enter an alternative year if he
3939
# wants to.
4040
#
4141
# [Hint] Use the padY and anchor options of the label subwidget to
42-
# align the label with the entry subwidget.
42+
# align the label with the entry subwidget.
4343
# [Hint] Notice that you should use padY (the NAME of the option) and not
4444
# pady (the SWITCH of the option).
4545
#
4646
b = Tix.ComboBox(top, label="Year: ", dropdown=0,
47-
command=select_year, editable=1, variable=demo_year,
48-
options='listbox.height 4 label.padY 5 label.width 10 label.anchor ne')
47+
command=select_year, editable=1, variable=demo_year,
48+
options='listbox.height 4 label.padY 5 label.width 10 label.anchor ne')
4949

5050
a.pack(side=Tix.TOP, anchor=Tix.W)
5151
b.pack(side=Tix.TOP, anchor=Tix.W)
@@ -70,17 +70,17 @@ def RunSample(w):
7070
b.insert(Tix.END, '1996')
7171

7272
# Use "tixSetSilent" to set the values of the combo box if you
73-
# don't want your -command procedures (cbx:select_month and
73+
# don't want your -command procedures (cbx:select_month and
7474
# cbx:select_year) to be called.
7575
#
7676
a.set_silent('January')
7777
b.set_silent('1995')
7878

7979
box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
8080
box.add('ok', text='Ok', underline=0, width=6,
81-
command=lambda w=w: ok_command(w))
81+
command=lambda w=w: ok_command(w))
8282
box.add('cancel', text='Cancel', underline=0, width=6,
83-
command=lambda w=w: w.destroy())
83+
command=lambda w=w: w.destroy())
8484
box.pack(side=Tix.BOTTOM, fill=Tix.X)
8585
top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
8686

Demo/tix/samples/Control.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
import Tix
2222

23-
TCL_ALL_EVENTS = 0
23+
TCL_ALL_EVENTS = 0
2424

2525
def RunSample (root):
2626
control = DemoControl(root)
@@ -46,7 +46,7 @@ def __init__(self, w):
4646
# $w.top.a allows only integer values
4747
#
4848
# [Hint] The -options switch sets the options of the subwidgets.
49-
# [Hint] We set the label.width subwidget option of the Controls to
49+
# [Hint] We set the label.width subwidget option of the Controls to
5050
# be 16 so that their labels appear to be aligned.
5151
#
5252
a = Tix.Control(top, label='Number of Engines: ', integer=1,
@@ -83,7 +83,7 @@ def __init__(self, w):
8383
def okcmd (self):
8484
# tixDemo:Status "Selected %d of %s engines each of thrust %d", (demo_num_engines.get(), demo_maker.get(), demo_thrust.get())
8585
self.quitcmd()
86-
86+
8787
def quitcmd (self):
8888
self.exit = 0
8989

@@ -100,20 +100,20 @@ def adjust_maker(w, inc):
100100
i = maker_list.index(demo_maker.get())
101101
i = i + inc
102102
if i >= len(maker_list):
103-
i = 0
103+
i = 0
104104
elif i < 0:
105-
i = len(maker_list) - 1
105+
i = len(maker_list) - 1
106106

107107
# In Tcl/Tix we should return the string maker_list[i]. We can't
108108
# do that in Tkinter so we set the global variable. (This works).
109109
demo_maker.set(maker_list[i])
110110

111111
def validate_maker(w):
112112
try:
113-
i = maker_list.index(demo_maker.get())
113+
i = maker_list.index(demo_maker.get())
114114
except ValueError:
115-
# Works here though. Why ? Beats me.
116-
return maker_list[0]
115+
# Works here though. Why ? Beats me.
116+
return maker_list[0]
117117
# Works here though. Why ? Beats me.
118118
return maker_list[i]
119119

Demo/tix/samples/DirList.py

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
22
#
3-
# $Id$
3+
# $Id$
44
#
55
# Tix Demostration Program
66
#
@@ -19,21 +19,21 @@
1919
import Tix, os, copy
2020
from Tkconstants import *
2121

22-
TCL_ALL_EVENTS = 0
22+
TCL_ALL_EVENTS = 0
2323

2424
def RunSample (root):
2525
dirlist = DemoDirList(root)
2626
dirlist.mainloop()
2727
dirlist.destroy()
28-
28+
2929
class DemoDirList:
3030
def __init__(self, w):
3131
self.root = w
3232
self.exit = -1
33-
33+
3434
z = w.winfo_toplevel()
3535
z.wm_protocol("WM_DELETE_WINDOW", lambda self=self: self.quitcmd())
36-
36+
3737
# Create the tixDirList and the tixLabelEntry widgets on the on the top
3838
# of the dialog box
3939

@@ -48,14 +48,14 @@ def __init__(self, w):
4848
#
4949
top.dir = Tix.DirList(top)
5050
top.dir.hlist['width'] = 40
51-
51+
5252
# When the user presses the ".." button, the selected directory
5353
# is "transferred" into the entry widget
5454
#
5555
top.btn = Tix.Button(top, text = " >> ", pady = 0)
5656

5757
# We use a LabelEntry to hold the installation directory. The user
58-
# can choose from the DirList widget, or he can type in the directory
58+
# can choose from the DirList widget, or he can type in the directory
5959
# manually
6060
#
6161
top.ent = Tix.LabelEntry(top, label="Installation Directory:",
@@ -64,7 +64,7 @@ def __init__(self, w):
6464
entry.width 40
6565
label.anchor w
6666
''')
67-
67+
6868
font = self.root.tk.eval('tix option get fixed_font')
6969
# font = self.root.master.tix_option_get('fixed_font')
7070
top.ent.entry['font'] = font
@@ -129,4 +129,3 @@ def destroy (self):
129129
for line in traceback.format_exception(t,v,tb):
130130
text = text + line + '\n'
131131
d = tkMessageBox.showerror ( 'Tix Demo Error', text)
132-

Demo/tix/samples/DirTree.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
22
#
3-
# $Id$
3+
# $Id$
44
#
55
# Tix Demostration Program
66
#
@@ -19,7 +19,7 @@
1919
import Tix, os, copy
2020
from Tkconstants import *
2121

22-
TCL_ALL_EVENTS = 0
22+
TCL_ALL_EVENTS = 0
2323

2424
def RunSample (root):
2525
dirtree = DemoDirTree(root)
@@ -30,7 +30,7 @@ class DemoDirTree:
3030
def __init__(self, w):
3131
self.root = w
3232
self.exit = -1
33-
33+
3434
z = w.winfo_toplevel()
3535
z.wm_protocol("WM_DELETE_WINDOW", lambda self=self: self.quitcmd())
3636

@@ -48,14 +48,14 @@ def __init__(self, w):
4848
#
4949
top.dir = Tix.DirTree(top)
5050
top.dir.hlist['width'] = 40
51-
51+
5252
# When the user presses the ".." button, the selected directory
5353
# is "transferred" into the entry widget
5454
#
5555
top.btn = Tix.Button(top, text = " >> ", pady = 0)
5656

5757
# We use a LabelEntry to hold the installation directory. The user
58-
# can choose from the DirTree widget, or he can type in the directory
58+
# can choose from the DirTree widget, or he can type in the directory
5959
# manually
6060
#
6161
top.ent = Tix.LabelEntry(top, label="Installation Directory:",
@@ -115,4 +115,3 @@ def destroy (self):
115115
if __name__== '__main__' :
116116
root=Tix.Tk()
117117
RunSample(root)
118-

0 commit comments

Comments
 (0)