mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Patch #812378: Normalize white space.
This commit is contained in:
parent
f8d59d28e0
commit
23b44a39ce
10 changed files with 203 additions and 204 deletions
|
@ -34,7 +34,7 @@ o3.name = 'over-the-top object'
|
|||
o3.abbrev = 'ot'
|
||||
o3.methodlist = ['method1', 'method2']
|
||||
o3.funclist = ['new', 'tp_dealloc', 'tp_print', 'tp_getattr', 'tp_setattr',
|
||||
'tp_compare', 'tp_repr', 'tp_hash']
|
||||
'tp_compare', 'tp_repr', 'tp_hash']
|
||||
o3.typelist = ['tp_as_sequence', 'structure']
|
||||
|
||||
#
|
||||
|
|
|
@ -14,24 +14,24 @@ from Tkinter import *
|
|||
from Tkinter import _cnfmerge
|
||||
|
||||
class ScrolledListbox(Listbox):
|
||||
def __init__(self, master=None, cnf={}):
|
||||
cnf = _cnfmerge(cnf)
|
||||
fcnf = {}
|
||||
vcnf = {'name': 'vbar',
|
||||
Pack: {'side': 'right', 'fill': 'y'},}
|
||||
for k in cnf.keys():
|
||||
if type(k) == ClassType or k == 'name':
|
||||
fcnf[k] = cnf[k]
|
||||
del cnf[k]
|
||||
self.frame = Frame(master, fcnf)
|
||||
self.vbar = Scrollbar(self.frame, vcnf)
|
||||
cnf[Pack] = {'side': 'left', 'fill': 'both', 'expand': 'yes'}
|
||||
cnf['name'] = 'list'
|
||||
Listbox.__init__(self, self.frame, cnf)
|
||||
self['yscrollcommand'] = (self.vbar, 'set')
|
||||
self.vbar['command'] = (self, 'yview')
|
||||
def __init__(self, master=None, cnf={}):
|
||||
cnf = _cnfmerge(cnf)
|
||||
fcnf = {}
|
||||
vcnf = {'name': 'vbar',
|
||||
Pack: {'side': 'right', 'fill': 'y'},}
|
||||
for k in cnf.keys():
|
||||
if type(k) == ClassType or k == 'name':
|
||||
fcnf[k] = cnf[k]
|
||||
del cnf[k]
|
||||
self.frame = Frame(master, fcnf)
|
||||
self.vbar = Scrollbar(self.frame, vcnf)
|
||||
cnf[Pack] = {'side': 'left', 'fill': 'both', 'expand': 'yes'}
|
||||
cnf['name'] = 'list'
|
||||
Listbox.__init__(self, self.frame, cnf)
|
||||
self['yscrollcommand'] = (self.vbar, 'set')
|
||||
self.vbar['command'] = (self, 'yview')
|
||||
|
||||
# Copy Pack methods of self.frame -- hack!
|
||||
for m in Pack.__dict__.keys():
|
||||
if m[0] != '_' and m != 'config':
|
||||
setattr(self, m, getattr(self.frame, m))
|
||||
# Copy Pack methods of self.frame -- hack!
|
||||
for m in Pack.__dict__.keys():
|
||||
if m[0] != '_' and m != 'config':
|
||||
setattr(self, m, getattr(self.frame, m))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue