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...
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...
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) + '.l...
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 lib...
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, ...
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 ...
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] == '...
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 ...
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 ...
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 ...
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.synta...
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'...
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'...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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 ...
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 ...
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 ...
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 ...
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 t...
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 t...
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 t...
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 ...
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 ...
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 ...
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\\""'], [...
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\\""'], [...
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=", "...
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 configurat...
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 configurat...
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...
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 hash...
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.getmodule...
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 ...
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 ...
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 describin...
"""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 t...
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, th...
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:] retu...
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, th...
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 passe...
"""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 specifie...
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 op...
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 f...
"""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 t...
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 co...
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 chose...
"""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...
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 ...
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...
"""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 ...
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 wid...
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...
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_ph...
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_ph...
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_ph...
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, 'ar...
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, 'ar...
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 ...
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=RIG...
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 g...
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.fo...
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.fo...
851b1c8d466c86af5052fb03f636288f91058f32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/851b1c8d466c86af5052fb03f636288f91058f32/Tkinter.py