rem
stringlengths 1
322k
| add
stringlengths 0
2.05M
| context
stringlengths 4
228k
| meta
stringlengths 156
215
|
---|---|---|---|
line += char if char == "\n": return line | line.append(char) if char == "\n": return ''.join(line) | def readline(self): """Read line from remote.""" # NB: socket.ssl needs a "readline" method, or perhaps a "makefile" method. line = "" while 1: char = self.sslobj.read(1) line += char if char == "\n": return line | 0b1e6c5aa3592c6043eae0935534b913c6005989 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0b1e6c5aa3592c6043eae0935534b913c6005989/imaplib.py |
if not host: return addinfo(open(file, 'r'), noheaders()) | if not host: return addinfo(open(_fixpath(file), 'r'), noheaders()) | def open_local_file(self, url): host, file = splithost(url) if not host: return addinfo(open(file, 'r'), noheaders()) host, port = splitport(host) if not port and socket.gethostbyname(host) in ( localhost(), thishost()): file = unquote(file) return addinfo(open(file, 'r'), noheaders()) raise IOError, ('local file error', 'not on local host') | 150a70af9c3e75a5b71744b8854287fad8f0f12d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/150a70af9c3e75a5b71744b8854287fad8f0f12d/urllib.py |
return addinfo(open(file, 'r'), noheaders()) | return addinfo(open(_fixpath(file), 'r'), noheaders()) | def open_local_file(self, url): host, file = splithost(url) if not host: return addinfo(open(file, 'r'), noheaders()) host, port = splitport(host) if not port and socket.gethostbyname(host) in ( localhost(), thishost()): file = unquote(file) return addinfo(open(file, 'r'), noheaders()) raise IOError, ('local file error', 'not on local host') | 150a70af9c3e75a5b71744b8854287fad8f0f12d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/150a70af9c3e75a5b71744b8854287fad8f0f12d/urllib.py |
self.implib_dir = self.build_temp | def finalize_options (self): from distutils import sysconfig | 32aff731d5d1af427b5d3c03925d0814cb525144 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/32aff731d5d1af427b5d3c03925d0814cb525144/build_ext.py |
|
def get_ext_libname (self, ext_name): ext_path = string.split (ext_name, '.') if os.name == 'nt' and self.debug: return apply (os.path.join, ext_path) + '_d.lib' return apply (os.path.join, ext_path) + '.lib' | def get_ext_libname (self, ext_name): # create a filename for the (unneeded) lib-file. # extensions in debug_mode are named 'module_d.pyd' under windows ext_path = string.split (ext_name, '.') if os.name == 'nt' and self.debug: return apply (os.path.join, ext_path) + '_d.lib' return apply (os.path.join, ext_path) + '.lib' | 32aff731d5d1af427b5d3c03925d0814cb525144 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/32aff731d5d1af427b5d3c03925d0814cb525144/build_ext.py |
|
if sys.platform == "win32": pythonlib = ("python%d%d" % (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) | from distutils.msvccompiler import MSVCCompiler if sys.platform == "win32" and \ not isinstance(self.compiler, MSVCCompiler): template = "python%d%d" if self.debug: template = template + '_d' pythonlib = (template % (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) | def get_libraries (self, ext): """Return the list of libraries to link against when building a shared extension. On most platforms, this is just 'ext.libraries'; on Windows, we add the Python library (eg. python20.dll). """ # The python library is always needed on Windows. For MSVC, this # is redundant, since the library is mentioned in a pragma in # config.h that MSVC groks. The other Windows compilers all seem # to need it mentioned explicitly, though, so that's what we do. if sys.platform == "win32": pythonlib = ("python%d%d" % (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) # don't extend ext.libraries, it may be shared with other # extensions, it is a reference to the original list return ext.libraries + [pythonlib] else: return ext.libraries | 32aff731d5d1af427b5d3c03925d0814cb525144 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/32aff731d5d1af427b5d3c03925d0814cb525144/build_ext.py |
self.spawn (["zip", "-r", base_dir, base_dir]) | self.spawn (["zip", "-r", base_dir + ".zip", base_dir]) | def make_zipfile (self, base_dir): | 6558dda67c319fbe955a6ec30577e577218ae1f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6558dda67c319fbe955a6ec30577e577218ae1f4/dist.py |
filename = sys.argv[0] | try: filename = sys.argv[0] except AttributeError: filename = '__main__' | def warn(message, category=None, stacklevel=1): """Issue a warning, or maybe ignore it or raise an exception.""" # Check if message is already a Warning object if isinstance(message, Warning): category = message.__class__ # Check category argument if category is None: category = UserWarning assert issubclass(category, Warning) # Get context information try: caller = sys._getframe(stacklevel) except ValueError: globals = sys.__dict__ lineno = 1 else: globals = caller.f_globals lineno = caller.f_lineno if '__name__' in globals: module = globals['__name__'] else: module = "<string>" filename = globals.get('__file__') if filename: fnl = filename.lower() if fnl.endswith(".pyc") or fnl.endswith(".pyo"): filename = filename[:-1] else: if module == "__main__": filename = sys.argv[0] if not filename: filename = module registry = globals.setdefault("__warningregistry__", {}) warn_explicit(message, category, filename, lineno, module, registry) | f538706e8434f198fdc1cac9165365d67b1eacfc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f538706e8434f198fdc1cac9165365d67b1eacfc/warnings.py |
The walk is performed in breadth-first order. This method is a | The walk is performed in depth-first order. This method is a | def walk(self): """Walk over the message tree, yielding each subpart. | eda03eb5b730b4cfd34cf3130bf54652d63306c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/eda03eb5b730b4cfd34cf3130bf54652d63306c3/Message.py |
if not self.stack and not space.match(data): | if not self.stack and space.match(data) is None: | def goahead(self, end): rawdata = self.rawdata i = 0 n = len(rawdata) while i < n: if i > 0: self.__at_start = 0 if self.nomoretags: data = rawdata[i:n] self.handle_data(data) self.lineno = self.lineno + string.count(data, '\n') i = n break res = interesting.search(rawdata, i) if res: j = res.start(0) else: j = n if i < j: if self.__at_start: self.syntax_error('illegal data at start of file') self.__at_start = 0 data = rawdata[i:j] if not self.stack and not space.match(data): self.syntax_error('data not in content') if illegal.search(data): self.syntax_error('illegal character in content') self.handle_data(data) self.lineno = self.lineno + string.count(data, '\n') i = j if i == n: break if rawdata[i] == '<': if starttagopen.match(rawdata, i): if self.literal: data = rawdata[i] self.handle_data(data) self.lineno = self.lineno + string.count(data, '\n') i = i+1 continue k = self.parse_starttag(i) if k < 0: break self.__seen_starttag = 1 self.lineno = self.lineno + string.count(rawdata[i:k], '\n') i = k continue if endtagopen.match(rawdata, i): k = self.parse_endtag(i) if k < 0: break self.lineno = self.lineno + string.count(rawdata[i:k], '\n') i = k self.literal = 0 continue if commentopen.match(rawdata, i): if self.literal: data = rawdata[i] self.handle_data(data) self.lineno = self.lineno + string.count(data, '\n') i = i+1 continue k = self.parse_comment(i) if k < 0: break self.lineno = self.lineno + string.count(rawdata[i:k], '\n') i = k continue if cdataopen.match(rawdata, i): k = self.parse_cdata(i) if k < 0: break self.lineno = self.lineno + string.count(rawdata[i:i], '\n') i = k continue res = xmldecl.match(rawdata, i) if res: if not self.__at_start: self.syntax_error("<?xml?> declaration not at start of document") version, encoding, standalone = res.group('version', 'encoding', 'standalone') if version[1:-1] != '1.0': raise RuntimeError, 'only XML version 1.0 supported' if encoding: encoding = encoding[1:-1] if standalone: standalone = standalone[1:-1] self.handle_xml(encoding, standalone) i = res.end(0) continue res = procopen.match(rawdata, i) if res: k = self.parse_proc(i) if k < 0: break self.lineno = self.lineno + string.count(rawdata[i:k], '\n') i = k continue res = doctype.match(rawdata, i) if res: if self.literal: data = rawdata[i] self.handle_data(data) self.lineno = self.lineno + string.count(data, '\n') i = i+1 continue if self.__seen_doctype: self.syntax_error('multiple DOCTYPE elements') if self.__seen_starttag: self.syntax_error('DOCTYPE not at beginning of document') k = self.parse_doctype(res) if k < 0: break self.__seen_doctype = res.group('name') self.lineno = self.lineno + string.count(rawdata[i:k], '\n') i = k continue elif rawdata[i] == '&': res = charref.match(rawdata, i) if res is not None: i = res.end(0) if rawdata[i-1] != ';': self.syntax_error("`;' missing in charref") i = i-1 if not self.stack: self.syntax_error('data not in content') self.handle_charref(res.group('char')[:-1]) self.lineno = self.lineno + string.count(res.group(0), '\n') continue res = entityref.match(rawdata, i) if res is not None: i = res.end(0) if rawdata[i-1] != ';': self.syntax_error("`;' missing in entityref") i = i-1 name = res.group('name') if self.entitydefs.has_key(name): self.rawdata = rawdata = rawdata[:res.start(0)] + self.entitydefs[name] + rawdata[i:] n = len(rawdata) i = res.start(0) else: self.syntax_error('reference to unknown entity') self.unknown_entityref(name) self.lineno = self.lineno + string.count(res.group(0), '\n') continue elif rawdata[i] == ']': if n-i < 3: break if cdataclose.match(rawdata, i): self.syntax_error("bogus `]]>'") self.handle_data(rawdata[i]) i = i+1 continue else: raise RuntimeError, 'neither < nor & ??' # We get here only if incomplete matches but # nothing else break # end while if i > 0: self.__at_start = 0 if end and i < n: data = rawdata[i] self.syntax_error("bogus `%s'" % data) if illegal.search(data): self.syntax_error('illegal character in content') self.handle_data(data) self.lineno = self.lineno + string.count(data, '\n') self.rawdata = rawdata[i+1:] return self.goahead(end) self.rawdata = rawdata[i:] if end: if not self.__seen_starttag: self.syntax_error('no elements in file') if self.stack: self.syntax_error('missing end tags') while self.stack: self.finish_endtag(self.stack[-1]) | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
if not res: | if res is None: | def parse_comment(self, i): rawdata = self.rawdata if rawdata[i:i+4] <> '<!--': raise RuntimeError, 'unexpected call to handle_comment' res = commentclose.search(rawdata, i+4) if not res: return -1 if doubledash.search(rawdata, i+4, res.start(0)): self.syntax_error("`--' inside comment") if rawdata[res.start(0)-1] == '-': self.syntax_error('comment cannot end in three dashes') if illegal.search(rawdata, i+4, res.start(0)): self.syntax_error('illegal character in comment') self.handle_comment(rawdata[i+4: res.start(0)]) return res.end(0) | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
if not res: | if res is None: | def parse_doctype(self, res): rawdata = self.rawdata n = len(rawdata) name = res.group('name') pubid, syslit = res.group('pubid', 'syslit') if pubid is not None: pubid = pubid[1:-1] # remove quotes pubid = string.join(string.split(pubid)) # normalize if syslit is not None: syslit = syslit[1:-1] # remove quotes j = k = res.end(0) if k >= n: return -1 if rawdata[k] == '[': level = 0 k = k+1 dq = sq = 0 while k < n: c = rawdata[k] if not sq and c == '"': dq = not dq elif not dq and c == "'": sq = not sq elif sq or dq: pass elif level <= 0 and c == ']': res = endbracket.match(rawdata, k+1) if not res: return -1 self.handle_doctype(name, pubid, syslit, rawdata[j+1:k]) return res.end(0) elif c == '<': level = level + 1 elif c == '>': level = level - 1 if level < 0: self.syntax_error("bogus `>' in DOCTYPE") k = k+1 res = endbracket.search(rawdata, k) if not res: return -1 if res.start(0) != k: self.syntax_error('garbage in DOCTYPE') self.handle_doctype(name, pubid, syslit, None) return res.end(0) | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
res = endbracket.search(rawdata, k) if not res: | res = endbracketfind.match(rawdata, k) if res is None: | def parse_doctype(self, res): rawdata = self.rawdata n = len(rawdata) name = res.group('name') pubid, syslit = res.group('pubid', 'syslit') if pubid is not None: pubid = pubid[1:-1] # remove quotes pubid = string.join(string.split(pubid)) # normalize if syslit is not None: syslit = syslit[1:-1] # remove quotes j = k = res.end(0) if k >= n: return -1 if rawdata[k] == '[': level = 0 k = k+1 dq = sq = 0 while k < n: c = rawdata[k] if not sq and c == '"': dq = not dq elif not dq and c == "'": sq = not sq elif sq or dq: pass elif level <= 0 and c == ']': res = endbracket.match(rawdata, k+1) if not res: return -1 self.handle_doctype(name, pubid, syslit, rawdata[j+1:k]) return res.end(0) elif c == '<': level = level + 1 elif c == '>': level = level - 1 if level < 0: self.syntax_error("bogus `>' in DOCTYPE") k = k+1 res = endbracket.search(rawdata, k) if not res: return -1 if res.start(0) != k: self.syntax_error('garbage in DOCTYPE') self.handle_doctype(name, pubid, syslit, None) return res.end(0) | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
if res.start(0) != k: | if endbracket.match(rawdata, k) is None: | def parse_doctype(self, res): rawdata = self.rawdata n = len(rawdata) name = res.group('name') pubid, syslit = res.group('pubid', 'syslit') if pubid is not None: pubid = pubid[1:-1] # remove quotes pubid = string.join(string.split(pubid)) # normalize if syslit is not None: syslit = syslit[1:-1] # remove quotes j = k = res.end(0) if k >= n: return -1 if rawdata[k] == '[': level = 0 k = k+1 dq = sq = 0 while k < n: c = rawdata[k] if not sq and c == '"': dq = not dq elif not dq and c == "'": sq = not sq elif sq or dq: pass elif level <= 0 and c == ']': res = endbracket.match(rawdata, k+1) if not res: return -1 self.handle_doctype(name, pubid, syslit, rawdata[j+1:k]) return res.end(0) elif c == '<': level = level + 1 elif c == '>': level = level - 1 if level < 0: self.syntax_error("bogus `>' in DOCTYPE") k = k+1 res = endbracket.search(rawdata, k) if not res: return -1 if res.start(0) != k: self.syntax_error('garbage in DOCTYPE') self.handle_doctype(name, pubid, syslit, None) return res.end(0) | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
if not res: | if res is None: | def parse_cdata(self, i): rawdata = self.rawdata if rawdata[i:i+9] <> '<![CDATA[': raise RuntimeError, 'unexpected call to parse_cdata' res = cdataclose.search(rawdata, i+9) if not res: return -1 if illegal.search(rawdata, i+9, res.start(0)): self.syntax_error('illegal character in CDATA') if not self.stack: self.syntax_error('CDATA not in content') self.handle_cdata(rawdata[i+9:res.start(0)]) return res.end(0) | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
if not end: | if end is None: | def parse_proc(self, i): rawdata = self.rawdata end = procclose.search(rawdata, i) if not end: return -1 j = end.start(0) if illegal.search(rawdata, i+2, j): self.syntax_error('illegal character in processing instruction') res = tagfind.match(rawdata, i+2) if not res: raise RuntimeError, 'unexpected call to parse_proc' k = res.end(0) name = res.group(0) if string.find(string.lower(name), 'xml') >= 0: self.syntax_error('illegal processing instruction target name') self.handle_proc(name, rawdata[k:j]) return end.end(0) | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
if not res: | if res is None: | def parse_proc(self, i): rawdata = self.rawdata end = procclose.search(rawdata, i) if not end: return -1 j = end.start(0) if illegal.search(rawdata, i+2, j): self.syntax_error('illegal character in processing instruction') res = tagfind.match(rawdata, i+2) if not res: raise RuntimeError, 'unexpected call to parse_proc' k = res.end(0) name = res.group(0) if string.find(string.lower(name), 'xml') >= 0: self.syntax_error('illegal processing instruction target name') self.handle_proc(name, rawdata[k:j]) return end.end(0) | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
def parse_attributes(self, tag, k, j, attributes = None): | def parse_attributes(self, tag, i, j, attributes = None): | def parse_attributes(self, tag, k, j, attributes = None): rawdata = self.rawdata # Now parse the data between k and j into a tag and attrs attrdict = {} try: # convert attributes list to dictionary d = {} for a in attributes: d[a] = None attributes = d except TypeError: pass while k < j: res = attrfind.match(rawdata, k) if not res: break attrname, attrvalue = res.group('name', 'value') if attrvalue is None: self.syntax_error('no attribute value specified') attrvalue = attrname elif attrvalue[:1] == "'" == attrvalue[-1:] or \ attrvalue[:1] == '"' == attrvalue[-1:]: attrvalue = attrvalue[1:-1] else: self.syntax_error('attribute value not quoted') if attributes is not None and not attributes.has_key(attrname): self.syntax_error('unknown attribute %s of element %s' % (attrname, tag)) if attrdict.has_key(attrname): self.syntax_error('attribute specified twice') attrvalue = string.translate(attrvalue, attrtrans) attrdict[attrname] = self.translate_references(attrvalue) k = res.end(0) if attributes is not None: # fill in with default attributes for key, val in attributes.items(): if val is not None and not attrdict.has_key(key): attrdict[key] = val return attrdict, k | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
def parse_attributes(self, tag, k, j, attributes = None): rawdata = self.rawdata # Now parse the data between k and j into a tag and attrs attrdict = {} try: # convert attributes list to dictionary d = {} for a in attributes: d[a] = None attributes = d except TypeError: pass while k < j: res = attrfind.match(rawdata, k) if not res: break attrname, attrvalue = res.group('name', 'value') if attrvalue is None: self.syntax_error('no attribute value specified') attrvalue = attrname elif attrvalue[:1] == "'" == attrvalue[-1:] or \ attrvalue[:1] == '"' == attrvalue[-1:]: attrvalue = attrvalue[1:-1] else: self.syntax_error('attribute value not quoted') if attributes is not None and not attributes.has_key(attrname): self.syntax_error('unknown attribute %s of element %s' % (attrname, tag)) if attrdict.has_key(attrname): self.syntax_error('attribute specified twice') attrvalue = string.translate(attrvalue, attrtrans) attrdict[attrname] = self.translate_references(attrvalue) k = res.end(0) if attributes is not None: # fill in with default attributes for key, val in attributes.items(): if val is not None and not attrdict.has_key(key): attrdict[key] = val return attrdict, k | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
||
while k < j: res = attrfind.match(rawdata, k) if not res: break | while i < j: res = attrfind.match(rawdata, i) if res is None: break | def parse_attributes(self, tag, k, j, attributes = None): rawdata = self.rawdata # Now parse the data between k and j into a tag and attrs attrdict = {} try: # convert attributes list to dictionary d = {} for a in attributes: d[a] = None attributes = d except TypeError: pass while k < j: res = attrfind.match(rawdata, k) if not res: break attrname, attrvalue = res.group('name', 'value') if attrvalue is None: self.syntax_error('no attribute value specified') attrvalue = attrname elif attrvalue[:1] == "'" == attrvalue[-1:] or \ attrvalue[:1] == '"' == attrvalue[-1:]: attrvalue = attrvalue[1:-1] else: self.syntax_error('attribute value not quoted') if attributes is not None and not attributes.has_key(attrname): self.syntax_error('unknown attribute %s of element %s' % (attrname, tag)) if attrdict.has_key(attrname): self.syntax_error('attribute specified twice') attrvalue = string.translate(attrvalue, attrtrans) attrdict[attrname] = self.translate_references(attrvalue) k = res.end(0) if attributes is not None: # fill in with default attributes for key, val in attributes.items(): if val is not None and not attrdict.has_key(key): attrdict[key] = val return attrdict, k | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
self.syntax_error('no attribute value specified') | self.syntax_error("no value specified for attribute `%s'" % attrname) | def parse_attributes(self, tag, k, j, attributes = None): rawdata = self.rawdata # Now parse the data between k and j into a tag and attrs attrdict = {} try: # convert attributes list to dictionary d = {} for a in attributes: d[a] = None attributes = d except TypeError: pass while k < j: res = attrfind.match(rawdata, k) if not res: break attrname, attrvalue = res.group('name', 'value') if attrvalue is None: self.syntax_error('no attribute value specified') attrvalue = attrname elif attrvalue[:1] == "'" == attrvalue[-1:] or \ attrvalue[:1] == '"' == attrvalue[-1:]: attrvalue = attrvalue[1:-1] else: self.syntax_error('attribute value not quoted') if attributes is not None and not attributes.has_key(attrname): self.syntax_error('unknown attribute %s of element %s' % (attrname, tag)) if attrdict.has_key(attrname): self.syntax_error('attribute specified twice') attrvalue = string.translate(attrvalue, attrtrans) attrdict[attrname] = self.translate_references(attrvalue) k = res.end(0) if attributes is not None: # fill in with default attributes for key, val in attributes.items(): if val is not None and not attrdict.has_key(key): attrdict[key] = val return attrdict, k | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
self.syntax_error('attribute value not quoted') | self.syntax_error("attribute `%s' value not quoted" % attrname) if '<' in attrvalue: self.syntax_error("`<' illegal in attribute value") | def parse_attributes(self, tag, k, j, attributes = None): rawdata = self.rawdata # Now parse the data between k and j into a tag and attrs attrdict = {} try: # convert attributes list to dictionary d = {} for a in attributes: d[a] = None attributes = d except TypeError: pass while k < j: res = attrfind.match(rawdata, k) if not res: break attrname, attrvalue = res.group('name', 'value') if attrvalue is None: self.syntax_error('no attribute value specified') attrvalue = attrname elif attrvalue[:1] == "'" == attrvalue[-1:] or \ attrvalue[:1] == '"' == attrvalue[-1:]: attrvalue = attrvalue[1:-1] else: self.syntax_error('attribute value not quoted') if attributes is not None and not attributes.has_key(attrname): self.syntax_error('unknown attribute %s of element %s' % (attrname, tag)) if attrdict.has_key(attrname): self.syntax_error('attribute specified twice') attrvalue = string.translate(attrvalue, attrtrans) attrdict[attrname] = self.translate_references(attrvalue) k = res.end(0) if attributes is not None: # fill in with default attributes for key, val in attributes.items(): if val is not None and not attrdict.has_key(key): attrdict[key] = val return attrdict, k | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
self.syntax_error('unknown attribute %s of element %s' % | self.syntax_error("unknown attribute `%s' of element `%s'" % | def parse_attributes(self, tag, k, j, attributes = None): rawdata = self.rawdata # Now parse the data between k and j into a tag and attrs attrdict = {} try: # convert attributes list to dictionary d = {} for a in attributes: d[a] = None attributes = d except TypeError: pass while k < j: res = attrfind.match(rawdata, k) if not res: break attrname, attrvalue = res.group('name', 'value') if attrvalue is None: self.syntax_error('no attribute value specified') attrvalue = attrname elif attrvalue[:1] == "'" == attrvalue[-1:] or \ attrvalue[:1] == '"' == attrvalue[-1:]: attrvalue = attrvalue[1:-1] else: self.syntax_error('attribute value not quoted') if attributes is not None and not attributes.has_key(attrname): self.syntax_error('unknown attribute %s of element %s' % (attrname, tag)) if attrdict.has_key(attrname): self.syntax_error('attribute specified twice') attrvalue = string.translate(attrvalue, attrtrans) attrdict[attrname] = self.translate_references(attrvalue) k = res.end(0) if attributes is not None: # fill in with default attributes for key, val in attributes.items(): if val is not None and not attrdict.has_key(key): attrdict[key] = val return attrdict, k | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
self.syntax_error('attribute specified twice') | self.syntax_error("attribute `%s' specified twice" % attrname) | def parse_attributes(self, tag, k, j, attributes = None): rawdata = self.rawdata # Now parse the data between k and j into a tag and attrs attrdict = {} try: # convert attributes list to dictionary d = {} for a in attributes: d[a] = None attributes = d except TypeError: pass while k < j: res = attrfind.match(rawdata, k) if not res: break attrname, attrvalue = res.group('name', 'value') if attrvalue is None: self.syntax_error('no attribute value specified') attrvalue = attrname elif attrvalue[:1] == "'" == attrvalue[-1:] or \ attrvalue[:1] == '"' == attrvalue[-1:]: attrvalue = attrvalue[1:-1] else: self.syntax_error('attribute value not quoted') if attributes is not None and not attributes.has_key(attrname): self.syntax_error('unknown attribute %s of element %s' % (attrname, tag)) if attrdict.has_key(attrname): self.syntax_error('attribute specified twice') attrvalue = string.translate(attrvalue, attrtrans) attrdict[attrname] = self.translate_references(attrvalue) k = res.end(0) if attributes is not None: # fill in with default attributes for key, val in attributes.items(): if val is not None and not attrdict.has_key(key): attrdict[key] = val return attrdict, k | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
k = res.end(0) | i = res.end(0) | def parse_attributes(self, tag, k, j, attributes = None): rawdata = self.rawdata # Now parse the data between k and j into a tag and attrs attrdict = {} try: # convert attributes list to dictionary d = {} for a in attributes: d[a] = None attributes = d except TypeError: pass while k < j: res = attrfind.match(rawdata, k) if not res: break attrname, attrvalue = res.group('name', 'value') if attrvalue is None: self.syntax_error('no attribute value specified') attrvalue = attrname elif attrvalue[:1] == "'" == attrvalue[-1:] or \ attrvalue[:1] == '"' == attrvalue[-1:]: attrvalue = attrvalue[1:-1] else: self.syntax_error('attribute value not quoted') if attributes is not None and not attributes.has_key(attrname): self.syntax_error('unknown attribute %s of element %s' % (attrname, tag)) if attrdict.has_key(attrname): self.syntax_error('attribute specified twice') attrvalue = string.translate(attrvalue, attrtrans) attrdict[attrname] = self.translate_references(attrvalue) k = res.end(0) if attributes is not None: # fill in with default attributes for key, val in attributes.items(): if val is not None and not attrdict.has_key(key): attrdict[key] = val return attrdict, k | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
return attrdict, k | return attrdict, i | def parse_attributes(self, tag, k, j, attributes = None): rawdata = self.rawdata # Now parse the data between k and j into a tag and attrs attrdict = {} try: # convert attributes list to dictionary d = {} for a in attributes: d[a] = None attributes = d except TypeError: pass while k < j: res = attrfind.match(rawdata, k) if not res: break attrname, attrvalue = res.group('name', 'value') if attrvalue is None: self.syntax_error('no attribute value specified') attrvalue = attrname elif attrvalue[:1] == "'" == attrvalue[-1:] or \ attrvalue[:1] == '"' == attrvalue[-1:]: attrvalue = attrvalue[1:-1] else: self.syntax_error('attribute value not quoted') if attributes is not None and not attributes.has_key(attrname): self.syntax_error('unknown attribute %s of element %s' % (attrname, tag)) if attrdict.has_key(attrname): self.syntax_error('attribute specified twice') attrvalue = string.translate(attrvalue, attrtrans) attrdict[attrname] = self.translate_references(attrvalue) k = res.end(0) if attributes is not None: # fill in with default attributes for key, val in attributes.items(): if val is not None and not attrdict.has_key(key): attrdict[key] = val return attrdict, k | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
end = endbracket.search(rawdata, i+1) if not end: | end = endbracketfind.match(rawdata, i+1) if end is None: | def parse_starttag(self, i): rawdata = self.rawdata # i points to start of tag end = endbracket.search(rawdata, i+1) if not end: return -1 j = end.start(0) res = tagfind.match(rawdata, i+1) if not res: raise RuntimeError, 'unexpected call to parse_starttag' k = res.end(0) tag = res.group(0) if not self.__seen_starttag and self.__seen_doctype: if tag != self.__seen_doctype: self.syntax_error('starttag does not match DOCTYPE') if self.__seen_starttag and not self.stack: self.syntax_error('multiple elements on top level') if hasattr(self, tag + '_attributes'): attributes = getattr(self, tag + '_attributes') else: attributes = None attrdict, k = self.parse_attributes(tag, k, j, attributes) res = starttagend.match(rawdata, k) if not res: self.syntax_error('garbage in start tag') self.finish_starttag(tag, attrdict) if res and res.group('slash') == '/': self.finish_endtag(tag) return end.end(0) | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
j = end.start(0) res = tagfind.match(rawdata, i+1) if not res: raise RuntimeError, 'unexpected call to parse_starttag' k = res.end(0) tag = res.group(0) if not self.__seen_starttag and self.__seen_doctype: if tag != self.__seen_doctype: self.syntax_error('starttag does not match DOCTYPE') | tag = starttagmatch.match(rawdata, i) if tag is None or tag.end(0) != end.end(0): self.syntax_error('garbage in starttag') return end.end(0) tagname = tag.group('tagname') if not self.__seen_starttag and self.__seen_doctype and \ tagname != self.__seen_doctype: self.syntax_error('starttag does not match DOCTYPE') | def parse_starttag(self, i): rawdata = self.rawdata # i points to start of tag end = endbracket.search(rawdata, i+1) if not end: return -1 j = end.start(0) res = tagfind.match(rawdata, i+1) if not res: raise RuntimeError, 'unexpected call to parse_starttag' k = res.end(0) tag = res.group(0) if not self.__seen_starttag and self.__seen_doctype: if tag != self.__seen_doctype: self.syntax_error('starttag does not match DOCTYPE') if self.__seen_starttag and not self.stack: self.syntax_error('multiple elements on top level') if hasattr(self, tag + '_attributes'): attributes = getattr(self, tag + '_attributes') else: attributes = None attrdict, k = self.parse_attributes(tag, k, j, attributes) res = starttagend.match(rawdata, k) if not res: self.syntax_error('garbage in start tag') self.finish_starttag(tag, attrdict) if res and res.group('slash') == '/': self.finish_endtag(tag) return end.end(0) | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
if hasattr(self, tag + '_attributes'): attributes = getattr(self, tag + '_attributes') | if hasattr(self, tagname + '_attributes'): attributes = getattr(self, tagname + '_attributes') | def parse_starttag(self, i): rawdata = self.rawdata # i points to start of tag end = endbracket.search(rawdata, i+1) if not end: return -1 j = end.start(0) res = tagfind.match(rawdata, i+1) if not res: raise RuntimeError, 'unexpected call to parse_starttag' k = res.end(0) tag = res.group(0) if not self.__seen_starttag and self.__seen_doctype: if tag != self.__seen_doctype: self.syntax_error('starttag does not match DOCTYPE') if self.__seen_starttag and not self.stack: self.syntax_error('multiple elements on top level') if hasattr(self, tag + '_attributes'): attributes = getattr(self, tag + '_attributes') else: attributes = None attrdict, k = self.parse_attributes(tag, k, j, attributes) res = starttagend.match(rawdata, k) if not res: self.syntax_error('garbage in start tag') self.finish_starttag(tag, attrdict) if res and res.group('slash') == '/': self.finish_endtag(tag) return end.end(0) | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
attrdict, k = self.parse_attributes(tag, k, j, attributes) res = starttagend.match(rawdata, k) if not res: self.syntax_error('garbage in start tag') self.finish_starttag(tag, attrdict) if res and res.group('slash') == '/': self.finish_endtag(tag) return end.end(0) | k, j = tag.span('attrs') attrdict, k = self.parse_attributes(tagname, k, j, attributes) self.finish_starttag(tagname, attrdict) if tag.group('slash') == '/': self.finish_endtag(tagname) return tag.end(0) | def parse_starttag(self, i): rawdata = self.rawdata # i points to start of tag end = endbracket.search(rawdata, i+1) if not end: return -1 j = end.start(0) res = tagfind.match(rawdata, i+1) if not res: raise RuntimeError, 'unexpected call to parse_starttag' k = res.end(0) tag = res.group(0) if not self.__seen_starttag and self.__seen_doctype: if tag != self.__seen_doctype: self.syntax_error('starttag does not match DOCTYPE') if self.__seen_starttag and not self.stack: self.syntax_error('multiple elements on top level') if hasattr(self, tag + '_attributes'): attributes = getattr(self, tag + '_attributes') else: attributes = None attrdict, k = self.parse_attributes(tag, k, j, attributes) res = starttagend.match(rawdata, k) if not res: self.syntax_error('garbage in start tag') self.finish_starttag(tag, attrdict) if res and res.group('slash') == '/': self.finish_endtag(tag) return end.end(0) | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
end = endbracket.search(rawdata, i+1) if not end: | end = endbracketfind.match(rawdata, i+1) if end is None: | def parse_endtag(self, i): rawdata = self.rawdata end = endbracket.search(rawdata, i+1) if not end: return -1 res = tagfind.match(rawdata, i+2) if not res: self.syntax_error('no name specified in end tag') tag = '' k = i+2 else: tag = res.group(0) k = res.end(0) if k != end.start(0): self.syntax_error('garbage in end tag') self.finish_endtag(tag) return end.end(0) | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
if not res: | if res is None: | def parse_endtag(self, i): rawdata = self.rawdata end = endbracket.search(rawdata, i+1) if not end: return -1 res = tagfind.match(rawdata, i+2) if not res: self.syntax_error('no name specified in end tag') tag = '' k = i+2 else: tag = res.group(0) k = res.end(0) if k != end.start(0): self.syntax_error('garbage in end tag') self.finish_endtag(tag) return end.end(0) | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
if k != end.start(0): | if endbracket.match(rawdata, k) is None: | def parse_endtag(self, i): rawdata = self.rawdata end = endbracket.search(rawdata, i+1) if not end: return -1 res = tagfind.match(rawdata, i+2) if not res: self.syntax_error('no name specified in end tag') tag = '' k = i+2 else: tag = res.group(0) k = res.end(0) if k != end.start(0): self.syntax_error('garbage in end tag') self.finish_endtag(tag) return end.end(0) | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py |
class C: | class Boom: | def test_trashcan(): # "trashcan" is a hack to prevent stack overflow when deallocating # very deeply nested tuples etc. It works in part by abusing the # type pointer and refcount fields, and that can yield horrible # problems when gc tries to traverse the structures. # If this test fails (as it does in 2.0, 2.1 and 2.2), it will # most likely die via segfault. # Note: In 2.3 the possibility for compiling without cyclic gc was # removed, and that in turn allows the trashcan mechanism to work # via much simpler means (e.g., it never abuses the type pointer or # refcount fields anymore). Since it's much less likely to cause a # problem now, the various constants in this expensive (we force a lot # of full collections) test are cut back from the 2.2 version. gc.enable() N = 150 for count in range(2): t = [] for i in range(N): t = [t, Ouch()] u = [] for i in range(N): u = [u, Ouch()] v = {} for i in range(N): v = {1: v, 2: Ouch()} gc.disable() | c3eda75d5672af3c2b250505938b9915886d73d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c3eda75d5672af3c2b250505938b9915886d73d5/test_gc.py |
a = C() b = C() | a = Boom() b = Boom() | def test_boom(): a = C() b = C() a.attr = b b.attr = a gc.collect() garbagelen = len(gc.garbage) del a, b # a<->b are in a trash cycle now. Collection will invoke C.__getattr__ # (to see whether a and b have __del__ methods), and __getattr__ deletes # the internal "attr" attributes as a side effect. That causes the # trash cycle to get reclaimed via refcounts falling to 0, thus mutating # the trash graph as a side effect of merely asking whether __del__ # exists. This used to (before 2.3b1) crash Python. expect(gc.collect(), 0, "boom") expect(len(gc.garbage), garbagelen, "boom") | c3eda75d5672af3c2b250505938b9915886d73d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c3eda75d5672af3c2b250505938b9915886d73d5/test_gc.py |
def test_boom(): a = C() b = C() a.attr = b b.attr = a gc.collect() garbagelen = len(gc.garbage) del a, b # a<->b are in a trash cycle now. Collection will invoke C.__getattr__ # (to see whether a and b have __del__ methods), and __getattr__ deletes # the internal "attr" attributes as a side effect. That causes the # trash cycle to get reclaimed via refcounts falling to 0, thus mutating # the trash graph as a side effect of merely asking whether __del__ # exists. This used to (before 2.3b1) crash Python. expect(gc.collect(), 0, "boom") expect(len(gc.garbage), garbagelen, "boom") | c3eda75d5672af3c2b250505938b9915886d73d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c3eda75d5672af3c2b250505938b9915886d73d5/test_gc.py |
||
self._read_test(['a,\\b,c'], [['a', '\\b', 'c']], escapechar='\\') | self._read_test(['a,\\b,c'], [['a', 'b', 'c']], escapechar='\\') | def test_read_escape(self): self._read_test(['a,\\b,c'], [['a', '\\b', 'c']], escapechar='\\') self._read_test(['a,b\\,c'], [['a', 'b,c']], escapechar='\\') self._read_test(['a,"b\\,c"'], [['a', 'b,c']], escapechar='\\') self._read_test(['a,"b,\\c"'], [['a', 'b,\\c']], escapechar='\\') self._read_test(['a,"b,c\\""'], [['a', 'b,c"']], escapechar='\\') self._read_test(['a,"b,c"\\'], [['a', 'b,c\\']], escapechar='\\') | 03c71cc2a3986205d31fa9fbabc868f987d72086 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/03c71cc2a3986205d31fa9fbabc868f987d72086/test_csv.py |
self._read_test(['a,"b,\\c"'], [['a', 'b,\\c']], escapechar='\\') | self._read_test(['a,"b,\\c"'], [['a', 'b,c']], escapechar='\\') | def test_read_escape(self): self._read_test(['a,\\b,c'], [['a', '\\b', 'c']], escapechar='\\') self._read_test(['a,b\\,c'], [['a', 'b,c']], escapechar='\\') self._read_test(['a,"b\\,c"'], [['a', 'b,c']], escapechar='\\') self._read_test(['a,"b,\\c"'], [['a', 'b,\\c']], escapechar='\\') self._read_test(['a,"b,c\\""'], [['a', 'b,c"']], escapechar='\\') self._read_test(['a,"b,c"\\'], [['a', 'b,c\\']], escapechar='\\') | 03c71cc2a3986205d31fa9fbabc868f987d72086 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/03c71cc2a3986205d31fa9fbabc868f987d72086/test_csv.py |
host, port = self.socket.getsockname() | host, port = self.socket.getsockname()[:2] | def server_bind(self): """Override server_bind to store the server name.""" SocketServer.TCPServer.server_bind(self) host, port = self.socket.getsockname() self.server_name = socket.getfqdn(host) self.server_port = port | cada4fd0918e1712d6b9313c143383d4829bb2c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cada4fd0918e1712d6b9313c143383d4829bb2c2/BaseHTTPServer.py |
host, port = self.client_address | host, port = self.client_address[:2] | def address_string(self): """Return the client address formatted for logging. | cada4fd0918e1712d6b9313c143383d4829bb2c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cada4fd0918e1712d6b9313c143383d4829bb2c2/BaseHTTPServer.py |
"exclude=", "include=", "package=", "strip", "iconfile=") | "exclude=", "include=", "package=", "strip", "iconfile=", "lib=") | def main(builder=None): if builder is None: builder = AppBuilder(verbosity=1) shortopts = "b:n:r:f:e:m:c:p:lx:i:hvqa" longopts = ("builddir=", "name=", "resource=", "file=", "executable=", "mainprogram=", "creator=", "nib=", "plist=", "link", "link-exec", "help", "verbose", "quiet", "argv", "standalone", "exclude=", "include=", "package=", "strip", "iconfile=") try: options, args = getopt.getopt(sys.argv[1:], shortopts, longopts) except getopt.error: usage() for opt, arg in options: if opt in ('-b', '--builddir'): builder.builddir = arg elif opt in ('-n', '--name'): builder.name = arg elif opt in ('-r', '--resource'): builder.resources.append(arg) elif opt in ('-f', '--file'): srcdst = arg.split(':') if len(srcdst) != 2: usage("-f or --file argument must be two paths, " "separated by a colon") builder.files.append(srcdst) elif opt in ('-e', '--executable'): builder.executable = arg elif opt in ('-m', '--mainprogram'): builder.mainprogram = arg elif opt in ('-a', '--argv'): builder.argv_emulation = 1 elif opt in ('-c', '--creator'): builder.creator = arg elif opt == '--iconfile': builder.iconfile = arg elif opt == "--nib": builder.nibname = arg elif opt in ('-p', '--plist'): builder.plist = Plist.fromFile(arg) elif opt in ('-l', '--link'): builder.symlink = 1 elif opt == '--link-exec': builder.symlink_exec = 1 elif opt in ('-h', '--help'): usage() elif opt in ('-v', '--verbose'): builder.verbosity += 1 elif opt in ('-q', '--quiet'): builder.verbosity -= 1 elif opt == '--standalone': builder.standalone = 1 elif opt in ('-x', '--exclude'): builder.excludeModules.append(arg) elif opt in ('-i', '--include'): builder.includeModules.append(arg) elif opt == '--package': builder.includePackages.append(arg) elif opt == '--strip': builder.strip = 1 if len(args) != 1: usage("Must specify one command ('build', 'report' or 'help')") command = args[0] if command == "build": builder.setup() builder.build() elif command == "report": builder.setup() builder.report() elif command == "help": usage() else: usage("Unknown command '%s'" % command) | 84606452add53a570d3a87106c56f624d930aede /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/84606452add53a570d3a87106c56f624d930aede/bundlebuilder.py |
def fileConfig(fname): | def fileConfig(fname, defaults=None): | def fileConfig(fname): """ Read the logging configuration from a ConfigParser-format file. This can be called several times from an application, allowing an end user the ability to select from various pre-canned configurations (if the developer provides a mechanism to present the choices and load the chosen configuration). In versions of ConfigParser which have the readfp method [typically shipped in 2.x versions of Python], you can pass in a file-like object rather than a filename, in which case the file-like object will be read using readfp. """ import ConfigParser cp = ConfigParser.ConfigParser() if hasattr(cp, 'readfp') and hasattr(fname, 'readline'): cp.readfp(fname) else: cp.read(fname) #first, do the formatters... flist = cp.get("formatters", "keys") if len(flist): flist = string.split(flist, ",") formatters = {} for form in flist: sectname = "formatter_%s" % form opts = cp.options(sectname) if "format" in opts: fs = cp.get(sectname, "format", 1) else: fs = None if "datefmt" in opts: dfs = cp.get(sectname, "datefmt", 1) else: dfs = None f = logging.Formatter(fs, dfs) formatters[form] = f #next, do the handlers... #critical section... logging._acquireLock() try: try: #first, lose the existing handlers... logging._handlers.clear() #now set up the new ones... hlist = cp.get("handlers", "keys") if len(hlist): hlist = string.split(hlist, ",") handlers = {} fixups = [] #for inter-handler references for hand in hlist: sectname = "handler_%s" % hand klass = cp.get(sectname, "class") opts = cp.options(sectname) if "formatter" in opts: fmt = cp.get(sectname, "formatter") else: fmt = "" klass = eval(klass, vars(logging)) args = cp.get(sectname, "args") args = eval(args, vars(logging)) h = apply(klass, args) if "level" in opts: level = cp.get(sectname, "level") h.setLevel(logging._levelNames[level]) if len(fmt): h.setFormatter(formatters[fmt]) #temporary hack for FileHandler and MemoryHandler. if klass == logging.handlers.MemoryHandler: if "target" in opts: target = cp.get(sectname,"target") else: target = "" if len(target): #the target handler may not be loaded yet, so keep for later... fixups.append((h, target)) handlers[hand] = h #now all handlers are loaded, fixup inter-handler references... for fixup in fixups: h = fixup[0] t = fixup[1] h.setTarget(handlers[t]) #at last, the loggers...first the root... llist = cp.get("loggers", "keys") llist = string.split(llist, ",") llist.remove("root") sectname = "logger_root" root = logging.root log = root opts = cp.options(sectname) if "level" in opts: level = cp.get(sectname, "level") log.setLevel(logging._levelNames[level]) for h in root.handlers: root.removeHandler(h) hlist = cp.get(sectname, "handlers") if len(hlist): hlist = string.split(hlist, ",") for hand in hlist: log.addHandler(handlers[hand]) #and now the others... #we don't want to lose the existing loggers, #since other threads may have pointers to them. #existing is set to contain all existing loggers, #and as we go through the new configuration we #remove any which are configured. At the end, #what's left in existing is the set of loggers #which were in the previous configuration but #which are not in the new configuration. existing = root.manager.loggerDict.keys() #now set up the new ones... for log in llist: sectname = "logger_%s" % log qn = cp.get(sectname, "qualname") opts = cp.options(sectname) if "propagate" in opts: propagate = cp.getint(sectname, "propagate") else: propagate = 1 logger = logging.getLogger(qn) if qn in existing: existing.remove(qn) if "level" in opts: level = cp.get(sectname, "level") logger.setLevel(logging._levelNames[level]) for h in logger.handlers: logger.removeHandler(h) logger.propagate = propagate logger.disabled = 0 hlist = cp.get(sectname, "handlers") if len(hlist): hlist = string.split(hlist, ",") for hand in hlist: logger.addHandler(handlers[hand]) #Disable any old loggers. There's no point deleting #them as other threads may continue to hold references #and by disabling them, you stop them doing any logging. for log in existing: root.manager.loggerDict[log].disabled = 1 except: import traceback ei = sys.exc_info() traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr) del ei finally: logging._releaseLock() | 16fcf779e548483c5ab429e1ee39f292bfa18e42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/16fcf779e548483c5ab429e1ee39f292bfa18e42/config.py |
cp = ConfigParser.ConfigParser() | cp = ConfigParser.ConfigParser(defaults) | def fileConfig(fname): """ Read the logging configuration from a ConfigParser-format file. This can be called several times from an application, allowing an end user the ability to select from various pre-canned configurations (if the developer provides a mechanism to present the choices and load the chosen configuration). In versions of ConfigParser which have the readfp method [typically shipped in 2.x versions of Python], you can pass in a file-like object rather than a filename, in which case the file-like object will be read using readfp. """ import ConfigParser cp = ConfigParser.ConfigParser() if hasattr(cp, 'readfp') and hasattr(fname, 'readline'): cp.readfp(fname) else: cp.read(fname) #first, do the formatters... flist = cp.get("formatters", "keys") if len(flist): flist = string.split(flist, ",") formatters = {} for form in flist: sectname = "formatter_%s" % form opts = cp.options(sectname) if "format" in opts: fs = cp.get(sectname, "format", 1) else: fs = None if "datefmt" in opts: dfs = cp.get(sectname, "datefmt", 1) else: dfs = None f = logging.Formatter(fs, dfs) formatters[form] = f #next, do the handlers... #critical section... logging._acquireLock() try: try: #first, lose the existing handlers... logging._handlers.clear() #now set up the new ones... hlist = cp.get("handlers", "keys") if len(hlist): hlist = string.split(hlist, ",") handlers = {} fixups = [] #for inter-handler references for hand in hlist: sectname = "handler_%s" % hand klass = cp.get(sectname, "class") opts = cp.options(sectname) if "formatter" in opts: fmt = cp.get(sectname, "formatter") else: fmt = "" klass = eval(klass, vars(logging)) args = cp.get(sectname, "args") args = eval(args, vars(logging)) h = apply(klass, args) if "level" in opts: level = cp.get(sectname, "level") h.setLevel(logging._levelNames[level]) if len(fmt): h.setFormatter(formatters[fmt]) #temporary hack for FileHandler and MemoryHandler. if klass == logging.handlers.MemoryHandler: if "target" in opts: target = cp.get(sectname,"target") else: target = "" if len(target): #the target handler may not be loaded yet, so keep for later... fixups.append((h, target)) handlers[hand] = h #now all handlers are loaded, fixup inter-handler references... for fixup in fixups: h = fixup[0] t = fixup[1] h.setTarget(handlers[t]) #at last, the loggers...first the root... llist = cp.get("loggers", "keys") llist = string.split(llist, ",") llist.remove("root") sectname = "logger_root" root = logging.root log = root opts = cp.options(sectname) if "level" in opts: level = cp.get(sectname, "level") log.setLevel(logging._levelNames[level]) for h in root.handlers: root.removeHandler(h) hlist = cp.get(sectname, "handlers") if len(hlist): hlist = string.split(hlist, ",") for hand in hlist: log.addHandler(handlers[hand]) #and now the others... #we don't want to lose the existing loggers, #since other threads may have pointers to them. #existing is set to contain all existing loggers, #and as we go through the new configuration we #remove any which are configured. At the end, #what's left in existing is the set of loggers #which were in the previous configuration but #which are not in the new configuration. existing = root.manager.loggerDict.keys() #now set up the new ones... for log in llist: sectname = "logger_%s" % log qn = cp.get(sectname, "qualname") opts = cp.options(sectname) if "propagate" in opts: propagate = cp.getint(sectname, "propagate") else: propagate = 1 logger = logging.getLogger(qn) if qn in existing: existing.remove(qn) if "level" in opts: level = cp.get(sectname, "level") logger.setLevel(logging._levelNames[level]) for h in logger.handlers: logger.removeHandler(h) logger.propagate = propagate logger.disabled = 0 hlist = cp.get(sectname, "handlers") if len(hlist): hlist = string.split(hlist, ",") for hand in hlist: logger.addHandler(handlers[hand]) #Disable any old loggers. There's no point deleting #them as other threads may continue to hold references #and by disabling them, you stop them doing any logging. for log in existing: root.manager.loggerDict[log].disabled = 1 except: import traceback ei = sys.exc_info() traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr) del ei finally: logging._releaseLock() | 16fcf779e548483c5ab429e1ee39f292bfa18e42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/16fcf779e548483c5ab429e1ee39f292bfa18e42/config.py |
Output("PyObject_HEAD_INIT(&PyType_Type)") | Output("PyObject_HEAD_INIT(NULL)") | def outputTypeObject(self): sf = self.static and "staticforward " Output() Output("%sPyTypeObject %s = {", sf, self.typename) IndentLevel() Output("PyObject_HEAD_INIT(&PyType_Type)") Output("0, /*ob_size*/") Output("\"%s\", /*tp_name*/", self.name) Output("sizeof(%s), /*tp_basicsize*/", self.objecttype) Output("0, /*tp_itemsize*/") Output("/* methods */") Output("(destructor) %s_dealloc, /*tp_dealloc*/", self.prefix) Output("0, /*tp_print*/") Output("(getattrfunc) %s_getattr, /*tp_getattr*/", self.prefix) Output("(setattrfunc) %s_setattr, /*tp_setattr*/", self.prefix) Output("(cmpfunc) %s_compare, /*tp_compare*/", self.prefix) Output("(reprfunc) %s_repr, /*tp_repr*/", self.prefix) Output("(PyNumberMethods *)0, /* tp_as_number */") Output("(PySequenceMethods *)0, /* tp_as_sequence */") Output("(PyMappingMethods *)0, /* tp_as_mapping */") Output("(hashfunc) %s_hash, /*tp_hash*/", self.prefix) DedentLevel() Output("};") | 359763ac1bf2e23490fd916cd1d5211fb2da6b17 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/359763ac1bf2e23490fd916cd1d5211fb2da6b17/bgenObjectDefinition.py |
__slots__ = ['_hash'] | __slots__ = ['_hashcode'] | def _compute_hash(self): # Calculate hash code for a set by xor'ing the hash codes of # the elements. This algorithm ensures that the hash code # does not depend on the order in which elements are added to # the code. This is not called __hash__ because a BaseSet # should not be hashable; only an ImmutableSet is hashable. result = 0 for elt in self: result ^= hash(elt) return result | 9db6cb17fc9fd15b03b17cd3b718e89cd9999e7a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9db6cb17fc9fd15b03b17cd3b718e89cd9999e7a/sets.py |
TixWidget.__init__(self, master, 'tixDirList', ['options'], cnf, kw) self.subwidget_list['hlist'] = _dummyHList(self, 'hlist') self.subwidget_list['shlist'] = _dummyScrolledHList(self, 'vsb') | TixWidget.__init__(self, master, 'tixListNoteBook', ['options'], cnf, kw) self.subwidget_list['pane'] = _dummyPanedWindow(self, 'pane', destroy_physically=0) self.subwidget_list['hlist'] = _dummyHList(self, 'hlist') self.subwidget_list['shlist'] = _dummyScrolledHList(self, 'vsb') | def __init__(self, master, cnf={}, **kw): TixWidget.__init__(self, master, 'tixDirList', ['options'], cnf, kw) self.subwidget_list['hlist'] = _dummyHList(self, 'hlist') self.subwidget_list['shlist'] = _dummyScrolledHList(self, 'vsb') | cfc329d685480ad738765900fac9b5d5764084ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cfc329d685480ad738765900fac9b5d5764084ab/Tix.py |
'UNICODE': ('ref/unicode', 'encodings unicode TYPES STRING'), | 'UNICODE': ('ref/strings', 'encodings unicode TYPES STRING'), | def writedocs(dir, pkgpath='', done=None): """Write out HTML documentation for all modules in a directory tree.""" if done is None: done = {} for file in os.listdir(dir): path = os.path.join(dir, file) if ispackage(path): writedocs(path, pkgpath + file + '.', done) elif os.path.isfile(path): modname = inspect.getmodulename(path) if modname: modname = pkgpath + modname if not modname in done: done[modname] = 1 writedoc(modname) | df9dfa85d260060b89dc4c838c3bb4d39715243d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/df9dfa85d260060b89dc4c838c3bb4d39715243d/pydoc.py |
'BOOLEAN': ('ref/lambda', 'EXPRESSIONS TRUTHVALUE'), | 'BOOLEAN': ('ref/Booleans', 'EXPRESSIONS TRUTHVALUE'), | 'METHODS': ('lib/typesmethods', 'class def CLASSES TYPES'), | df9dfa85d260060b89dc4c838c3bb4d39715243d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/df9dfa85d260060b89dc4c838c3bb4d39715243d/pydoc.py |
"""Tix maintains a list of directory under which which | """Tix maintains a list of directories under which | def tix_addbitmapdir(self, directory): """Tix maintains a list of directory under which which the tix_getimage and tix_getbitmap commands will search for image files. The standard bitmap direc tory is $TIX_LIBRARY/bitmaps. The addbitmapdir com mand adds directory into this list. By using this command, the image files of an applications can also be located using the tix_getimage or tix_getbitmap command. """ return self.tk.call('tix', 'addbitmapdir', directory) | 9805b7904bac823d0eef38bb7e401191c68a5598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9805b7904bac823d0eef38bb7e401191c68a5598/Tix.py |
search for image files. The standard bitmap direc tory is $TIX_LIBRARY/bitmaps. The addbitmapdir com mand adds directory into this list. By using this | search for image files. The standard bitmap directory is $TIX_LIBRARY/bitmaps. The addbitmapdir command adds directory into this list. By using this | def tix_addbitmapdir(self, directory): """Tix maintains a list of directory under which which the tix_getimage and tix_getbitmap commands will search for image files. The standard bitmap direc tory is $TIX_LIBRARY/bitmaps. The addbitmapdir com mand adds directory into this list. By using this command, the image files of an applications can also be located using the tix_getimage or tix_getbitmap command. """ return self.tk.call('tix', 'addbitmapdir', directory) | 9805b7904bac823d0eef38bb7e401191c68a5598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9805b7904bac823d0eef38bb7e401191c68a5598/Tix.py |
"""Query or modify the configuration options of the Tix application context. If no option is specified, returns a list describing all of the available options (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given option(s) to have the given value(s); in this case the command returns an empty string. Option may be any of the options described in the CONFIGURATION OPTIONS section. | """Query or modify the configuration options of the Tix application context. If no option is specified, returns a dictionary all of the available options. If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given option(s) to have the given value(s); in this case the command returns an empty string. Option may be any of the configuration options. | def tix_configure(self, cnf=None, **kw): """Query or modify the configuration options of the Tix application context. If no option is specified, returns a list describing all of the available options (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given option(s) to have the given value(s); in this case the command returns an empty string. Option may be any of the options described in the CONFIGURATION OPTIONS section. """ return apply(self.tk.call, ('tix', configure) + self._options(cnf,kw) ) | 9805b7904bac823d0eef38bb7e401191c68a5598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9805b7904bac823d0eef38bb7e401191c68a5598/Tix.py |
return apply(self.tk.call, ('tix', configure) + self._options(cnf,kw) ) | if kw: cnf = _cnfmerge((cnf, kw)) elif cnf: cnf = _cnfmerge(cnf) if cnf is None: cnf = {} for x in self.tk.split(self.tk.call('tix', 'configure')): cnf[x[0][1:]] = (x[0][1:],) + x[1:] return cnf if isinstance(cnf, StringType): x = self.tk.split(self.tk.call('tix', 'configure', '-'+cnf)) return (x[0][1:],) + x[1:] return self.tk.call(('tix', 'configure') + self._options(cnf)) | def tix_configure(self, cnf=None, **kw): """Query or modify the configuration options of the Tix application context. If no option is specified, returns a list describing all of the available options (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given option(s) to have the given value(s); in this case the command returns an empty string. Option may be any of the options described in the CONFIGURATION OPTIONS section. """ return apply(self.tk.call, ('tix', configure) + self._options(cnf,kw) ) | 9805b7904bac823d0eef38bb7e401191c68a5598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9805b7904bac823d0eef38bb7e401191c68a5598/Tix.py |
"""Returns the file selection dialog that may be shared among different modules of this application. This command will create a file selection dialog widget when it is called the first time. This dialog will be returned by all subsequent calls to tix filedialog. An optional dlgclass parameter can be passed to specified what type of file selection dialog widget is desired. Possible options are 'tix' 'FileSelectDialog' or 'tixExFileSelectDialog'. | """Returns the file selection dialog that may be shared among different calls from this application. This command will create a file selection dialog widget when it is called the first time. This dialog will be returned by all subsequent calls to tix_filedialog. An optional dlgclass parameter can be passed to specified what type of file selection dialog widget is desired. Possible options are tix FileSelectDialog or tixExFileSelectDialog. | def tix_filedialog(self, dlgclass=None): """Returns the file selection dialog that may be shared among different modules of this application. This command will create a file selection dialog widget when it is called the first time. This dialog will be returned by all subsequent calls to tix filedialog. An optional dlgclass parameter can be passed to specified what type of file selection dialog widget is desired. Possible options are 'tix' 'FileSelectDialog' or 'tixExFileSelectDialog'. """ if dlgclass is not None: return self.tk.call('tix', 'filedialog', dlgclass) else: return self.tk.call('tix', 'filedialog') | 9805b7904bac823d0eef38bb7e401191c68a5598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9805b7904bac823d0eef38bb7e401191c68a5598/Tix.py |
"""Locates a bitmap file of the name name.xpm or name in one of the bitmap directories (self, see the tix_addbitmapdir command above). By using tix_getbitmap, you can advoid hard coding the pathnames of the bitmap files in your application. When successful, it returns the complete pathname of the bitmap file, prefixed with the character '@'. The returned value can be used to configure the -bitmap option of the TK and Tix widgets. | """Locates a bitmap file of the name name.xpm or name in one of the bitmap directories (see the tix_addbitmapdir command above). By using tix_getbitmap, you can avoid hard coding the pathnames of the bitmap files in your application. When successful, it returns the complete pathname of the bitmap file, prefixed with the character '@'. The returned value can be used to configure the -bitmap option of the TK and Tix widgets. | def tix_getbitmap(self, name): """Locates a bitmap file of the name name.xpm or name in one of the bitmap directories (self, see the tix_addbitmapdir command above). By using tix_getbitmap, you can advoid hard coding the pathnames of the bitmap files in your application. When successful, it returns the complete pathname of the bitmap file, prefixed with the character '@'. The returned value can be used to configure the -bitmap option of the TK and Tix widgets. """ return self.tk.call('tix', 'getbitmap', name) | 9805b7904bac823d0eef38bb7e401191c68a5598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9805b7904bac823d0eef38bb7e401191c68a5598/Tix.py |
"""Locates an image file of the name name.xpm, name.xbm or name.ppm in one of the bitmap directo ries (see the addbitmapdir command above). If more than one file with the same name (but different extensions) exist, then the image type is chosen according to the depth of the X display: xbm images are chosen on monochrome displays and color images are chosen on color displays. By using tix getim age, you can advoid hard coding the pathnames of the image files in your application. When success ful, this command returns the name of the newly created image, which can be used to configure the -image option of the TK and Tix widgets. | """Locates an image file of the name name.xpm, name.xbm or name.ppm in one of the bitmap directories (see the addbitmapdir command above). If more than one file with the same name (but different extensions) exist, then the image type is chosen according to the depth of the X display: xbm images are chosen on monochrome displays and color images are chosen on color displays. By using tix_ getimage, you can advoid hard coding the pathnames of the image files in your application. When successful, this command returns the name of the newly created image, which can be used to configure the -image option of the Tk and Tix widgets. | def tix_getimage(self, name): """Locates an image file of the name name.xpm, name.xbm or name.ppm in one of the bitmap directo ries (see the addbitmapdir command above). If more than one file with the same name (but different extensions) exist, then the image type is chosen according to the depth of the X display: xbm images are chosen on monochrome displays and color images are chosen on color displays. By using tix getim age, you can advoid hard coding the pathnames of the image files in your application. When success ful, this command returns the name of the newly created image, which can be used to configure the -image option of the TK and Tix widgets. """ return self.tk.call('tix', 'getimage', name) | 9805b7904bac823d0eef38bb7e401191c68a5598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9805b7904bac823d0eef38bb7e401191c68a5598/Tix.py |
scheme mechanism. Available options are: | scheme mechanism. Available options include: | def tix_option_get(self, name): """Gets the options manitained by the Tix scheme mechanism. Available options are: | 9805b7904bac823d0eef38bb7e401191c68a5598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9805b7904bac823d0eef38bb7e401191c68a5598/Tix.py |
"""Resets the scheme and fontset of the Tix application to newScheme and newFontSet, respectively. This affects only those widgets created after this call. Therefore, it is best to call the resetop tions command before the creation of any widgets in a Tix application. The optional parameter newScmPrio can be given to reset the priority level of the TK options set by the Tix schemes. Because of the way TK handles the X option database, after tixwish has started up, it is not possible to reset the color schemes and font sets using the tix config command. Instead, the tix resetoptions command must be used. | """Resets the scheme and fontset of the Tix application to newScheme and newFontSet, respectively. This affects only those widgets created after this call. Therefore, it is best to call the resetoptions command before the creation of any widgets in a Tix application. The optional parameter newScmPrio can be given to reset the priority level of the Tk options set by the Tix schemes. Because of the way Tk handles the X option database, after Tix has been has imported and inited, it is not possible to reset the color schemes and font sets using the tix config command. Instead, the tix_resetoptions command must be used. | def tix_resetoptions(self, newScheme, newFontSet, newScmPrio=None): """Resets the scheme and fontset of the Tix application to newScheme and newFontSet, respectively. This affects only those widgets created after this call. Therefore, it is best to call the resetop tions command before the creation of any widgets in a Tix application. | 9805b7904bac823d0eef38bb7e401191c68a5598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9805b7904bac823d0eef38bb7e401191c68a5598/Tix.py |
def __init__(self, screenName=None, baseName=None, className='Tix'): Tkinter.Tk.__init__(self, screenName, baseName, className) tixlib = os.environ.get('TIX_LIBRARY') self.tk.eval('global auto_path; lappend auto_path [file dir [info nameof]]') if tixlib is not None: self.tk.eval('global auto_path; lappend auto_path {%s}' % tixlib) self.tk.eval('global tcl_pkgPath; lappend tcl_pkgPath {%s}' % tixlib) # Load Tix - this should work dynamically or statically # If it's static, lib/tix8.1/pkgIndex.tcl should have # 'load {} Tix' # If it's dynamic, lib/tix8.1/pkgIndex.tcl should have # 'load libtix8.1.8.3.so Tix' self.tk.eval('package require Tix') | 9805b7904bac823d0eef38bb7e401191c68a5598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9805b7904bac823d0eef38bb7e401191c68a5598/Tix.py |
||
elif type(option) != type(''): | elif not isinstance(option, StringType): | def config_all(self, option, value): """Set configuration options for all subwidgets (and self).""" if option == '': return elif type(option) != type(''): option = `option` if type(value) != type(''): value = `value` names = self._subwidget_names() for name in names: self.tk.call(name, 'configure', '-' + option, value) | 9805b7904bac823d0eef38bb7e401191c68a5598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9805b7904bac823d0eef38bb7e401191c68a5598/Tix.py |
if type(value) != type(''): | if not isinstance(value, StringType): | def config_all(self, option, value): """Set configuration options for all subwidgets (and self).""" if option == '': return elif type(option) != type(''): option = `option` if type(value) != type(''): value = `value` names = self._subwidget_names() for name in names: self.tk.call(name, 'configure', '-' + option, value) | 9805b7904bac823d0eef38bb7e401191c68a5598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9805b7904bac823d0eef38bb7e401191c68a5598/Tix.py |
label Label message Message""" | label Label message Message""" | def __getitem__(self,key): return self.tk.call(self.stylename, 'cget', '-%s'%key) | 9805b7904bac823d0eef38bb7e401191c68a5598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9805b7904bac823d0eef38bb7e401191c68a5598/Tix.py |
static = ['options', 'installcolormap', 'initwait', 'statusbar', 'cursor'] | static = ['options', 'installcolormap', 'initwait', 'statusbar', 'cursor'] | def __init__(self, master=None, cnf={}, **kw): # static seem to be -installcolormap -initwait -statusbar -cursor static = ['options', 'installcolormap', 'initwait', 'statusbar', 'cursor'] TixWidget.__init__(self, master, 'tixBalloon', static, cnf, kw) self.subwidget_list['label'] = _dummyLabel(self, 'label', destroy_physically=0) self.subwidget_list['message'] = _dummyLabel(self, 'message', destroy_physically=0) | 9805b7904bac823d0eef38bb7e401191c68a5598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9805b7904bac823d0eef38bb7e401191c68a5598/Tix.py |
destroy_physically=0) | destroy_physically=0) | def __init__(self, master=None, cnf={}, **kw): # static seem to be -installcolormap -initwait -statusbar -cursor static = ['options', 'installcolormap', 'initwait', 'statusbar', 'cursor'] TixWidget.__init__(self, master, 'tixBalloon', static, cnf, kw) self.subwidget_list['label'] = _dummyLabel(self, 'label', destroy_physically=0) self.subwidget_list['message'] = _dummyLabel(self, 'message', destroy_physically=0) | 9805b7904bac823d0eef38bb7e401191c68a5598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9805b7904bac823d0eef38bb7e401191c68a5598/Tix.py |
destroy_physically=0) | destroy_physically=0) | def __init__(self, master=None, cnf={}, **kw): # static seem to be -installcolormap -initwait -statusbar -cursor static = ['options', 'installcolormap', 'initwait', 'statusbar', 'cursor'] TixWidget.__init__(self, master, 'tixBalloon', static, cnf, kw) self.subwidget_list['label'] = _dummyLabel(self, 'label', destroy_physically=0) self.subwidget_list['message'] = _dummyLabel(self, 'message', destroy_physically=0) | 9805b7904bac823d0eef38bb7e401191c68a5598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9805b7904bac823d0eef38bb7e401191c68a5598/Tix.py |
['orientation', 'options'], cnf, kw) | ['orientation', 'options'], cnf, kw) | def __init__(self, master=None, cnf={}, **kw): TixWidget.__init__(self, master, 'tixButtonBox', ['orientation', 'options'], cnf, kw) | 9805b7904bac823d0eef38bb7e401191c68a5598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9805b7904bac823d0eef38bb7e401191c68a5598/Tix.py |
(self._w, 'add', name) + self._options(cnf, kw)) | (self._w, 'add', name) + self._options(cnf, kw)) | def add(self, name, cnf={}, **kw): """Add a button with given name to box.""" | 9805b7904bac823d0eef38bb7e401191c68a5598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9805b7904bac823d0eef38bb7e401191c68a5598/Tix.py |
['editable', 'dropdown', 'fancy', 'options'], cnf, kw) | ['editable', 'dropdown', 'fancy', 'options'], cnf, kw) | def __init__ (self, master=None, cnf={}, **kw): TixWidget.__init__(self, master, 'tixComboBox', ['editable', 'dropdown', 'fancy', 'options'], cnf, kw) self.subwidget_list['label'] = _dummyLabel(self, 'label') self.subwidget_list['entry'] = _dummyEntry(self, 'entry') self.subwidget_list['arrow'] = _dummyButton(self, 'arrow') self.subwidget_list['slistbox'] = _dummyScrolledListBox(self, 'slistbox') try: self.subwidget_list['tick'] = _dummyButton(self, 'tick') self.subwidget_list['cross'] = _dummyButton(self, 'cross') except TypeError: # unavailable when -fancy not specified pass | 9805b7904bac823d0eef38bb7e401191c68a5598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9805b7904bac823d0eef38bb7e401191c68a5598/Tix.py |
'slistbox') | 'slistbox') | def __init__ (self, master=None, cnf={}, **kw): TixWidget.__init__(self, master, 'tixComboBox', ['editable', 'dropdown', 'fancy', 'options'], cnf, kw) self.subwidget_list['label'] = _dummyLabel(self, 'label') self.subwidget_list['entry'] = _dummyEntry(self, 'entry') self.subwidget_list['arrow'] = _dummyButton(self, 'arrow') self.subwidget_list['slistbox'] = _dummyScrolledListBox(self, 'slistbox') try: self.subwidget_list['tick'] = _dummyButton(self, 'tick') self.subwidget_list['cross'] = _dummyButton(self, 'cross') except TypeError: # unavailable when -fancy not specified pass | 9805b7904bac823d0eef38bb7e401191c68a5598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9805b7904bac823d0eef38bb7e401191c68a5598/Tix.py |
"lib", "python" + sys.version[:3]) | "lib", "python" + get_python_version()) | def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): """Return the directory containing the Python library (standard or site additions). If 'plat_specific' is true, return the directory containing platform-specific modules, i.e. any module from a non-pure-Python module distribution; otherwise, return the platform-shared library directory. If 'standard_lib' is true, return the directory containing standard Python library modules; otherwise, return the directory for site-specific modules. If 'prefix' is supplied, use it instead of sys.prefix or sys.exec_prefix -- i.e., ignore 'plat_specific'. """ if prefix is None: prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": libpython = os.path.join(prefix, "lib", "python" + sys.version[:3]) if standard_lib: return libpython else: return os.path.join(libpython, "site-packages") elif os.name == "nt": if standard_lib: return os.path.join(prefix, "Lib") else: if sys.version < "2.2": return prefix else: return os.path.join(PREFIX, "Lib", "site-packages") elif os.name == "mac": if plat_specific: if standard_lib: return os.path.join(prefix, "Lib", "lib-dynload") else: return os.path.join(prefix, "Lib", "site-packages") else: if standard_lib: return os.path.join(prefix, "Lib") else: return os.path.join(prefix, "Lib", "site-packages") elif os.name == "os2": if standard_lib: return os.path.join(PREFIX, "Lib") else: return os.path.join(PREFIX, "Lib", "site-packages") else: raise DistutilsPlatformError( "I don't know where Python installs its library " "on platform '%s'" % os.name) | 39bedfb76076dfd64fdb8de93972252ee6452b80 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/39bedfb76076dfd64fdb8de93972252ee6452b80/sysconfig.py |
methods = Pack.__dict__.keys() methods = methods + Grid.__dict__.keys() methods = methods + Place.__dict__.keys() | methods = Pack.__dict__.keys() methods = methods + Grid.__dict__.keys() methods = methods + Place.__dict__.keys() | def __init__(self, master=None, cnf=None, **kw): if cnf is None: cnf = {} if kw: cnf = _cnfmerge((cnf, kw)) fcnf = {} for k in cnf.keys(): if type(k) == ClassType or k == 'name': fcnf[k] = cnf[k] del cnf[k] self.frame = apply(Frame, (master,), fcnf) self.vbar = Scrollbar(self.frame, name='vbar') self.vbar.pack(side=RIGHT, fill=Y) cnf['name'] = 'text' apply(Text.__init__, (self, self.frame), cnf) self.pack(side=LEFT, fill=BOTH, expand=1) self['yscrollcommand'] = self.vbar.set self.vbar['command'] = self.yview | 6b64a5940d1bd9f4b65eb31de92a8e28491e2b14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6b64a5940d1bd9f4b65eb31de92a8e28491e2b14/ScrolledText.py |
db.DB_INIT_LOCK | db.DB_THREAD) | db.DB_INIT_LOCK | db.DB_THREAD | self.envFlags) | def setUp(self): self.filename = self.__class__.__name__ + '.db' homeDir = os.path.join(os.path.dirname(sys.argv[0]), 'db_home') self.homeDir = homeDir try: os.mkdir(homeDir) except os.error: pass self.env = db.DBEnv() self.env.open(homeDir, db.DB_CREATE | db.DB_INIT_MPOOL | db.DB_INIT_LOCK | db.DB_THREAD) | 5336fb05ddf1be4bd2e3c0764368783eae5a96b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5336fb05ddf1be4bd2e3c0764368783eae5a96b6/test_associate.py |
def addDataToDB(self, d): | def addDataToDB(self, d, txn=None): | def addDataToDB(self, d): for key, value in musicdata.items(): if type(self.keytype) == type(''): key = "%02d" % key d.put(key, string.join(value, '|')) | 5336fb05ddf1be4bd2e3c0764368783eae5a96b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5336fb05ddf1be4bd2e3c0764368783eae5a96b6/test_associate.py |
d.put(key, string.join(value, '|')) def createDB(self): | d.put(key, string.join(value, '|'), txn=txn) def createDB(self, txn=None): | def addDataToDB(self, d): for key, value in musicdata.items(): if type(self.keytype) == type(''): key = "%02d" % key d.put(key, string.join(value, '|')) | 5336fb05ddf1be4bd2e3c0764368783eae5a96b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5336fb05ddf1be4bd2e3c0764368783eae5a96b6/test_associate.py |
db.DB_CREATE | db.DB_THREAD) | db.DB_CREATE | db.DB_THREAD | self.dbFlags, txn=txn) | def createDB(self): self.primary = db.DB(self.env) self.primary.set_get_returns_none(2) self.primary.open(self.filename, "primary", self.dbtype, db.DB_CREATE | db.DB_THREAD) | 5336fb05ddf1be4bd2e3c0764368783eae5a96b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5336fb05ddf1be4bd2e3c0764368783eae5a96b6/test_associate.py |
db.DB_CREATE | db.DB_THREAD) | db.DB_CREATE | db.DB_THREAD | self.dbFlags) | def test01_associateWithDB(self): if verbose: print '\n', '-=' * 30 print "Running %s.test01_associateWithDB..." % \ self.__class__.__name__ | 5336fb05ddf1be4bd2e3c0764368783eae5a96b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5336fb05ddf1be4bd2e3c0764368783eae5a96b6/test_associate.py |
db.DB_CREATE | db.DB_THREAD) | db.DB_CREATE | db.DB_THREAD | self.dbFlags) | def test02_associateAfterDB(self): if verbose: print '\n', '-=' * 30 print "Running %s.test02_associateAfterDB..." % \ self.__class__.__name__ | 5336fb05ddf1be4bd2e3c0764368783eae5a96b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5336fb05ddf1be4bd2e3c0764368783eae5a96b6/test_associate.py |
def finish_test(self, secDB): | def finish_test(self, secDB, txn=None): | def finish_test(self, secDB): # 'Blues' should not be in the secondary database vals = secDB.pget('Blues') assert vals == None, vals | 5336fb05ddf1be4bd2e3c0764368783eae5a96b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5336fb05ddf1be4bd2e3c0764368783eae5a96b6/test_associate.py |
vals = secDB.pget('Blues') | vals = secDB.pget('Blues', txn=txn) | def finish_test(self, secDB): # 'Blues' should not be in the secondary database vals = secDB.pget('Blues') assert vals == None, vals | 5336fb05ddf1be4bd2e3c0764368783eae5a96b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5336fb05ddf1be4bd2e3c0764368783eae5a96b6/test_associate.py |
vals = secDB.pget('Unknown') | vals = secDB.pget('Unknown', txn=txn) | def finish_test(self, secDB): # 'Blues' should not be in the secondary database vals = secDB.pget('Blues') assert vals == None, vals | 5336fb05ddf1be4bd2e3c0764368783eae5a96b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5336fb05ddf1be4bd2e3c0764368783eae5a96b6/test_associate.py |
c = self.getDB().cursor() | c = self.getDB().cursor(txn) | def finish_test(self, secDB): # 'Blues' should not be in the secondary database vals = secDB.pget('Blues') assert vals == None, vals | 5336fb05ddf1be4bd2e3c0764368783eae5a96b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5336fb05ddf1be4bd2e3c0764368783eae5a96b6/test_associate.py |
c = secDB.cursor() | c = secDB.cursor(txn) | def finish_test(self, secDB): # 'Blues' should not be in the secondary database vals = secDB.pget('Blues') assert vals == None, vals | 5336fb05ddf1be4bd2e3c0764368783eae5a96b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5336fb05ddf1be4bd2e3c0764368783eae5a96b6/test_associate.py |
try: thunk() except TestFailed: if verbose: print "failed (expected %s but got %s)" % (result, test_result) raise TestFailed, name else: if verbose: print "ok" | thunk() if verbose: print "ok" | def run_test(name, thunk): if verbose: print "testing %s..." % name, try: thunk() except TestFailed: if verbose: print "failed (expected %s but got %s)" % (result, test_result) raise TestFailed, name else: if verbose: print "ok" | e10e3ceb2f11133a8701937dc86837aa04d74295 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e10e3ceb2f11133a8701937dc86837aa04d74295/test_gc.py |
if gc.collect() != 1: raise TestFailed | expect(gc.collect(), 1, "list") | def test_list(): l = [] l.append(l) gc.collect() del l if gc.collect() != 1: raise TestFailed | e10e3ceb2f11133a8701937dc86837aa04d74295 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e10e3ceb2f11133a8701937dc86837aa04d74295/test_gc.py |
if gc.collect() != 1: raise TestFailed | expect(gc.collect(), 1, "dict") | def test_dict(): d = {} d[1] = d gc.collect() del d if gc.collect() != 1: raise TestFailed | e10e3ceb2f11133a8701937dc86837aa04d74295 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e10e3ceb2f11133a8701937dc86837aa04d74295/test_gc.py |
if gc.collect() != 2: raise TestFailed | expect(gc.collect(), 2, "tuple") | def test_tuple(): # since tuples are immutable we close the loop with a list l = [] t = (l,) l.append(t) gc.collect() del t del l if gc.collect() != 2: raise TestFailed | e10e3ceb2f11133a8701937dc86837aa04d74295 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e10e3ceb2f11133a8701937dc86837aa04d74295/test_gc.py |
if gc.collect() == 0: raise TestFailed | expect_not(gc.collect(), 0, "class") | def test_class(): class A: pass A.a = A gc.collect() del A if gc.collect() == 0: raise TestFailed | e10e3ceb2f11133a8701937dc86837aa04d74295 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e10e3ceb2f11133a8701937dc86837aa04d74295/test_gc.py |
if gc.collect() == 0: raise TestFailed | expect_not(gc.collect(), 0, "instance") | def test_instance(): class A: pass a = A() a.a = a gc.collect() del a if gc.collect() == 0: raise TestFailed | e10e3ceb2f11133a8701937dc86837aa04d74295 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e10e3ceb2f11133a8701937dc86837aa04d74295/test_gc.py |
if gc.collect() == 0: raise TestFailed | expect_not(gc.collect(), 0, "method") | def __init__(self): self.init = self.__init__ | e10e3ceb2f11133a8701937dc86837aa04d74295 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e10e3ceb2f11133a8701937dc86837aa04d74295/test_gc.py |
if gc.collect() == 0: raise TestFailed | expect_not(gc.collect(), 0, "finalizer") | def __del__(self): pass | e10e3ceb2f11133a8701937dc86837aa04d74295 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e10e3ceb2f11133a8701937dc86837aa04d74295/test_gc.py |
raise TestFailed | raise TestFailed, "didn't find obj in garbage (finalizer)" | def __del__(self): pass | e10e3ceb2f11133a8701937dc86837aa04d74295 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e10e3ceb2f11133a8701937dc86837aa04d74295/test_gc.py |
if gc.collect() != 2: raise TestFailed | expect(gc.collect(), 2, "function") | exec("def f(): pass\n") in d | e10e3ceb2f11133a8701937dc86837aa04d74295 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e10e3ceb2f11133a8701937dc86837aa04d74295/test_gc.py |
if gc.collect() != 1: raise TestFailed | expect(gc.collect(), 1, "frame") | def f(): frame = sys._getframe() | e10e3ceb2f11133a8701937dc86837aa04d74295 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e10e3ceb2f11133a8701937dc86837aa04d74295/test_gc.py |
raise TestFailed | raise TestFailed, "didn't find obj in garbage (saveall)" | def test_saveall(): # Verify that cyclic garbage like lists show up in gc.garbage if the # SAVEALL option is enabled. debug = gc.get_debug() gc.set_debug(debug | gc.DEBUG_SAVEALL) l = [] l.append(l) id_l = id(l) del l gc.collect() try: for obj in gc.garbage: if id(obj) == id_l: del obj[:] break else: raise TestFailed gc.garbage.remove(obj) finally: gc.set_debug(debug) | e10e3ceb2f11133a8701937dc86837aa04d74295 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e10e3ceb2f11133a8701937dc86837aa04d74295/test_gc.py |
append = "$append%d" % self.__list_count | tmpname = "$list%d" % self.__list_count | def visitListComp(self, node): self.set_lineno(node) # setup list append = "$append%d" % self.__list_count self.__list_count = self.__list_count + 1 self.emit('BUILD_LIST', 0) self.emit('DUP_TOP') self.emit('LOAD_ATTR', 'append') self._implicitNameOp('STORE', append) | 2baa123081849da33ef8ac1c37b56d04252d77cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2baa123081849da33ef8ac1c37b56d04252d77cc/pycodegen.py |
self.emit('LOAD_ATTR', 'append') self._implicitNameOp('STORE', append) | self._implicitNameOp('STORE', tmpname) | def visitListComp(self, node): self.set_lineno(node) # setup list append = "$append%d" % self.__list_count self.__list_count = self.__list_count + 1 self.emit('BUILD_LIST', 0) self.emit('DUP_TOP') self.emit('LOAD_ATTR', 'append') self._implicitNameOp('STORE', append) | 2baa123081849da33ef8ac1c37b56d04252d77cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2baa123081849da33ef8ac1c37b56d04252d77cc/pycodegen.py |
self._implicitNameOp('LOAD', append) | self._implicitNameOp('LOAD', tmpname) | def visitListComp(self, node): self.set_lineno(node) # setup list append = "$append%d" % self.__list_count self.__list_count = self.__list_count + 1 self.emit('BUILD_LIST', 0) self.emit('DUP_TOP') self.emit('LOAD_ATTR', 'append') self._implicitNameOp('STORE', append) | 2baa123081849da33ef8ac1c37b56d04252d77cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2baa123081849da33ef8ac1c37b56d04252d77cc/pycodegen.py |
self.emit('CALL_FUNCTION', 1) self.emit('POP_TOP') | self.emit('LIST_APPEND',) | def visitListComp(self, node): self.set_lineno(node) # setup list append = "$append%d" % self.__list_count self.__list_count = self.__list_count + 1 self.emit('BUILD_LIST', 0) self.emit('DUP_TOP') self.emit('LOAD_ATTR', 'append') self._implicitNameOp('STORE', append) | 2baa123081849da33ef8ac1c37b56d04252d77cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2baa123081849da33ef8ac1c37b56d04252d77cc/pycodegen.py |
self._implicitNameOp('DELETE', append) | self._implicitNameOp('DELETE', tmpname) | def visitListComp(self, node): self.set_lineno(node) # setup list append = "$append%d" % self.__list_count self.__list_count = self.__list_count + 1 self.emit('BUILD_LIST', 0) self.emit('DUP_TOP') self.emit('LOAD_ATTR', 'append') self._implicitNameOp('STORE', append) | 2baa123081849da33ef8ac1c37b56d04252d77cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2baa123081849da33ef8ac1c37b56d04252d77cc/pycodegen.py |
e.num = getint(b) | e.num = getint_event(b) | def _substitute(self, *args): """Internal function.""" if len(args) != len(self._subst_format): return args getboolean = self.tk.getboolean getint = int nsign, b, f, h, k, s, t, w, x, y, A, E, K, N, W, T, X, Y, D = args # Missing: (a, c, d, m, o, v, B, R) e = Event() e.serial = getint(nsign) e.num = getint(b) try: e.focus = getboolean(f) except TclError: pass e.height = getint(h) e.keycode = getint(k) # For Visibility events, event state is a string and # not an integer: try: e.state = getint(s) except ValueError: e.state = s e.time = getint(t) e.width = getint(w) e.x = getint(x) e.y = getint(y) e.char = A try: e.send_event = getboolean(E) except TclError: pass e.keysym = K e.keysym_num = getint(N) e.type = T try: e.widget = self._nametowidget(W) except KeyError: e.widget = W e.x_root = getint(X) e.y_root = getint(Y) try: e.delta = getint(D) except ValueError: e.delta = 0 return (e,) | 851b1c8d466c86af5052fb03f636288f91058f32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/851b1c8d466c86af5052fb03f636288f91058f32/Tkinter.py |
e.height = getint(h) e.keycode = getint(k) try: e.state = getint(s) except ValueError: e.state = s e.time = getint(t) e.width = getint(w) e.x = getint(x) e.y = getint(y) | e.height = getint_event(h) e.keycode = getint_event(k) e.state = getint_event(s) e.time = getint_event(t) e.width = getint_event(w) e.x = getint_event(x) e.y = getint_event(y) | def _substitute(self, *args): """Internal function.""" if len(args) != len(self._subst_format): return args getboolean = self.tk.getboolean getint = int nsign, b, f, h, k, s, t, w, x, y, A, E, K, N, W, T, X, Y, D = args # Missing: (a, c, d, m, o, v, B, R) e = Event() e.serial = getint(nsign) e.num = getint(b) try: e.focus = getboolean(f) except TclError: pass e.height = getint(h) e.keycode = getint(k) # For Visibility events, event state is a string and # not an integer: try: e.state = getint(s) except ValueError: e.state = s e.time = getint(t) e.width = getint(w) e.x = getint(x) e.y = getint(y) e.char = A try: e.send_event = getboolean(E) except TclError: pass e.keysym = K e.keysym_num = getint(N) e.type = T try: e.widget = self._nametowidget(W) except KeyError: e.widget = W e.x_root = getint(X) e.y_root = getint(Y) try: e.delta = getint(D) except ValueError: e.delta = 0 return (e,) | 851b1c8d466c86af5052fb03f636288f91058f32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/851b1c8d466c86af5052fb03f636288f91058f32/Tkinter.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.