rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
suite.addTest(unittest.makeSuite(BasicUDPTest)) | if sys.platform != 'mac': suite.addTest(unittest.makeSuite(BasicUDPTest)) | def test_main(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(GeneralModuleTests)) suite.addTest(unittest.makeSuite(BasicTCPTest)) suite.addTest(unittest.makeSuite(BasicUDPTest)) suite.addTest(unittest.makeSuite(NonBlockingTCPTests)) suite.addTest(unittest.makeSuite(FileObjectClassTestCase)) suite.addT... | 522e7694ed5fed34b322c8882753df683f9068b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/522e7694ed5fed34b322c8882753df683f9068b2/test_socket.py |
self.addheaders = [('User-agent', server_version)] | self.addheaders = [('User-Agent', server_version)] | def __init__(self): server_version = "Python-urllib/%s" % __version__ self.addheaders = [('User-agent', server_version)] # manage the individual handlers self.handlers = [] self.handle_open = {} self.handle_error = {} | 96f1129de80c6cddba7a45db86eb09579221704e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96f1129de80c6cddba7a45db86eb09579221704e/urllib2.py |
h.putheader(*args) | if name not in req.headers: h.putheader(*args) | def do_open(self, http_class, req): host = req.get_host() if not host: raise URLError('no host given') | 96f1129de80c6cddba7a45db86eb09579221704e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96f1129de80c6cddba7a45db86eb09579221704e/urllib2.py |
else: MacOS.HandleEvent(event) | return MacOS.HandleEvent(event) | def lowlevelhandler(self, event): what, message, when, where, modifiers = event h, v = where if what == kHighLevelEvent: msg = "High Level Event: %s %s" % \ (`code(message)`, `code(h | (v<<16))`) try: AE.AEProcessAppleEvent(event) except AE.Error, err: print 'AE error: ', err print 'in', msg traceback.print_exc() retur... | 0c3baaf19c7d6a112a00ad36e31fe7a142b91542 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0c3baaf19c7d6a112a00ad36e31fe7a142b91542/MiniAEFrame.py |
posix.chmod(tempname, statbuf[ST_MODE] & 0x7777) | posix.chmod(tempname, statbuf[ST_MODE] & 07777) | def fix(filename): | 7e73fd0024f82c9ecce2e75da3af116ffa760993 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7e73fd0024f82c9ecce2e75da3af116ffa760993/classfix.py |
vereq(hash(d), id(d)) | orig_hash = hash(d) | def subclasspropagation(): if verbose: print "Testing propagation of slot functions to subclasses..." class A(object): pass class B(A): pass class C(A): pass class D(B, C): pass d = D() vereq(hash(d), id(d)) A.__hash__ = lambda self: 42 vereq(hash(d), 42) C.__hash__ = lambda self: 314 vereq(hash(d), 314) B.__hash__ = l... | 171b868195d6f4ffc08a94ff3cf02fde74f6e576 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/171b868195d6f4ffc08a94ff3cf02fde74f6e576/test_descr.py |
vereq(hash(d), id(d)) | vereq(hash(d), orig_hash) | def subclasspropagation(): if verbose: print "Testing propagation of slot functions to subclasses..." class A(object): pass class B(A): pass class C(A): pass class D(B, C): pass d = D() vereq(hash(d), id(d)) A.__hash__ = lambda self: 42 vereq(hash(d), 42) C.__hash__ = lambda self: 314 vereq(hash(d), 314) B.__hash__ = l... | 171b868195d6f4ffc08a94ff3cf02fde74f6e576 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/171b868195d6f4ffc08a94ff3cf02fde74f6e576/test_descr.py |
p = Parser() | p = Parser(strict=1) | def test_bogus_boundary(self): fp = openfile(findfile('msg_15.txt')) try: data = fp.read() finally: fp.close() p = Parser() # Note, under a future non-strict parsing mode, this would parse the # message into the intended message tree. self.assertRaises(Errors.BoundaryError, p.parsestr, data) | 24d45df3f2a4e549fc115a77a250a98861c06750 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/24d45df3f2a4e549fc115a77a250a98861c06750/test_email.py |
return self.fp.tell() - self.start | return self.fp.tell() - len(self.readahead) - self.start | def tell(self): if self.level > 0: return self.lastpos return self.fp.tell() - self.start | 912e56c3acadf2d68a43e126f5c42e6ca7074025 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/912e56c3acadf2d68a43e126f5c42e6ca7074025/multifile.py |
encoding = parts[2] | encoding = parts[2].lower() | def decode(s): """Return a decoded string according to RFC 2047, as a unicode string.""" rtn = [] parts = ecre.split(s, 1) while parts: # If there are less than 4 parts, it can't be encoded and we're done if len(parts) < 5: rtn.extend(parts) break # The first element is any non-encoded leading text rtn.append(parts[0])... | c44d2c52c96e9a88cd368942f0d43d70e6ed64bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c44d2c52c96e9a88cd368942f0d43d70e6ed64bf/Utils.py |
if encoding.lower() == 'q': | if encoding == 'q': | def decode(s): """Return a decoded string according to RFC 2047, as a unicode string.""" rtn = [] parts = ecre.split(s, 1) while parts: # If there are less than 4 parts, it can't be encoded and we're done if len(parts) < 5: rtn.extend(parts) break # The first element is any non-encoded leading text rtn.append(parts[0])... | c44d2c52c96e9a88cd368942f0d43d70e6ed64bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c44d2c52c96e9a88cd368942f0d43d70e6ed64bf/Utils.py |
elif encoding.lower() == 'b': | elif encoding == 'b': | def decode(s): """Return a decoded string according to RFC 2047, as a unicode string.""" rtn = [] parts = ecre.split(s, 1) while parts: # If there are less than 4 parts, it can't be encoded and we're done if len(parts) < 5: rtn.extend(parts) break # The first element is any non-encoded leading text rtn.append(parts[0])... | c44d2c52c96e9a88cd368942f0d43d70e6ed64bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c44d2c52c96e9a88cd368942f0d43d70e6ed64bf/Utils.py |
if encoding.lower() == 'q': | encoding = encoding.lower() if encoding == 'q': | def encode(s, charset='iso-8859-1', encoding='q'): """Encode a string according to RFC 2047.""" if encoding.lower() == 'q': estr = _qencode(s) elif encoding.lower() == 'b': estr = _bencode(s) else: raise ValueError, 'Illegal encoding code: ' + encoding return '=?%s?%s?%s?=' % (charset.lower(), encoding.lower(), estr) ... | c44d2c52c96e9a88cd368942f0d43d70e6ed64bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c44d2c52c96e9a88cd368942f0d43d70e6ed64bf/Utils.py |
elif encoding.lower() == 'b': | elif encoding == 'b': | def encode(s, charset='iso-8859-1', encoding='q'): """Encode a string according to RFC 2047.""" if encoding.lower() == 'q': estr = _qencode(s) elif encoding.lower() == 'b': estr = _bencode(s) else: raise ValueError, 'Illegal encoding code: ' + encoding return '=?%s?%s?%s?=' % (charset.lower(), encoding.lower(), estr) ... | c44d2c52c96e9a88cd368942f0d43d70e6ed64bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c44d2c52c96e9a88cd368942f0d43d70e6ed64bf/Utils.py |
return '=?%s?%s?%s?=' % (charset.lower(), encoding.lower(), estr) | return '=?%s?%s?%s?=' % (charset.lower(), encoding, estr) | def encode(s, charset='iso-8859-1', encoding='q'): """Encode a string according to RFC 2047.""" if encoding.lower() == 'q': estr = _qencode(s) elif encoding.lower() == 'b': estr = _bencode(s) else: raise ValueError, 'Illegal encoding code: ' + encoding return '=?%s?%s?%s?=' % (charset.lower(), encoding.lower(), estr) ... | c44d2c52c96e9a88cd368942f0d43d70e6ed64bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c44d2c52c96e9a88cd368942f0d43d70e6ed64bf/Utils.py |
index = terminator.find (self.ac_in_buffer) | index = ac_in_buffer.find (self.terminator) | def handle_read (self): | a29b6222fe18ce79c8a16746bcdf2401389e4405 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a29b6222fe18ce79c8a16746bcdf2401389e4405/asynchat.py |
def __hash__(self): """x.__hash__() <==> hash(x)""" # Decimal integers must hash the same as the ints # Non-integer decimals are normalized and hashed as strings # Normalization assures that hast(100E-1) == hash(10) if self._is_special: if self._isnan(): raise TypeError('Cannot hash a NaN value.') return hash(str(self)... | 1fb9f528bd69efa135bacda917ec7bb166068d5d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1fb9f528bd69efa135bacda917ec7bb166068d5d/decimal.py | ||
testtype('u', u'\u263a') | if have_unicode: testtype('u', unicode(r'\u263a', 'unicode-escape')) | def main(): testtype('c', 'c') testtype('u', u'\u263a') for type in (['b', 'h', 'i', 'l', 'f', 'd']): testtype(type, 1) testunicode() testsubclassing() unlink(TESTFN) | 8bf46e4e7abdc6e88b1dcd680815b94c9d70184e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8bf46e4e7abdc6e88b1dcd680815b94c9d70184e/test_array.py |
testunicode() | if have_unicode: testunicode() | def main(): testtype('c', 'c') testtype('u', u'\u263a') for type in (['b', 'h', 'i', 'l', 'f', 'd']): testtype(type, 1) testunicode() testsubclassing() unlink(TESTFN) | 8bf46e4e7abdc6e88b1dcd680815b94c9d70184e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8bf46e4e7abdc6e88b1dcd680815b94c9d70184e/test_array.py |
array.array('b', u'foo') | array.array('b', unicode('foo', 'ascii')) | def testunicode(): try: array.array('b', u'foo') except TypeError: pass else: raise TestFailed("creating a non-unicode array from " "a Unicode string should fail") x = array.array('u', u'\xa0\xc2\u1234') x.fromunicode(u' ') x.fromunicode(u'') x.fromunicode(u'') x.fromunicode(u'\x11abc\xff\u1234') s = x.tounicode() if ... | 8bf46e4e7abdc6e88b1dcd680815b94c9d70184e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8bf46e4e7abdc6e88b1dcd680815b94c9d70184e/test_array.py |
x = array.array('u', u'\xa0\xc2\u1234') x.fromunicode(u' ') x.fromunicode(u'') x.fromunicode(u'') x.fromunicode(u'\x11abc\xff\u1234') | x = array.array('u', unicode(r'\xa0\xc2\u1234', 'unicode-escape')) x.fromunicode(unicode(' ', 'ascii')) x.fromunicode(unicode('', 'ascii')) x.fromunicode(unicode('', 'ascii')) x.fromunicode(unicode(r'\x11abc\xff\u1234', 'unicode-escape')) | def testunicode(): try: array.array('b', u'foo') except TypeError: pass else: raise TestFailed("creating a non-unicode array from " "a Unicode string should fail") x = array.array('u', u'\xa0\xc2\u1234') x.fromunicode(u' ') x.fromunicode(u'') x.fromunicode(u'') x.fromunicode(u'\x11abc\xff\u1234') s = x.tounicode() if ... | 8bf46e4e7abdc6e88b1dcd680815b94c9d70184e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8bf46e4e7abdc6e88b1dcd680815b94c9d70184e/test_array.py |
if s != u'\xa0\xc2\u1234 \x11abc\xff\u1234': | if s != unicode(r'\xa0\xc2\u1234 \x11abc\xff\u1234', 'unicode-escape'): | def testunicode(): try: array.array('b', u'foo') except TypeError: pass else: raise TestFailed("creating a non-unicode array from " "a Unicode string should fail") x = array.array('u', u'\xa0\xc2\u1234') x.fromunicode(u' ') x.fromunicode(u'') x.fromunicode(u'') x.fromunicode(u'\x11abc\xff\u1234') s = x.tounicode() if ... | 8bf46e4e7abdc6e88b1dcd680815b94c9d70184e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8bf46e4e7abdc6e88b1dcd680815b94c9d70184e/test_array.py |
s = u'\x00="\'a\\b\x80\xff\u0000\u0001\u1234' | s = unicode(r'\x00="\'a\\b\x80\xff\u0000\u0001\u1234', 'unicode-escape') | def testunicode(): try: array.array('b', u'foo') except TypeError: pass else: raise TestFailed("creating a non-unicode array from " "a Unicode string should fail") x = array.array('u', u'\xa0\xc2\u1234') x.fromunicode(u' ') x.fromunicode(u'') x.fromunicode(u'') x.fromunicode(u'\x11abc\xff\u1234') s = x.tounicode() if ... | 8bf46e4e7abdc6e88b1dcd680815b94c9d70184e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8bf46e4e7abdc6e88b1dcd680815b94c9d70184e/test_array.py |
sys.stderr.write(py_exc.msg) | sys.stderr.write(py_exc.msg + '\n') | def compile(file, cfile=None, dfile=None, doraise=False): """Byte-compile one Python source file to Python bytecode. Arguments: file: source filename cfile: target filename; defaults to source with 'c' or 'o' appended ('c' normally, 'o' in optimizing mode, giving .pyc or .pyo) dfile: purported filename; defaul... | e537d6e93e0b5c37a96090df9ec831bd1bf8e2fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e537d6e93e0b5c37a96090df9ec831bd1bf8e2fb/py_compile.py |
>>> def f(): | >>> def f(): | >>> def f(): | 77dcccca0c29fc6017b6ebef3913abd762ba0c40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77dcccca0c29fc6017b6ebef3913abd762ba0c40/test_generators.py |
... SyntaxError: 'return' with argument inside generator (<string>, line 2) >>> def f(): | .. SyntaxError: 'return' with argument inside generator (..., line 2) >>> def f(): | >>> def f(): | 77dcccca0c29fc6017b6ebef3913abd762ba0c40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77dcccca0c29fc6017b6ebef3913abd762ba0c40/test_generators.py |
... SyntaxError: 'return' with argument inside generator (<string>, line 3) | .. SyntaxError: 'return' with argument inside generator (..., line 3) | >>> def f(): | 77dcccca0c29fc6017b6ebef3913abd762ba0c40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77dcccca0c29fc6017b6ebef3913abd762ba0c40/test_generators.py |
>>> def f(): | >>> def f(): | >>> def f(): | 77dcccca0c29fc6017b6ebef3913abd762ba0c40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77dcccca0c29fc6017b6ebef3913abd762ba0c40/test_generators.py |
... SyntaxError: 'return' with argument inside generator (<string>, line 3) | .. SyntaxError: 'return' with argument inside generator (..., line 3) | >>> def f(): | 77dcccca0c29fc6017b6ebef3913abd762ba0c40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77dcccca0c29fc6017b6ebef3913abd762ba0c40/test_generators.py |
>>> def f(): | >>> def f(): | >>> def f(): | 77dcccca0c29fc6017b6ebef3913abd762ba0c40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77dcccca0c29fc6017b6ebef3913abd762ba0c40/test_generators.py |
... SyntaxError: 'yield' not allowed in a 'try' block with a 'finally' clause (<string>, line 3) >>> def f(): | .. SyntaxError: 'yield' not allowed in a 'try' block with a 'finally' clause (..., line 3) >>> def f(): | >>> def f(): | 77dcccca0c29fc6017b6ebef3913abd762ba0c40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77dcccca0c29fc6017b6ebef3913abd762ba0c40/test_generators.py |
SyntaxError: 'yield' not allowed in a 'try' block with a 'finally' clause (<string>, line 6) | SyntaxError: 'yield' not allowed in a 'try' block with a 'finally' clause (..., line 6) | >>> def f(): | 77dcccca0c29fc6017b6ebef3913abd762ba0c40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77dcccca0c29fc6017b6ebef3913abd762ba0c40/test_generators.py |
>>> def f(): | >>> def f(): | >>> def f(): | 77dcccca0c29fc6017b6ebef3913abd762ba0c40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77dcccca0c29fc6017b6ebef3913abd762ba0c40/test_generators.py |
SyntaxError: 'return' with argument inside generator (<string>, line 8) | SyntaxError: 'return' with argument inside generator (..., line 8) | ... def f(i): | 77dcccca0c29fc6017b6ebef3913abd762ba0c40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77dcccca0c29fc6017b6ebef3913abd762ba0c40/test_generators.py |
e.delta = getint(D) | try: e.delta = getint(D) except ValueError: e.delta = 0 | 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... | a249f16af03ab2091b59e12faaefe642f95a85ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a249f16af03ab2091b59e12faaefe642f95a85ea/Tkinter.py |
a[8] and b[17] match for 6 elements a[14] and b[23] match for 15 elements | a[8] and b[17] match for 21 elements | def _calculate_ratio(matches, length): if length: return 2.0 * matches / length return 1.0 | 43898b4f642acf182242744181143141228ca56e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/43898b4f642acf182242744181143141228ca56e/difflib.py |
equal a[8:14] b[17:23] equal a[14:29] b[23:38] | equal a[8:29] b[17:38] | def _calculate_ratio(matches, length): if length: return 2.0 * matches / length return 1.0 | 43898b4f642acf182242744181143141228ca56e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/43898b4f642acf182242744181143141228ca56e/difflib.py |
i and in j. | i and in j. New in Python 2.5, it's also guaranteed that if (i, j, n) and (i', j', n') are adjacent triples in the list, and the second is not the last triple in the list, then i+n != i' or j+n != j'. IOW, adjacent triples never describe adjacent equal blocks. | def get_matching_blocks(self): """Return list of triples describing matching subsequences. | 43898b4f642acf182242744181143141228ca56e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/43898b4f642acf182242744181143141228ca56e/difflib.py |
self.matching_blocks = matching_blocks = [] | def get_matching_blocks(self): """Return list of triples describing matching subsequences. | 43898b4f642acf182242744181143141228ca56e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/43898b4f642acf182242744181143141228ca56e/difflib.py | |
matching_blocks.append( (la, lb, 0) ) return matching_blocks | i1 = j1 = k1 = 0 non_adjacent = [] for i2, j2, k2 in matching_blocks: if i1 + k1 == i2 and j1 + k1 == j2: k1 += k2 else: if k1: non_adjacent.append((i1, j1, k1)) i1, j1, k1 = i2, j2, k2 if k1: non_adjacent.append((i1, j1, k1)) non_adjacent.append( (la, lb, 0) ) self.matching_blocks = non_adjacent return sel... | def get_matching_blocks(self): """Return list of triples describing matching subsequences. | 43898b4f642acf182242744181143141228ca56e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/43898b4f642acf182242744181143141228ca56e/difflib.py |
if type(to_addrs) == types.StringType: | if isinstance(to_addrs, types.StringTypes): | def sendmail(self, from_addr, to_addrs, msg, mail_options=[], rcpt_options=[]): """This command performs an entire mail transaction. | 3356766abfbdec49e671e0e16778139fd9b0c490 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3356766abfbdec49e671e0e16778139fd9b0c490/smtplib.py |
print >> DEBUGSTREAM, 'we got some refusals' | print >> DEBUGSTREAM, 'we got some refusals:', refused | def process_message(self, peer, mailfrom, rcpttos, data): lines = data.split('\n') # Look for the last header i = 0 for line in lines: if not line: break i += 1 lines.insert(i, 'X-Peer: %s' % peer[0]) data = NEWLINE.join(lines) refused = self._deliver(mailfrom, rcpttos, data) # TBD: what to do with refused addresses? p... | f151625b59bcd07e35910281444aa4a5974613c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f151625b59bcd07e35910281444aa4a5974613c7/smtpd.py |
print >> DEBUGSTREAM, 'we got refusals' | print >> DEBUGSTREAM, 'we got refusals:', refused | def process_message(self, peer, mailfrom, rcpttos, data): from cStringIO import StringIO from Mailman import Utils from Mailman import Message from Mailman import MailList # If the message is to a Mailman mailing list, then we'll invoke the # Mailman script directly, without going through the real smtpd. # Otherwise we... | f151625b59bcd07e35910281444aa4a5974613c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f151625b59bcd07e35910281444aa4a5974613c7/smtpd.py |
global DEBUG | def poll (timeout=0.0, map=None): global DEBUG if map is None: map = socket_map if map: r = []; w = []; e = [] for fd, obj in map.items(): if obj.readable(): r.append (fd) if obj.writable(): w.append (fd) r,w,e = select.select (r,w,e, timeout) if DEBUG: print r,w,e for fd in r: try: obj = map[fd] except KeyError: con... | fbd5797eb7aa2f2e291a11081f5c5160614fdd45 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fbd5797eb7aa2f2e291a11081f5c5160614fdd45/asyncore.py | |
r,w,e = select.select (r,w,e, timeout) | try: r,w,e = select.select (r,w,e, timeout) except select.error, err: if err[0] != EINTR: raise | def poll (timeout=0.0, map=None): global DEBUG if map is None: map = socket_map if map: r = []; w = []; e = [] for fd, obj in map.items(): if obj.readable(): r.append (fd) if obj.writable(): w.append (fd) r,w,e = select.select (r,w,e, timeout) if DEBUG: print r,w,e for fd in r: try: obj = map[fd] except KeyError: con... | fbd5797eb7aa2f2e291a11081f5c5160614fdd45 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fbd5797eb7aa2f2e291a11081f5c5160614fdd45/asyncore.py |
r = pollster.poll (timeout) | try: r = pollster.poll (timeout) except select.error, err: if err[0] != EINTR: raise r = [] | def poll3 (timeout=0.0, map=None): # Use the poll() support added to the select module in Python 2.0 if map is None: map=socket_map if timeout is not None: # timeout is in milliseconds timeout = int(timeout*1000) pollster = select.poll() if map: for fd, obj in map.items(): flags = 0 if obj.readable(): flags = select.PO... | fbd5797eb7aa2f2e291a11081f5c5160614fdd45 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fbd5797eb7aa2f2e291a11081f5c5160614fdd45/asyncore.py |
self.__dict__['socket'] = sock | self.socket = sock | def set_socket (self, sock, map=None): self.__dict__['socket'] = sock self._fileno = sock.fileno() self.add_channel (map) | fbd5797eb7aa2f2e291a11081f5c5160614fdd45 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fbd5797eb7aa2f2e291a11081f5c5160614fdd45/asyncore.py |
def test_strftime_bounds_checking(self): # Make sure that strftime() checks the bounds of the various parts #of the time tuple. | caebe22038d4de526ab34cfda98047f01c53fc9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/caebe22038d4de526ab34cfda98047f01c53fc9d/test_time.py | ||
self.assertRaises(ValueError, time.strftime, '', (1900, 0, 1, 0, 0, 0, 0, 1, -1)) | self.assertRaises(ValueError, time.strftime, '', (1900, -1, 1, 0, 0, 0, 0, 1, -1)) | def test_strftime_bounds_checking(self): # Make sure that strftime() checks the bounds of the various parts #of the time tuple. | caebe22038d4de526ab34cfda98047f01c53fc9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/caebe22038d4de526ab34cfda98047f01c53fc9d/test_time.py |
self.assertRaises(ValueError, time.strftime, '', (1900, 1, 0, 0, 0, 0, 0, 1, -1)) | self.assertRaises(ValueError, time.strftime, '', (1900, 1, -1, 0, 0, 0, 0, 1, -1)) | def test_strftime_bounds_checking(self): # Make sure that strftime() checks the bounds of the various parts #of the time tuple. | caebe22038d4de526ab34cfda98047f01c53fc9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/caebe22038d4de526ab34cfda98047f01c53fc9d/test_time.py |
def test_strftime_bounds_checking(self): # Make sure that strftime() checks the bounds of the various parts #of the time tuple. | caebe22038d4de526ab34cfda98047f01c53fc9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/caebe22038d4de526ab34cfda98047f01c53fc9d/test_time.py | ||
def test_strftime_bounds_checking(self): # Make sure that strftime() checks the bounds of the various parts #of the time tuple. | caebe22038d4de526ab34cfda98047f01c53fc9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/caebe22038d4de526ab34cfda98047f01c53fc9d/test_time.py | ||
def test_strftime_bounds_checking(self): # Make sure that strftime() checks the bounds of the various parts #of the time tuple. | caebe22038d4de526ab34cfda98047f01c53fc9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/caebe22038d4de526ab34cfda98047f01c53fc9d/test_time.py | ||
self.assertRaises(ValueError, time.strftime, '', (1900, 1, 1, 0, 0, 0, 0, 0, -1)) | self.assertRaises(ValueError, time.strftime, '', (1900, 1, 1, 0, 0, 0, 0, -1, -1)) | def test_strftime_bounds_checking(self): # Make sure that strftime() checks the bounds of the various parts #of the time tuple. | caebe22038d4de526ab34cfda98047f01c53fc9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/caebe22038d4de526ab34cfda98047f01c53fc9d/test_time.py |
def test_strftime_bounds_checking(self): # Make sure that strftime() checks the bounds of the various parts #of the time tuple. | caebe22038d4de526ab34cfda98047f01c53fc9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/caebe22038d4de526ab34cfda98047f01c53fc9d/test_time.py | ||
p = subprocess.Popen(cmdline, close_fds=True) | if sys.platform[:3] == 'win': p = subprocess.Popen(cmdline) else: p = subprocess.Popen(cmdline, close_fds=True) | def open(self, url, new=0, autoraise=1): cmdline = [self.name] + [arg.replace("%s", url) for arg in self.args] try: p = subprocess.Popen(cmdline, close_fds=True) return not p.wait() except OSError: return False | 2c94bf7d410b151d6e7e38275c9dda871a5e8882 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2c94bf7d410b151d6e7e38275c9dda871a5e8882/webbrowser.py |
setsid = getattr(os, 'setsid', None) if not setsid: setsid = getattr(os, 'setpgrp', None) | def open(self, url, new=0, autoraise=1): cmdline = [self.name] + [arg.replace("%s", url) for arg in self.args] setsid = getattr(os, 'setsid', None) if not setsid: setsid = getattr(os, 'setpgrp', None) try: p = subprocess.Popen(cmdline, close_fds=True, preexec_fn=setsid) return (p.poll() is None) except OSError: return ... | 2c94bf7d410b151d6e7e38275c9dda871a5e8882 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2c94bf7d410b151d6e7e38275c9dda871a5e8882/webbrowser.py | |
p = subprocess.Popen(cmdline, close_fds=True, preexec_fn=setsid) | if sys.platform[:3] == 'win': p = subprocess.Popen(cmdline) else: setsid = getattr(os, 'setsid', None) if not setsid: setsid = getattr(os, 'setpgrp', None) p = subprocess.Popen(cmdline, close_fds=True, preexec_fn=setsid) | def open(self, url, new=0, autoraise=1): cmdline = [self.name] + [arg.replace("%s", url) for arg in self.args] setsid = getattr(os, 'setsid', None) if not setsid: setsid = getattr(os, 'setpgrp', None) try: p = subprocess.Popen(cmdline, close_fds=True, preexec_fn=setsid) return (p.poll() is None) except OSError: return ... | 2c94bf7d410b151d6e7e38275c9dda871a5e8882 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2c94bf7d410b151d6e7e38275c9dda871a5e8882/webbrowser.py |
module = filename | module = filename or "<unknown>" | def warn_explicit(message, category, filename, lineno, module=None, registry=None): if module is None: module = filename if module[-3:].lower() == ".py": module = module[:-3] # XXX What about leading pathname? if registry is None: registry = {} if isinstance(message, Warning): text = str(message) category = message.__c... | 4edd989eaf5bae40f9e11424b36b22892c5ba459 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4edd989eaf5bae40f9e11424b36b22892c5ba459/warnings.py |
else: _tryorder = filter(lambda x: _browsers.has_key(x.lower()) or x.find("%s") > -1, _tryorder) | for cmd in _tryorder: if not _browsers.has_key(cmd.lower()): if _iscommand(cmd.lower()): register(cmd.lower(), None, GenericBrowser("%s %%s" % cmd.lower())) _tryorder = filter(lambda x: _browsers.has_key(x.lower()) or x.find("%s") > -1, _tryorder) | def open_new(self, url): # Deprecated. May be removed in 2.1. self.open(url) | cdab3bf7eb0810fcda21be065868f3da330779a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cdab3bf7eb0810fcda21be065868f3da330779a1/webbrowser.py |
def _init_posix(): import os import re import string import sys | def _init_posix(): import os import re import string import sys g = globals() version = sys.version[:3] config_dir = os.path.join( sys.exec_prefix, "lib", "python" + version, "config") # load the installed config.h: define_rx = re.compile("#define ([A-Z][A-Z0-9_]+) (.*)\n") undef_rx = re.compile("/[*] #undef ([A-Z][... | 9ddaaa1a30a8a0681b60922e877f3b7d23e6bdf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9ddaaa1a30a8a0681b60922e877f3b7d23e6bdf6/sysconfig.py | |
g = globals() | def get_config_h_filename(): return os.path.join(sys.exec_prefix, "lib", "python" + sys.version[:3], "config", "config.h") | def _init_posix(): import os import re import string import sys g = globals() version = sys.version[:3] config_dir = os.path.join( sys.exec_prefix, "lib", "python" + version, "config") # load the installed config.h: define_rx = re.compile("#define ([A-Z][A-Z0-9_]+) (.*)\n") undef_rx = re.compile("/[*] #undef ([A-Z][... | 9ddaaa1a30a8a0681b60922e877f3b7d23e6bdf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9ddaaa1a30a8a0681b60922e877f3b7d23e6bdf6/sysconfig.py |
version = sys.version[:3] config_dir = os.path.join( sys.exec_prefix, "lib", "python" + version, "config") | def get_makefile_filename(): return os.path.join(sys.exec_prefix, "lib", "python" + sys.version[:3], "config", "Makefile") | def _init_posix(): import os import re import string import sys g = globals() version = sys.version[:3] config_dir = os.path.join( sys.exec_prefix, "lib", "python" + version, "config") # load the installed config.h: define_rx = re.compile("#define ([A-Z][A-Z0-9_]+) (.*)\n") undef_rx = re.compile("/[*] #undef ([A-Z][... | 9ddaaa1a30a8a0681b60922e877f3b7d23e6bdf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9ddaaa1a30a8a0681b60922e877f3b7d23e6bdf6/sysconfig.py |
def parse_config_h(fp, g=None): if g is None: g = {} | def _init_posix(): import os import re import string import sys g = globals() version = sys.version[:3] config_dir = os.path.join( sys.exec_prefix, "lib", "python" + version, "config") # load the installed config.h: define_rx = re.compile("#define ([A-Z][A-Z0-9_]+) (.*)\n") undef_rx = re.compile("/[*] #undef ([A-Z][... | 9ddaaa1a30a8a0681b60922e877f3b7d23e6bdf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9ddaaa1a30a8a0681b60922e877f3b7d23e6bdf6/sysconfig.py | |
fp = open(os.path.join(config_dir, "config.h")) | undef_rx = re.compile("/[*] #undef ([A-Z][A-Z0-9_]+) [*]/\n") | 9ddaaa1a30a8a0681b60922e877f3b7d23e6bdf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9ddaaa1a30a8a0681b60922e877f3b7d23e6bdf6/sysconfig.py | |
def parse_makefile(fp, g=None): if g is None: g = {} | undef_rx = re.compile("/[*] #undef ([A-Z][A-Z0-9_]+) [*]/\n") | 9ddaaa1a30a8a0681b60922e877f3b7d23e6bdf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9ddaaa1a30a8a0681b60922e877f3b7d23e6bdf6/sysconfig.py | |
fp = open(os.path.join(config_dir, "Makefile")) | undef_rx = re.compile("/[*] #undef ([A-Z][A-Z0-9_]+) [*]/\n") | 9ddaaa1a30a8a0681b60922e877f3b7d23e6bdf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9ddaaa1a30a8a0681b60922e877f3b7d23e6bdf6/sysconfig.py | |
import os exec "_init_%s()" % os.name del os | def _init_posix(): g = globals() parse_config_h(open(get_config_h_filename()), g) parse_makefile(open(get_makefile_filename()), g) try: exec "_init_" + os.name except NameError: pass else: exec "_init_%s()" % os.name | undef_rx = re.compile("/[*] #undef ([A-Z][A-Z0-9_]+) [*]/\n") | 9ddaaa1a30a8a0681b60922e877f3b7d23e6bdf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9ddaaa1a30a8a0681b60922e877f3b7d23e6bdf6/sysconfig.py |
posix = True | posix = False | def isdev(self): return self.type in (CHRTYPE, BLKTYPE, FIFOTYPE) | 75b9da4aaf6b1636a116f4afd5b0d11a642c4401 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/75b9da4aaf6b1636a116f4afd5b0d11a642c4401/tarfile.py |
tarinfo.size = statres.st_size | tarinfo.size = not stat.S_ISDIR(stmd) and statres.st_size or 0 | def gettarinfo(self, name=None, arcname=None, fileobj=None): """Create a TarInfo object for either the file `name' or the file object `fileobj' (using os.fstat on its file descriptor). You can modify some of the TarInfo's attributes before you add it using addfile(). If given, `arcname' specifies an alternative name fo... | 75b9da4aaf6b1636a116f4afd5b0d11a642c4401 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/75b9da4aaf6b1636a116f4afd5b0d11a642c4401/tarfile.py |
r = typ.__repr__ | r = getattr(typ, "__repr__", None) | def _format(self, object, stream, indent, allowance, context, level): level = level + 1 objid = _id(object) if objid in context: stream.write(_recursion(object)) self._recursive = True self._readable = False return rep = self._repr(object, context, level - 1) typ = _type(object) sepLines = _len(rep) > (self._width - 1 ... | 1b626cac734c7995849ce4b5d694edbd89e44c4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1b626cac734c7995849ce4b5d694edbd89e44c4a/pprint.py |
r = typ.__repr__ | r = getattr(typ, "__repr__", None) | def _safe_repr(object, context, maxlevels, level): typ = _type(object) if typ is str: if 'locale' not in _sys.modules: return repr(object), True, False if "'" in object and '"' not in object: closure = '"' quotes = {'"': '\\"'} else: closure = "'" quotes = {"'": "\\'"} qget = quotes.get sio = _StringIO() write = sio.wr... | 1b626cac734c7995849ce4b5d694edbd89e44c4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1b626cac734c7995849ce4b5d694edbd89e44c4a/pprint.py |
n = ((n+3)/4)*4 | n = ((n+3)//4)*4 | def pack_fstring(self, n, s): if n < 0: raise ValueError, 'fstring size must be nonnegative' data = s[:n] n = ((n+3)/4)*4 data = data + (n - len(data)) * '\0' self.__buf.write(data) | 4f564bd68a5bf3e22c81c0c74f0e781fa0d3f70a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4f564bd68a5bf3e22c81c0c74f0e781fa0d3f70a/xdrlib.py |
j = i + (n+3)/4*4 | j = i + (n+3)//4*4 | def unpack_fstring(self, n): if n < 0: raise ValueError, 'fstring size must be nonnegative' i = self.__pos j = i + (n+3)/4*4 if j > len(self.__buf): raise EOFError self.__pos = j return self.__buf[i:i+n] | 4f564bd68a5bf3e22c81c0c74f0e781fa0d3f70a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4f564bd68a5bf3e22c81c0c74f0e781fa0d3f70a/xdrlib.py |
if size < 0: size = sys.maxint | if size < 0: size = sys.maxint readsize = self.min_readsize else: readsize = size | def readline(self, size=-1): if size < 0: size = sys.maxint bufs = [] readsize = min(100, size) # Read from the file in small chunks while True: if size == 0: return "".join(bufs) # Return resulting line | d82c3105cced4ef0b8d99f1703dda4c4bf4cc0b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d82c3105cced4ef0b8d99f1703dda4c4bf4cc0b5/gzip.py |
readsize = min(100, size) while True: if size == 0: return "".join(bufs) | while size != 0: | def readline(self, size=-1): if size < 0: size = sys.maxint bufs = [] readsize = min(100, size) # Read from the file in small chunks while True: if size == 0: return "".join(bufs) # Return resulting line | d82c3105cced4ef0b8d99f1703dda4c4bf4cc0b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d82c3105cced4ef0b8d99f1703dda4c4bf4cc0b5/gzip.py |
if size is not None: if i==-1 and len(c) > size: i=size-1 elif size <= i: i = size -1 | if (size <= i) or (i == -1 and len(c) > size): i = size - 1 | def readline(self, size=-1): if size < 0: size = sys.maxint bufs = [] readsize = min(100, size) # Read from the file in small chunks while True: if size == 0: return "".join(bufs) # Return resulting line | d82c3105cced4ef0b8d99f1703dda4c4bf4cc0b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d82c3105cced4ef0b8d99f1703dda4c4bf4cc0b5/gzip.py |
bufs.append(c[:i+1]) self._unread(c[i+1:]) return ''.join(bufs) | bufs.append(c[:i + 1]) self._unread(c[i + 1:]) break | def readline(self, size=-1): if size < 0: size = sys.maxint bufs = [] readsize = min(100, size) # Read from the file in small chunks while True: if size == 0: return "".join(bufs) # Return resulting line | d82c3105cced4ef0b8d99f1703dda4c4bf4cc0b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d82c3105cced4ef0b8d99f1703dda4c4bf4cc0b5/gzip.py |
except AttrinuteError: | except AttributeError: | def do_mouseDown(self, event): (what, message, when, where, modifiers) = event partcode, window = FindWindow(where) if partname.has_key(partcode): name = "do_" + partname[partcode] else: name = "do_%d" % partcode try: handler = getattr(self, name) except AttrinuteError: handler = self.do_unknownpartcode handler(partcod... | 7a58336511b8c405e01bcda0b886b19c2947189a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7a58336511b8c405e01bcda0b886b19c2947189a/FrameWork.py |
print "Should close window:", window | if DEBUG: print "Should close window:", window | def do_close(self, window): print "Should close window:", window | 7a58336511b8c405e01bcda0b886b19c2947189a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7a58336511b8c405e01bcda0b886b19c2947189a/FrameWork.py |
print "SystemClick", event, window | MacOS.HandleEvent(event) | def do_inSysWindow(self, partcode, window, event): print "SystemClick", event, window # SystemClick(event, window) # XXX useless, window is None | 7a58336511b8c405e01bcda0b886b19c2947189a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7a58336511b8c405e01bcda0b886b19c2947189a/FrameWork.py |
print "inDesk" | def do_inDesk(self, partcode, window, event): print "inDesk" # XXX what to do with it? | 7a58336511b8c405e01bcda0b886b19c2947189a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7a58336511b8c405e01bcda0b886b19c2947189a/FrameWork.py | |
print "FindControl(%s, %s) -> (%s, %s)" % \ | if DEBUG: print "FindControl(%s, %s) -> (%s, %s)" % \ | def do_inContent(self, partcode, window, event): (what, message, when, where, modifiers) = event local = GlobalToLocal(where) ctltype, control = FindControl(local, window) if ctltype and control: pcode = control.TrackControl(local) if pcode: self.do_controlhit(window, control, pcode, event) else: print "FindControl(%s,... | 7a58336511b8c405e01bcda0b886b19c2947189a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7a58336511b8c405e01bcda0b886b19c2947189a/FrameWork.py |
print "control hit in", window, "on", control, "; pcode =", pcode | if DEBUG: print "control hit in", window, "on", control, "; pcode =", pcode | def do_controlhit(self, window, control, pcode, event): print "control hit in", window, "on", control, "; pcode =", pcode | 7a58336511b8c405e01bcda0b886b19c2947189a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7a58336511b8c405e01bcda0b886b19c2947189a/FrameWork.py |
print "Mouse down at global:", where print "\tUnknown part code:", partcode | if DEBUG: print "Mouse down at global:", where if DEBUG: print "\tUnknown part code:", partcode MacOS.HandleEvent(event) | def do_unknownpartcode(self, partcode, window, event): (what, message, when, where, modifiers) = event print "Mouse down at global:", where print "\tUnknown part code:", partcode | 7a58336511b8c405e01bcda0b886b19c2947189a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7a58336511b8c405e01bcda0b886b19c2947189a/FrameWork.py |
print 'Command-W without front window' | if DEBUG: print 'Command-W without front window' | def do_key(self, event): (what, message, when, where, modifiers) = event c = chr(message & charCodeMask) if modifiers & cmdKey: if c == '.': raise self else: result = MenuKey(ord(c)) id = (result>>16) & 0xffff # Hi word item = result & 0xffff # Lo word if id: self.do_rawmenu(id, item, None, event) elif c == 'w': w = F... | 7a58336511b8c405e01bcda0b886b19c2947189a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7a58336511b8c405e01bcda0b886b19c2947189a/FrameWork.py |
print "Command-" +`c` | if DEBUG: print "Command-" +`c` | def do_key(self, event): (what, message, when, where, modifiers) = event c = chr(message & charCodeMask) if modifiers & cmdKey: if c == '.': raise self else: result = MenuKey(ord(c)) id = (result>>16) & 0xffff # Hi word item = result & 0xffff # Lo word if id: self.do_rawmenu(id, item, None, event) elif c == 'w': w = F... | 7a58336511b8c405e01bcda0b886b19c2947189a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7a58336511b8c405e01bcda0b886b19c2947189a/FrameWork.py |
print "Character", `c` | if DEBUG: print "Character", `c` | def do_char(self, c, event): print "Character", `c` | 7a58336511b8c405e01bcda0b886b19c2947189a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7a58336511b8c405e01bcda0b886b19c2947189a/FrameWork.py |
print "do_update", self.printevent(event) | if DEBUG: print "do_update", self.printevent(event) | def do_updateEvt(self, event): print "do_update", self.printevent(event) window = FrontWindow() # XXX This is wrong! if window: self.do_rawupdate(window, event) else: print "no window for do_updateEvt" | 7a58336511b8c405e01bcda0b886b19c2947189a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7a58336511b8c405e01bcda0b886b19c2947189a/FrameWork.py |
print "no window for do_updateEvt" | MacOS.HandleEvent(event) | def do_updateEvt(self, event): print "do_update", self.printevent(event) window = FrontWindow() # XXX This is wrong! if window: self.do_rawupdate(window, event) else: print "no window for do_updateEvt" | 7a58336511b8c405e01bcda0b886b19c2947189a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7a58336511b8c405e01bcda0b886b19c2947189a/FrameWork.py |
print "raw update for", window | if DEBUG: print "raw update for", window | def do_rawupdate(self, window, event): print "raw update for", window window.BeginUpdate() self.do_update(window, event) DrawControls(window) window.DrawGrowIcon() window.EndUpdate() | 7a58336511b8c405e01bcda0b886b19c2947189a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7a58336511b8c405e01bcda0b886b19c2947189a/FrameWork.py |
print "High Level Event:", self.printevent(event) | if DEBUG: print "High Level Event:", self.printevent(event) | def do_kHighLevelEvent(self, event): (what, message, when, where, modifiers) = event print "High Level Event:", self.printevent(event) try: AEProcessAppleEvent(event) except: print "AEProcessAppleEvent error:" traceback.print_exc() | 7a58336511b8c405e01bcda0b886b19c2947189a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7a58336511b8c405e01bcda0b886b19c2947189a/FrameWork.py |
print "MenuBar.dispatch(%d, %d, %s, %s)" % \ | if DEBUG: print "MenuBar.dispatch(%d, %d, %s, %s)" % \ | def dispatch(self, id, item, window, event): if self.menus.has_key(id): self.menus[id].dispatch(id, item, window, event) else: print "MenuBar.dispatch(%d, %d, %s, %s)" % \ (id, item, window, event) | 7a58336511b8c405e01bcda0b886b19c2947189a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7a58336511b8c405e01bcda0b886b19c2947189a/FrameWork.py |
os.environ.update(env) | def run_cgi(self): """Execute a CGI script.""" dir, rest = self.cgi_info i = rest.rfind('?') if i >= 0: rest, query = rest[:i], rest[i+1:] else: query = '' i = rest.find('/') if i >= 0: script, rest = rest[:i], rest[i:] else: script, rest = rest, '' scriptname = dir + '/' + script scriptfile = self.translate_path(scrip... | 0bd783228538b761e9b75cea3f42931c2d4ba6c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0bd783228538b761e9b75cea3f42931c2d4ba6c6/CGIHTTPServer.py | |
os.environ.update(env) | def run_cgi(self): """Execute a CGI script.""" dir, rest = self.cgi_info i = rest.rfind('?') if i >= 0: rest, query = rest[:i], rest[i+1:] else: query = '' i = rest.find('/') if i >= 0: script, rest = rest[:i], rest[i:] else: script, rest = rest, '' scriptname = dir + '/' + script scriptfile = self.translate_path(scrip... | 0bd783228538b761e9b75cea3f42931c2d4ba6c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0bd783228538b761e9b75cea3f42931c2d4ba6c6/CGIHTTPServer.py | |
funcs = (None, lambda x: True) | funcs = (None, bool, lambda x: True) | def test_filter_subclasses(self): # test, that filter() never returns tuple, str or unicode subclasses # and that the result always go's through __getitem__ funcs = (None, lambda x: True) class tuple2(tuple): def __getitem__(self, index): return 2*tuple.__getitem__(self, index) class str2(str): def __getitem__(self, in... | c8cb5d9d6950bb9e3b407c6b4a8dd2831f5edee9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c8cb5d9d6950bb9e3b407c6b4a8dd2831f5edee9/test_builtin.py |
L2 = L | L2 = L[:] | def test_long(self): self.assertEqual(long(314), 314L) self.assertEqual(long(3.14), 3L) self.assertEqual(long(314L), 314L) # Check that conversion from float truncates towards zero self.assertEqual(long(-3.14), -3L) self.assertEqual(long(3.9), 3L) self.assertEqual(long(-3.9), -3L) self.assertEqual(long(3.5), 3L) self.a... | c8cb5d9d6950bb9e3b407c6b4a8dd2831f5edee9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c8cb5d9d6950bb9e3b407c6b4a8dd2831f5edee9/test_builtin.py |
tmp_file.close() | _sync_close(tmp_file) | def add(self, message): """Add message and return assigned key.""" tmp_file = self._create_tmp() try: self._dump_message(message, tmp_file) finally: tmp_file.close() if isinstance(message, MaildirMessage): subdir = message.get_subdir() suffix = self.colon + message.get_info() if suffix == self.colon: suffix = '' else: ... | b5686da24f7cb7b4a7fb66d8263e5479653f5def /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b5686da24f7cb7b4a7fb66d8263e5479653f5def/mailbox.py |
new_file.close() | _sync_close(new_file) | def flush(self): """Write any pending changes to disk.""" if not self._pending: return self._lookup() new_file = _create_temporary(self._path) try: new_toc = {} self._pre_mailbox_hook(new_file) for key in sorted(self._toc.keys()): start, stop = self._toc[key] self._file.seek(start) self._pre_message_hook(new_file) new_... | b5686da24f7cb7b4a7fb66d8263e5479653f5def /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b5686da24f7cb7b4a7fb66d8263e5479653f5def/mailbox.py |
self._file.close() | self._file.close() | def close(self): """Flush and close the mailbox.""" self.flush() if self._locked: self.unlock() self._file.close() | b5686da24f7cb7b4a7fb66d8263e5479653f5def /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b5686da24f7cb7b4a7fb66d8263e5479653f5def/mailbox.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.