rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
codestring = open(pathname, 'r').read()
codestring = open(pathname, 'rU').read()
def _compile(pathname, timestamp): """Compile (and cache) a Python source file. The file specified by <pathname> is compiled to a code object and returned. Presuming the appropriate privileges exist, the bytecodes will be saved back to the filesystem for future imports. The source file's modification timestamp must b...
d012a9946465b57d134f51a65996d1879faec2eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d012a9946465b57d134f51a65996d1879faec2eb/imputil.py
i = i - len(argstr)
i = i - len(argstr) - 2
def send(self, buffer): self.unfinished = self.unfinished + buffer i = 0 n = len(self.unfinished) while i < n: c = self.unfinished[i] i = i+1 if c != ESC: self.add_char(c) continue if i >= n: i = i-1 break c = self.unfinished[i] i = i+1 if c == 'c': self.reset() continue if c <> '[': self.msg('unrecognized: ESC %s', `c...
86f463c947dc0411461cc5d5b22accfb3a33ef7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/86f463c947dc0411461cc5d5b22accfb3a33ef7f/vt100.py
if brightness <= 0.5:
if brightness <= 128:
def __trackarrow(self, chip, rgbtuple): # invert the last chip if self.__lastchip is not None: color = self.__canvas.itemcget(self.__lastchip, 'fill') self.__canvas.itemconfigure(self.__lastchip, outline=color) self.__lastchip = chip
07c13960459b1308e9293d9be1e4f490e3ad7604 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/07c13960459b1308e9293d9be1e4f490e3ad7604/StripViewer.py
_notfound = None
def execvpe(file, args, env): """execv(file, args, env) Execute the executable file (which is searched for along $PATH) with argument list args and environment env , replacing the current process. args may be a list or tuple of strings. """ _execvpe(file, args, env)
899022e9441b26d70ad8fdc1c95c8ea45b8bdd88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/899022e9441b26d70ad8fdc1c95c8ea45b8bdd88/os.py
global _notfound
def _execvpe(file, args, env=None): if env is not None: func = execve argrest = (args, env) else: func = execv argrest = (args,) env = environ global _notfound head, tail = path.split(file) if head: apply(func, (file,) + argrest) return if 'PATH' in env: envpath = env['PATH'] else: envpath = defpath PATH = envpath.spli...
899022e9441b26d70ad8fdc1c95c8ea45b8bdd88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/899022e9441b26d70ad8fdc1c95c8ea45b8bdd88/os.py
if not _notfound: if sys.platform[:4] == 'beos': try: unlink('/_ except error, _notfound: pass else: import tempfile t = tempfile.mktemp() try: execv(t, ('blah',)) except error, _notfound: pass exc, arg = error, _notfound
def _execvpe(file, args, env=None): if env is not None: func = execve argrest = (args, env) else: func = execv argrest = (args,) env = environ global _notfound head, tail = path.split(file) if head: apply(func, (file,) + argrest) return if 'PATH' in env: envpath = env['PATH'] else: envpath = defpath PATH = envpath.spli...
899022e9441b26d70ad8fdc1c95c8ea45b8bdd88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/899022e9441b26d70ad8fdc1c95c8ea45b8bdd88/os.py
if errno != arg[0]: exc, arg = error, (errno, msg) raise exc, arg
if errno != ENOENT and errno != ENOTDIR: raise raise error, (errno, msg)
def _execvpe(file, args, env=None): if env is not None: func = execve argrest = (args, env) else: func = execv argrest = (args,) env = environ global _notfound head, tail = path.split(file) if head: apply(func, (file,) + argrest) return if 'PATH' in env: envpath = env['PATH'] else: envpath = defpath PATH = envpath.spli...
899022e9441b26d70ad8fdc1c95c8ea45b8bdd88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/899022e9441b26d70ad8fdc1c95c8ea45b8bdd88/os.py
info = metadata.long_description or '' + '\n'
info = (metadata.long_description or '') + '\n'
def create_inifile (self): # Create an inifile containing data describing the installation. # This could be done without creating a real file, but # a file is (at least) useful for debugging bdist_wininst.
ad03f8658ad7748ccfd8fe2a9f6958c813c0d392 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ad03f8658ad7748ccfd8fe2a9f6958c813c0d392/bdist_wininst.py
prog = open(filename).read()
prog = open(filename, "rU").read()
def find_executable_linenos(filename): """Return dict where keys are line numbers in the line number table.""" assert filename.endswith('.py') try: prog = open(filename).read() except IOError, err: print >> sys.stderr, ("Not printing coverage data for %r: %s" % (filename, err)) return {} code = compile(prog, filename, ...
2481b7085f824e686679270437101f014aaac6c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2481b7085f824e686679270437101f014aaac6c2/trace.py
import sys
def __init__(self, indent=1, width=80, depth=None, stream=None): """Handle pretty printing operations onto a stream using a set of configured parameters.
a0d993b2886056d71790b67f0f5714fc6bdd62ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a0d993b2886056d71790b67f0f5714fc6bdd62ef/pprint.py
if not (typ in (DictType, ListType, TupleType) and object):
if not (typ in (DictType, ListType, TupleType, StringType) and object):
def _safe_repr(object, context, maxlevels=None, level=0): level += 1 typ = type(object) if not (typ in (DictType, ListType, TupleType) and object): rep = `object` return rep, (rep and (rep[0] != '<')), 0 if context.has_key(id(object)): return `_Recursion(object)`, 0, 1 objid = id(object) context[objid] = 1 readable =...
a0d993b2886056d71790b67f0f5714fc6bdd62ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a0d993b2886056d71790b67f0f5714fc6bdd62ef/pprint.py
def test_varsized_array(self): array = (c_int * 20)(20, 21, 22, 23, 24, 25, 26, 27, 28, 29) varsize_array = (c_int * 1).from_address(addressof(array)) self.failUnlessEqual(varsize_array[0], 20) self.failUnlessEqual(varsize_array[1], 21) self.failUnlessEqual(varsize_array[2], 22) self.failUnlessEqual(varsize_array[3...
def test_varsized_array(self): array = (c_int * 20)(20, 21, 22, 23, 24, 25, 26, 27, 28, 29)
9864fc0962ebe26cf16b68182c46d62a31cd6809 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9864fc0962ebe26cf16b68182c46d62a31cd6809/test_varsize_struct.py
def end_fill(): _getpen.end_fill()
def end_fill(): _getpen().end_fill()
def end_fill(): _getpen.end_fill()
9c38c5f902f5fe07499333e751ca023fa735d187 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9c38c5f902f5fe07499333e751ca023fa735d187/turtle.py
>>> d._fancy_replace(['abcDefghiJkl\n'], 0, 1, ['abcdefGhijkl\n'], 0, 1) >>> print ''.join(d.results),
>>> results = d._fancy_replace(['abcDefghiJkl\n'], 0, 1, ... ['abcdefGhijkl\n'], 0, 1) >>> print ''.join(results),
def _fancy_replace(self, a, alo, ahi, b, blo, bhi): r""" When replacing one block of lines with another, search the blocks for *similar* lines; the best-matching pair (if any) is used as a synch point, and intraline difference marking is done on the similar pair. Lots of work, but often worth it.
062b6fe7b69cae874c7735e26cf6847541085107 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/062b6fe7b69cae874c7735e26cf6847541085107/difflib.py
>>> d._qformat('\tabcDefghiJkl\n', '\t\tabcdefGhijkl\n', ... ' ^ ^ ^ ', '+ ^ ^ ^ ') >>> for line in d.results: print repr(line)
>>> results = d._qformat('\tabcDefghiJkl\n', '\t\tabcdefGhijkl\n', ... ' ^ ^ ^ ', '+ ^ ^ ^ ') >>> for line in results: print repr(line)
def _qformat(self, aline, bline, atags, btags): r""" Format "?" output and deal with leading tabs.
062b6fe7b69cae874c7735e26cf6847541085107 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/062b6fe7b69cae874c7735e26cf6847541085107/difflib.py
try: os.mkdir(homeDir) except os.error: pass
try: os.mkdir(homeDir) except os.error: import glob files = glob.glob(os.path.join(self.homeDir, '*')) for file in files: os.remove(file)
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)
d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114/test_associate.py
try: os.mkdir(homeDir) except os.error: pass
try: os.mkdir(homeDir) except os.error: import glob files = glob.glob(os.path.join(self.homeDir, '*')) for file in files: os.remove(file)
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 | self.envFla...
d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114/test_associate.py
secDB = db.DB(self.env) secDB.set_flags(db.DB_DUP) secDB.set_get_returns_none(2) secDB.open(self.filename, "secondary", db.DB_BTREE,
self.secDB = db.DB(self.env) self.secDB.set_flags(db.DB_DUP) self.secDB.set_get_returns_none(2) self.secDB.open(self.filename, "secondary", db.DB_BTREE,
def test01_associateWithDB(self): if verbose: print '\n', '-=' * 30 print "Running %s.test01_associateWithDB..." % \ self.__class__.__name__
d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114/test_associate.py
self.getDB().associate(secDB, self.getGenre)
self.getDB().associate(self.secDB, self.getGenre)
def test01_associateWithDB(self): if verbose: print '\n', '-=' * 30 print "Running %s.test01_associateWithDB..." % \ self.__class__.__name__
d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114/test_associate.py
self.finish_test(secDB)
self.finish_test(self.secDB)
def test01_associateWithDB(self): if verbose: print '\n', '-=' * 30 print "Running %s.test01_associateWithDB..." % \ self.__class__.__name__
d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114/test_associate.py
secDB = db.DB(self.env) secDB.set_flags(db.DB_DUP) secDB.open(self.filename, "secondary", db.DB_BTREE,
self.secDB = db.DB(self.env) self.secDB.set_flags(db.DB_DUP) self.secDB.open(self.filename, "secondary", db.DB_BTREE,
def test02_associateAfterDB(self): if verbose: print '\n', '-=' * 30 print "Running %s.test02_associateAfterDB..." % \ self.__class__.__name__
d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114/test_associate.py
self.getDB().associate(secDB, self.getGenre, db.DB_CREATE) self.finish_test(secDB)
self.getDB().associate(self.secDB, self.getGenre, db.DB_CREATE) self.finish_test(self.secDB)
def test02_associateAfterDB(self): if verbose: print '\n', '-=' * 30 print "Running %s.test02_associateAfterDB..." % \ self.__class__.__name__
d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114/test_associate.py
c = self.getDB().cursor(txn)
self.cur = self.getDB().cursor(txn)
def finish_test(self, secDB, txn=None): # 'Blues' should not be in the secondary database vals = secDB.pget('Blues', txn=txn) assert vals == None, vals
d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114/test_associate.py
rec = c.first()
rec = self.cur.first()
def finish_test(self, secDB, txn=None): # 'Blues' should not be in the secondary database vals = secDB.pget('Blues', txn=txn) assert vals == None, vals
d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114/test_associate.py
rec = c.next()
rec = self.cur.next()
def finish_test(self, secDB, txn=None): # 'Blues' should not be in the secondary database vals = secDB.pget('Blues', txn=txn) assert vals == None, vals
d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114/test_associate.py
c = secDB.cursor(txn)
self.cur = secDB.cursor(txn)
def finish_test(self, secDB, txn=None): # 'Blues' should not be in the secondary database vals = secDB.pget('Blues', txn=txn) assert vals == None, vals
d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114/test_associate.py
vals = c.pget('Unknown', flags=db.DB_LAST)
vals = self.cur.pget('Unknown', flags=db.DB_LAST)
def finish_test(self, secDB, txn=None): # 'Blues' should not be in the secondary database vals = secDB.pget('Blues', txn=txn) assert vals == None, vals
d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114/test_associate.py
vals = c.pget('Unknown', data='wrong value', flags=db.DB_GET_BOTH)
vals = self.cur.pget('Unknown', data='wrong value', flags=db.DB_GET_BOTH)
def finish_test(self, secDB, txn=None): # 'Blues' should not be in the secondary database vals = secDB.pget('Blues', txn=txn) assert vals == None, vals
d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114/test_associate.py
rec = c.first()
rec = self.cur.first()
def finish_test(self, secDB, txn=None): # 'Blues' should not be in the secondary database vals = secDB.pget('Blues', txn=txn) assert vals == None, vals
d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114/test_associate.py
rec = c.next()
rec = self.cur.next()
def finish_test(self, secDB, txn=None): # 'Blues' should not be in the secondary database vals = secDB.pget('Blues', txn=txn) assert vals == None, vals
d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114/test_associate.py
def test13_associateAutoCommit(self):
def txn_finish_test(self, sDB, txn): try: self.finish_test(sDB, txn=txn) finally: if self.cur: self.cur.close() self.cur = None if txn: txn.commit() def test13_associate_in_transaction(self):
def test13_associateAutoCommit(self): if verbose: print '\n', '-=' * 30 print "Running %s.test13_associateAutoCommit..." % \ self.__class__.__name__
d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114/test_associate.py
secDB = db.DB(self.env) secDB.set_flags(db.DB_DUP) secDB.set_get_returns_none(2) secDB.open(self.filename, "secondary", db.DB_BTREE,
self.secDB = db.DB(self.env) self.secDB.set_flags(db.DB_DUP) self.secDB.set_get_returns_none(2) self.secDB.open(self.filename, "secondary", db.DB_BTREE,
def test13_associateAutoCommit(self): if verbose: print '\n', '-=' * 30 print "Running %s.test13_associateAutoCommit..." % \ self.__class__.__name__
d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114/test_associate.py
self.getDB().associate(secDB, self.getGenre, txn=txn)
self.getDB().associate(self.secDB, self.getGenre, txn=txn)
def test13_associateAutoCommit(self): if verbose: print '\n', '-=' * 30 print "Running %s.test13_associateAutoCommit..." % \ self.__class__.__name__
d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114/test_associate.py
self.finish_test(secDB, txn=txn) finally: txn.commit()
except: txn.abort() raise self.txn_finish_test(self.secDB, txn=txn)
def test13_associateAutoCommit(self): if verbose: print '\n', '-=' * 30 print "Running %s.test13_associateAutoCommit..." % \ self.__class__.__name__
d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d13f8be3c6fcbcf8944bc3d2b0d65df71d53f114/test_associate.py
raise DistutilsOptionsError, \
raise DistutilsOptionError, \
def finalize_options (self): self.set_undefined_options('bdist', ('bdist_base', 'bdist_base')) if self.rpm_base is None: if not self.rpm3_mode: raise DistutilsOptionError, \ "you must specify --rpm-base in RPM 2 mode" self.rpm_base = os.path.join(self.bdist_base, "rpm")
5da2608437b598478570a80310499b3acd931370 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5da2608437b598478570a80310499b3acd931370/bdist_rpm.py
self.failUnlessEqual(3, getargs_b(3.14))
self.assertRaises(TypeError, getargs_b, 3.14)
def test_b(self): from _testcapi import getargs_b # b returns 'unsigned char', and does range checking (0 ... UCHAR_MAX) self.failUnlessEqual(3, getargs_b(3.14)) self.failUnlessEqual(99, getargs_b(Long())) self.failUnlessEqual(99, getargs_b(Int()))
4995fad8b88b0660d17e06de8de078d7faa2ab94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4995fad8b88b0660d17e06de8de078d7faa2ab94/test_getargs2.py
self.failUnlessEqual(3, getargs_B(3.14))
self.assertRaises(TypeError, getargs_B, 3.14)
def test_B(self): from _testcapi import getargs_B # B returns 'unsigned char', no range checking self.failUnlessEqual(3, getargs_B(3.14)) self.failUnlessEqual(99, getargs_B(Long())) self.failUnlessEqual(99, getargs_B(Int()))
4995fad8b88b0660d17e06de8de078d7faa2ab94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4995fad8b88b0660d17e06de8de078d7faa2ab94/test_getargs2.py
self.failUnlessEqual(3, getargs_H(3.14))
self.assertRaises(TypeError, getargs_H, 3.14)
def test_H(self): from _testcapi import getargs_H # H returns 'unsigned short', no range checking self.failUnlessEqual(3, getargs_H(3.14)) self.failUnlessEqual(99, getargs_H(Long())) self.failUnlessEqual(99, getargs_H(Int()))
4995fad8b88b0660d17e06de8de078d7faa2ab94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4995fad8b88b0660d17e06de8de078d7faa2ab94/test_getargs2.py
self.failUnlessEqual(3, getargs_I(3.14))
self.assertRaises(TypeError, getargs_I, 3.14)
def test_I(self): from _testcapi import getargs_I # I returns 'unsigned int', no range checking self.failUnlessEqual(3, getargs_I(3.14)) self.failUnlessEqual(99, getargs_I(Long())) self.failUnlessEqual(99, getargs_I(Int()))
4995fad8b88b0660d17e06de8de078d7faa2ab94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4995fad8b88b0660d17e06de8de078d7faa2ab94/test_getargs2.py
self.failUnlessEqual(3, getargs_i(3.14))
self.assertRaises(TypeError, getargs_i, 3.14)
def test_i(self): from _testcapi import getargs_i # i returns 'int', and does range checking (INT_MIN ... INT_MAX) self.failUnlessEqual(3, getargs_i(3.14)) self.failUnlessEqual(99, getargs_i(Long())) self.failUnlessEqual(99, getargs_i(Int()))
4995fad8b88b0660d17e06de8de078d7faa2ab94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4995fad8b88b0660d17e06de8de078d7faa2ab94/test_getargs2.py
self.failUnlessEqual(3, getargs_l(3.14))
self.assertRaises(TypeError, getargs_l, 3.14)
def test_l(self): from _testcapi import getargs_l # l returns 'long', and does range checking (LONG_MIN ... LONG_MAX) self.failUnlessEqual(3, getargs_l(3.14)) self.failUnlessEqual(99, getargs_l(Long())) self.failUnlessEqual(99, getargs_l(Int()))
4995fad8b88b0660d17e06de8de078d7faa2ab94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4995fad8b88b0660d17e06de8de078d7faa2ab94/test_getargs2.py
self.rfile = self.connection.makefile('rb')
self.rfile = self.connection.makefile('rb', 0)
def setup(self):
cf6ac686ac7654cf48b42058336cc9361684b465 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cf6ac686ac7654cf48b42058336cc9361684b465/SocketServer.py
def rewrite_desc_entries(doc, argname_gi): argnodes = doc.getElementsByTagName(argname_gi) for node in argnodes:
def handle_args(doc): for node in find_all_elements(doc, "args"):
def rewrite_desc_entries(doc, argname_gi): argnodes = doc.getElementsByTagName(argname_gi) for node in argnodes: parent = node.parentNode nodes = [] for n in parent.childNodes: if n.nodeType != xml.dom.core.ELEMENT or n.tagName != argname_gi: nodes.append(n) desc = doc.createElement("description") for n in nodes: paren...
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
if n.nodeType != xml.dom.core.ELEMENT or n.tagName != argname_gi:
if n.nodeType != xml.dom.core.ELEMENT or n.tagName != "args":
def rewrite_desc_entries(doc, argname_gi): argnodes = doc.getElementsByTagName(argname_gi) for node in argnodes: parent = node.parentNode nodes = [] for n in parent.childNodes: if n.nodeType != xml.dom.core.ELEMENT or n.tagName != argname_gi: nodes.append(n) desc = doc.createElement("description") for n in nodes: paren...
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
parent.insertBefore(doc.createText("\n "), node) else: parent.removeChild(node)
signature.appendChild(doc.createTextNode("\n ")) signature.appendChild(node)
def rewrite_desc_entries(doc, argname_gi): argnodes = doc.getElementsByTagName(argname_gi) for node in argnodes: parent = node.parentNode nodes = [] for n in parent.childNodes: if n.nodeType != xml.dom.core.ELEMENT or n.tagName != argname_gi: nodes.append(n) desc = doc.createElement("description") for n in nodes: paren...
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
def handle_args(doc): rewrite_desc_entries(doc, "args") rewrite_desc_entries(doc, "constructor-args")
signature.appendChild(doc.createTextNode("\n ")) def methodline_to_signature(doc, methodline): signature = doc.createElement("signature") signature.appendChild(doc.createTextNode("\n ")) name = doc.createElement("name") name.appendChild(doc.createTextNode(methodline.getAttribute("name"))) signature.appendChild(na...
def rewrite_desc_entries(doc, argname_gi): argnodes = doc.getElementsByTagName(argname_gi) for node in argnodes: parent = node.parentNode nodes = [] for n in parent.childNodes: if n.nodeType != xml.dom.core.ELEMENT or n.tagName != argname_gi: nodes.append(n) desc = doc.createElement("description") for n in nodes: paren...
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
for node in doc.childNodes: if node.nodeType == xml.dom.core.ELEMENT: labels = node.getElementsByTagName("label") for label in labels: id = label.getAttribute("id") if not id: continue parent = label.parentNode if parent.tagName == "title": parent.parentNode.setAttribute("id", id) else: parent.setAttribute("id", id) p...
for label in find_all_elements(doc, "label"): id = label.getAttribute("id") if not id: continue parent = label.parentNode if parent.tagName == "title": parent.parentNode.setAttribute("id", id) else: parent.setAttribute("id", id) parent.removeChild(label)
def handle_labels(doc): for node in doc.childNodes: if node.nodeType == xml.dom.core.ELEMENT: labels = node.getElementsByTagName("label") for label in labels: id = label.getAttribute("id") if not id: continue parent = label.parentNode if parent.tagName == "title": parent.parentNode.setAttribute("id", id) else: parent.s...
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
if children[-1].data[-1:] == ".":
if children[-1].nodeType == xml.dom.core.TEXT \ and children[-1].data[-1:] == ".":
def create_module_info(doc, section): # Heavy. node = extract_first_element(section, "modulesynopsis") if node is None: return node._node.name = "synopsis" lastchild = node.childNodes[-1] if lastchild.nodeType == xml.dom.core.TEXT \ and lastchild.data[-1:] == ".": lastchild.data = lastchild.data[:-1] modauthor = extrac...
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
for node in doc.childNodes: if node.nodeType == xml.dom.core.ELEMENT \ and node.tagName == "section": create_module_info(doc, node)
for node in find_all_elements(doc, "section"): create_module_info(doc, node)
def cleanup_synopses(doc): for node in doc.childNodes: if node.nodeType == xml.dom.core.ELEMENT \ and node.tagName == "section": create_module_info(doc, node)
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
for child in doc.childNodes: if child.nodeType == xml.dom.core.ELEMENT: tables = child.getElementsByTagName("table") for table in tables: fixup_table(doc, table)
for table in find_all_elements(doc, "table"): fixup_table(doc, table)
def fixup_table_structures(doc): # must be done after remap_element_names(), or the tables won't be found for child in doc.childNodes: if child.nodeType == xml.dom.core.ELEMENT: tables = child.getElementsByTagName("table") for table in tables: fixup_table(doc, table)
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
"paragraph", "subparagraph", "description", "opcodedesc", "classdesc", "funcdesc", "methoddesc", "excdesc", "datadesc", "funcdescni", "methoddescni", "excdescni", "datadescni",
"paragraph", "subparagraph", "excdesc", "datadesc", "excdescni", "datadescni", ) RECURSE_INTO_PARA_CONTAINERS = ( "chapter", "section", "subsection", "subsubsection", "paragraph", "subparagraph", "abstract", "memberdesc", "memberdescni", "datadesc", "datadescni",
def move_elements_by_name(doc, source, dest, name, sep=None): nodes = [] for child in source.childNodes: if child.nodeType == xml.dom.core.ELEMENT and child.tagName == name: nodes.append(child) for node in nodes: source.removeChild(node) dest.appendChild(node) if sep: dest.appendChild(doc.createTextNode(sep))
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
"funcdesc", "methoddesc", "excdesc", "datadesc", "funcdescni", "methoddescni", "excdescni", "datadescni",
"funcdesc", "methoddesc", "excdesc", "funcdescni", "methoddescni", "excdescni",
def move_elements_by_name(doc, source, dest, name, sep=None): nodes = [] for child in source.childNodes: if child.nodeType == xml.dom.core.ELEMENT and child.tagName == name: nodes.append(child) for node in nodes: source.removeChild(node) dest.appendChild(node) if sep: dest.appendChild(doc.createTextNode(sep))
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
"sectionauthor",
"sectionauthor", "seealso",
def move_elements_by_name(doc, source, dest, name, sep=None): nodes = [] for child in source.childNodes: if child.nodeType == xml.dom.core.ELEMENT and child.tagName == name: nodes.append(child) for node in nodes: source.removeChild(node) dest.appendChild(node) if sep: dest.appendChild(doc.createTextNode(sep))
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
"stindex", "obindex", "COMMENT", "label",
"stindex", "obindex", "COMMENT", "label", "input", "memberline", "memberlineni", "methodline", "methodlineni",
def move_elements_by_name(doc, source, dest, name, sep=None): nodes = [] for child in source.childNodes: if child.nodeType == xml.dom.core.ELEMENT and child.tagName == name: nodes.append(child) for node in nodes: source.removeChild(node) dest.appendChild(node) if sep: dest.appendChild(doc.createTextNode(sep))
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
and child.tagName in FIXUP_PARA_ELEMENTS:
and child.tagName in RECURSE_INTO_PARA_CONTAINERS:
def fixup_paras(doc): for child in doc.childNodes: if child.nodeType == xml.dom.core.ELEMENT \ and child.tagName in FIXUP_PARA_ELEMENTS: fixup_paras_helper(doc, child) descriptions = child.getElementsByTagName("description") for description in descriptions: if DEBUG_PARA_FIXER: sys.stderr.write("-- Fixing up <descripti...
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
if DEBUG_PARA_FIXER: sys.stderr.write("-- Fixing up <description> element...\n")
def fixup_paras(doc): for child in doc.childNodes: if child.nodeType == xml.dom.core.ELEMENT \ and child.tagName in FIXUP_PARA_ELEMENTS: fixup_paras_helper(doc, child) descriptions = child.getElementsByTagName("description") for description in descriptions: if DEBUG_PARA_FIXER: sys.stderr.write("-- Fixing up <descripti...
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
def fixup_paras_helper(doc, container):
def fixup_paras_helper(doc, container, depth=0):
def fixup_paras_helper(doc, container): # document is already normalized children = container.childNodes start = 0 start_fixed = 0 i = len(children) SKIP_ELEMENTS = PARA_LEVEL_ELEMENTS + PARA_LEVEL_PRECEEDERS if DEBUG_PARA_FIXER: sys.stderr.write("fixup_paras_helper() called on <%s>; %d, %d\n" % (container.tagName, sta...
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
start_fixed = 0 i = len(children) SKIP_ELEMENTS = PARA_LEVEL_ELEMENTS + PARA_LEVEL_PRECEEDERS if DEBUG_PARA_FIXER: sys.stderr.write("fixup_paras_helper() called on <%s>; %d, %d\n" % (container.tagName, start, i)) if i > start: nstart, i = skip_leading_nodes(container.childNodes, start, i) if i > nstart: build_para(do...
while len(children) > start: start = skip_leading_nodes(children, start) if start >= len(children): break if (children[start].nodeType == xml.dom.core.ELEMENT) \ and (children[start].tagName in RECURSE_INTO_PARA_CONTAINERS): fixup_paras_helper(doc, children[start]) start = skip_leading_nodes(children, start + 1) con...
def fixup_paras_helper(doc, container): # document is already normalized children = container.childNodes start = 0 start_fixed = 0 i = len(children) SKIP_ELEMENTS = PARA_LEVEL_ELEMENTS + PARA_LEVEL_PRECEEDERS if DEBUG_PARA_FIXER: sys.stderr.write("fixup_paras_helper() called on <%s>; %d, %d\n" % (container.tagName, sta...
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
def build_para(doc, parent, start, i): children = parent.childNodes # collect all children until \n\n+ is found in a text node or a # PARA_LEVEL_ELEMENT is found. after = start + 1 have_last = 0 BREAK_ELEMENTS = PARA_LEVEL_ELEMENTS + FIXUP_PARA_ELEMENTS for j in range(start, i): after = j + 1 child = children[j] nodeTy...
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
children = parent.childNodes
def build_para(doc, parent, start, i): children = parent.childNodes # collect all children until \n\n+ is found in a text node or a # PARA_LEVEL_ELEMENT is found. after = start + 1 have_last = 0 BREAK_ELEMENTS = PARA_LEVEL_ELEMENTS + FIXUP_PARA_ELEMENTS for j in range(start, i): after = j + 1 child = children[j] nodeTy...
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
node = children[j]
node = parent.childNodes[j]
def build_para(doc, parent, start, i): children = parent.childNodes # collect all children until \n\n+ is found in a text node or a # PARA_LEVEL_ELEMENT is found. after = start + 1 have_last = 0 BREAK_ELEMENTS = PARA_LEVEL_ELEMENTS + FIXUP_PARA_ELEMENTS for j in range(start, i): after = j + 1 child = children[j] nodeTy...
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
def skip_leading_nodes(children, start, i): i = min(i, len(children))
return start + 1 def skip_leading_nodes(children, start): """Return index into children of a node at which paragraph building should begin or a recursive call to fixup_paras_helper() should be made (for subsections, etc.). When the return value >= len(children), we've built all the paras we can from this list of chi...
def build_para(doc, parent, start, i): children = parent.childNodes # collect all children until \n\n+ is found in a text node or a # PARA_LEVEL_ELEMENT is found. after = start + 1 have_last = 0 BREAK_ELEMENTS = PARA_LEVEL_ELEMENTS + FIXUP_PARA_ELEMENTS for j in range(start, i): after = j + 1 child = children[j] nodeTy...
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
try: child = children[start] except IndexError: sys.stderr.write( "skip_leading_nodes() failed at index %d\n" % start) raise
child = children[start]
def skip_leading_nodes(children, start, i): i = min(i, len(children)) while i > start: # skip over leading comments and whitespace: try: child = children[start] except IndexError: sys.stderr.write( "skip_leading_nodes() failed at index %d\n" % start) raise nodeType = child.nodeType if nodeType == xml.dom.core.COMMENT: ...
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
if nodeType == xml.dom.core.COMMENT: start = start + 1 elif nodeType == xml.dom.core.TEXT:
if nodeType == xml.dom.core.TEXT:
def skip_leading_nodes(children, start, i): i = min(i, len(children)) while i > start: # skip over leading comments and whitespace: try: child = children[start] except IndexError: sys.stderr.write( "skip_leading_nodes() failed at index %d\n" % start) raise nodeType = child.nodeType if nodeType == xml.dom.core.COMMENT: ...
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
return start + 1, i + 1 break
return start + 1 return start
def skip_leading_nodes(children, start, i): i = min(i, len(children)) while i > start: # skip over leading comments and whitespace: try: child = children[start] except IndexError: sys.stderr.write( "skip_leading_nodes() failed at index %d\n" % start) raise nodeType = child.nodeType if nodeType == xml.dom.core.COMMENT: ...
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
start = start + 1
def skip_leading_nodes(children, start, i): i = min(i, len(children)) while i > start: # skip over leading comments and whitespace: try: child = children[start] except IndexError: sys.stderr.write( "skip_leading_nodes() failed at index %d\n" % start) raise nodeType = child.nodeType if nodeType == xml.dom.core.COMMENT: ...
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
if child.tagName in PARA_LEVEL_ELEMENTS + PARA_LEVEL_PRECEEDERS: start = start + 1 else: break else: break return start, i
tagName = child.tagName if tagName in RECURSE_INTO_PARA_CONTAINERS: return start if tagName not in PARA_LEVEL_ELEMENTS + PARA_LEVEL_PRECEEDERS: return start start = start + 1 return start
def skip_leading_nodes(children, start, i): i = min(i, len(children)) while i > start: # skip over leading comments and whitespace: try: child = children[start] except IndexError: sys.stderr.write( "skip_leading_nodes() failed at index %d\n" % start) raise nodeType = child.nodeType if nodeType == xml.dom.core.COMMENT: ...
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
rfc_nodes = [] for child in doc.childNodes: if child.nodeType == xml.dom.core.ELEMENT: kids = child.getElementsByTagName("rfc") for k in kids: rfc_nodes.append(k) for rfc_node in rfc_nodes: rfc_node.appendChild(doc.createTextNode( "RFC " + rfc_node.getAttribute("num")))
for rfcnode in find_all_elements(doc, "rfc"): rfcnode.appendChild(doc.createTextNode( "RFC " + rfcnode.getAttribute("num")))
def fixup_rfc_references(doc): rfc_nodes = [] for child in doc.childNodes: if child.nodeType == xml.dom.core.ELEMENT: kids = child.getElementsByTagName("rfc") for k in kids: rfc_nodes.append(k) for rfc_node in rfc_nodes: rfc_node.appendChild(doc.createTextNode( "RFC " + rfc_node.getAttribute("num")))
6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py
"""Pretty-print a Python object to a stream [default is sys.sydout]."""
"""Pretty-print a Python object to a stream [default is sys.stdout]."""
def pprint(object, stream=None, indent=1, width=80, depth=None): """Pretty-print a Python object to a stream [default is sys.sydout].""" printer = PrettyPrinter( stream=stream, indent=indent, width=width, depth=depth) printer.pprint(object)
9c5daab68ec2f184d2dfcdb8e2a1591c877f25eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9c5daab68ec2f184d2dfcdb8e2a1591c877f25eb/pprint.py
instance.menuRecentFiles.delete(1,END)
menu = instance.menuRecentFiles menu.delete(1,END) i = 0 ; ul = 0; ullen = len(ullist)
def UpdateRecentFilesList(self,newFile=None): "Load or update the recent files list, and menu if required" rfList=[] if os.path.exists(self.recentFilesPath): RFfile=open(self.recentFilesPath,'r') try: rfList=RFfile.readlines() finally: RFfile.close() if newFile: newFile=os.path.abspath(newFile)+'\n' if newFile in rfLis...
34beeca8ea67404b2dc4a611958549e1fffc4a8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/34beeca8ea67404b2dc4a611958549e1fffc4a8f/EditorWindow.py
instance.menuRecentFiles.add_command(label=fileName, command=instance.__RecentFileCallback(fileName))
callback = instance.__RecentFileCallback(fileName) if i > ullen: ul=None menu.add_command(label=ullist[i] + " " + fileName, command=callback, underline=ul) i += 1
def UpdateRecentFilesList(self,newFile=None): "Load or update the recent files list, and menu if required" rfList=[] if os.path.exists(self.recentFilesPath): RFfile=open(self.recentFilesPath,'r') try: rfList=RFfile.readlines() finally: RFfile.close() if newFile: newFile=os.path.abspath(newFile)+'\n' if newFile in rfLis...
34beeca8ea67404b2dc4a611958549e1fffc4a8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/34beeca8ea67404b2dc4a611958549e1fffc4a8f/EditorWindow.py
for p in paramre.split(value):
for p in _parseparam(';' + value):
def _get_params_preserve(self, failobj, header): # Like get_params() but preserves the quoting of values. BAW: # should this be part of the public interface? missing = [] value = self.get(header, missing) if value is missing: return failobj params = [] for p in paramre.split(value): try: name, val = p.split('=', 1) na...
f8bfaffffe918f8b5fc9bf8edf0e4727ddc7adb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f8bfaffffe918f8b5fc9bf8edf0e4727ddc7adb6/Message.py
if _iscommand("kfm") or _iscommand("konqueror"): register("kfm", Konqueror, Konqueror())
if _iscommand("kfm"): register("kfm", Konqueror, Konqueror("kfm")) elif _iscommand("konqueror"): register("konqueror", Konqueror, Konqueror("konqueror"))
def register_X_browsers(): # First, the Mozilla/Netscape browsers for browser in ("mozilla-firefox", "firefox", "mozilla-firebird", "firebird", "mozilla", "netscape"): if _iscommand(browser): register(browser, None, Mozilla(browser)) # The default Gnome browser if _iscommand("gconftool-2"): # get the web browser strin...
32eb4af37d95b66f44c723978b8ee430b35950bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/32eb4af37d95b66f44c723978b8ee430b35950bb/webbrowser.py
find_file(['/usr/include', '/usr/local/include'] + self.include_dirs, 'db_185.h') ):
find_file(inc_dirs, 'db_185.h') ):
def detect_modules(self): # XXX this always gets an empty list -- hardwiring to # a fixed list lib_dirs = self.compiler.library_dirs[:] lib_dirs += ['/lib', '/usr/lib', '/usr/local/lib'] exts = []
fa7e368ba0a97191af6ffa96902ef92acab87183 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fa7e368ba0a97191af6ffa96902ef92acab87183/setup.py
exts.append( Extension('pyexpat', ['pyexpat.c'], libraries = ['expat']) )
defs = None if find_file(inc_dirs, 'expat.h'): defs = [('HAVE_EXPAT_H', 1)] elif find_file(inc_dirs, 'xmlparse.h'): defs = [] if defs is not None: exts.append( Extension('pyexpat', ['pyexpat.c'], define_macros = defs, libraries = ['expat']) )
def detect_modules(self): # XXX this always gets an empty list -- hardwiring to # a fixed list lib_dirs = self.compiler.library_dirs[:] lib_dirs += ['/lib', '/usr/lib', '/usr/local/lib'] exts = []
fa7e368ba0a97191af6ffa96902ef92acab87183 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fa7e368ba0a97191af6ffa96902ef92acab87183/setup.py
while p:
while n:
def normalize(p): # Strip unnecessary zero coefficients n = len(p) while p: if p[n-1]: return p[:n] n = n-1 return []
6d909daf42f9d232e48defbf939247a131656e61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6d909daf42f9d232e48defbf939247a131656e61/poly.py
if (type(args) is not TupleType):
if type(args) is not TupleType and args is not None:
def dump_special(self, callable, args, state = None):
8b78a6a3e44c8494becafd3c7466dbc3de8e04df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8b78a6a3e44c8494becafd3c7466dbc3de8e04df/pickle.py
if (type(arg_tup) is not TupleType):
if type(arg_tup) is not TupleType and arg_tup is not None:
def save(self, object, pers_save = 0): memo = self.memo
8b78a6a3e44c8494becafd3c7466dbc3de8e04df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8b78a6a3e44c8494becafd3c7466dbc3de8e04df/pickle.py
if (type(callable) is not ClassType): if (not safe_constructors.has_key(callable)):
if type(callable) is not ClassType: if not safe_constructors.has_key(callable):
def load_reduce(self): stack = self.stack
8b78a6a3e44c8494becafd3c7466dbc3de8e04df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8b78a6a3e44c8494becafd3c7466dbc3de8e04df/pickle.py
value = apply(callable, arg_tup)
if arg_tup is None: value = callable.__basicnew__() else: value = apply(callable, arg_tup)
def load_reduce(self): stack = self.stack
8b78a6a3e44c8494becafd3c7466dbc3de8e04df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8b78a6a3e44c8494becafd3c7466dbc3de8e04df/pickle.py
self.extra_dirs = install.extra_dirs self.path_file = install.path_file
def run (self): if (sys.platform != "win32" and (self.distribution.has_ext_modules() or self.distribution.has_c_libraries())): raise DistutilsPlatformError \ ("distribution contains extensions and/or C libraries; " "must be compiled on a Windows 32 platform")
bde4b3adef4075407ed2396d5d01b9da498c96ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bde4b3adef4075407ed2396d5d01b9da498c96ec/bdist_wininst.py
root_dir = os.path.normpath (install.install_lib)
root_dir = os.path.normpath (install.install_purelib)
def run (self): if (sys.platform != "win32" and (self.distribution.has_ext_modules() or self.distribution.has_c_libraries())): raise DistutilsPlatformError \ ("distribution contains extensions and/or C libraries; " "must be compiled on a Windows 32 platform")
bde4b3adef4075407ed2396d5d01b9da498c96ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bde4b3adef4075407ed2396d5d01b9da498c96ec/bdist_wininst.py
if (self.path_file): lines.append ("path_file=%s" % self.path_file) if (self.extra_dirs): lines.append ("extra_dirs=%s" % self.extra_dirs)
def get_inidata (self): # Return data describing the installation.
bde4b3adef4075407ed2396d5d01b9da498c96ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bde4b3adef4075407ed2396d5d01b9da498c96ec/bdist_wininst.py
AAAA4AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v ZGUuDQ0KJAAAAAAAAADq05KMrrL8366y/N+usvzf1a7w36+y/N8trvLfrLL831GS+N+ssvzfzK3v 36ay/N+usv3fzrL8366y/N+jsvzfUZL236Oy/N9ptPrfr7L831JpY2iusvzfAAAAAAAAAABQRQAA TAEDAPimujkAAAAAAAAAAOAADwELAQYAAEAAAAAQAAAAkAAA4NUAAACgAAAA4AAAAABAAAAQAAAA AgAABAAAAAAA...
AAAA8AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v ZGUuDQ0KJAAAAAAAAADqs5WMrtL7367S+9+u0vvf1c7336/S+98tzvXfrNL731Hy/9+s0vvfzM3o 36bS+9+u0vrf89L7367S+9+j0vvfUfLx36PS+99p1P3fr9L731JpY2iu0vvfAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAUEUAAEwBAwD9e9Q5AAAAAAAAAADgAA8BCwEGAABAAAAAEAAAAJAAAADVAAAA oAAAAOAAAAAA...
def get_exe_bytes (self): import base64 return base64.decodestring (EXEDATA)
bde4b3adef4075407ed2396d5d01b9da498c96ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bde4b3adef4075407ed2396d5d01b9da498c96ec/bdist_wininst.py
bGwgUmlnaHRzIFJlc2VydmVkLiAkCgBVUFghDAkCCgSozNfnkDDP6bYAANQ1AAAAsAAAJgEAjf+/ /f9TVVaLdCQUhfZXdHaLfAi9EHBAAIA+AHRoalxWbP/29v8V/GANi/BZHll0V4AmAFcReP833//Y g/v/dR5qD3yFwHUROUQkHHQLV9na//9VagX/VCQog8QM9sMQdR1otwAAJID/T9itg10cACHGBlxG dZNqAVhfXr/7//9dW8NVi+yD7BCLRRRTVleLQBaLPYg0iUX4M/a79u7+d0PAOXUIdQfHRQgBDFZo gFYRY9/+9lZW...
bGwgUmlnaHRzIFJlc2VydmVkLiAkCgBVUFghDAkCCmbxMY8TFMU40bYAAPM0AAAAsAAAJgEABP+/ /f9TVVaLdCQUhfZXdHaLfAi9EHBAAIA+AHRoalxWbP/29v8V/GANi/BZHll0V4AmAFcRmP833//Y g/v/dR5qD5SFwHUROUQkHHQLV9na//9VagX/VCQog8QM9sMQdR1otwAAJJD/T9itg10cACHGBlxG dZNqAVhfXr/7//9dW8NVi+yD7BCLRRRTVleLQBaLPXg0iUX4M/a79u7+d0PAOXUIdQfHRQgBDFZo gFYRY9/+9lZW...
def get_exe_bytes (self): import base64 return base64.decodestring (EXEDATA)
bde4b3adef4075407ed2396d5d01b9da498c96ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bde4b3adef4075407ed2396d5d01b9da498c96ec/bdist_wininst.py
vb37yAONRfBQ3GaLSAoDQAxRYdj70HuESn38GQNQ4XVvppQ7+HUJC1Sdhy+U7psOVmoEVhBwhIs9 VN/X4CKQhg9oOIk8mu3WNusmrCsCUyp0U8/3W9uuCCV2CDvGdRcnECjChmYwhJURM8B8ti385FvJ OFOLXVKLIVeh2B4W/kYIZj0IAFGeADiayG1uu13sUOjWP+JMEDZXyLbLVrgiEkC7CMwWXgbYtvvP 3SVoqFgq8VCJXdQtFoze+/7CjVrAdHf/dChQaJCfGUtbutvnBBeslXQTGg18kvLPde4E0JH2IR8W PIXAHrqBHGTc...
vb37yAONRfBQ3GaLSAoDQAxRYdj70Ht0Sn38GQNQ4XVvpqQ7+HUJC4idhy+U7psOVmoEVhCghIs9 iN/X4CKQhg9oOIk8mu3WNusmrCsCUyqcU8/3W9uuCCV2CDvGdRcnECjChmYwhJURM8B8ti385FvJ OFOLXVKLIVeh2B4W/kYIZj0IAFGeADiayG1uu13sUOjWPpJMEDZXyLbLVrgiEkC7CMwWXgbYtvvP 3SVoqFgq8VCJXdQtFTze+/7CjVrAdHf/dChQaJCfGUtbutvnBBZclXQTGg18kvLPde4E0JH2IR8U 7IXAHrqBHGTc...
def get_exe_bytes (self): import base64 return base64.decodestring (EXEDATA)
bde4b3adef4075407ed2396d5d01b9da498c96ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bde4b3adef4075407ed2396d5d01b9da498c96ec/bdist_wininst.py
DUYcA1YaA8gDdlSKGh5shMYv7I2F6P6dXfQLgi1f92iw7lDM7hAfO9O72fRQjYQFDRdMGlDMbmFz GyUDAPAeDGG/DdjJSwRdV+hGFIC8BefCx+R3G1x0MP91FFhQ2JtrMLshAIZuFBsC7KmwM79WfAID
DUYcA1YaA8gDdlSKGh5shMYv7I2F6P6dXaQLgi1f92iw7lDMnhAfO9O72fRwjYQFDRdMGlDMbmFz GyUDAPAeDGG/DdjJSwRdV5hGFIC8BefCx+R3G1x0MP91FFhQ2JtrMLshAIZuFBsC7KmwM79WfAID
def get_exe_bytes (self): import base64 return base64.decodestring (EXEDATA)
bde4b3adef4075407ed2396d5d01b9da498c96ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bde4b3adef4075407ed2396d5d01b9da498c96ec/bdist_wininst.py
yf2A+S912Lcz/gPGAFxAde9zQFwMD3QXdiPdDI+cQclEYVIF49gbrU4KC8BXUBRAYfPfbAXHcUoM PGoKmVn39222/PkzyWi0cFEAHmi8AgAN0SyZhi80KyhQbramtjLXGg0UFSS+4IloS0fYBFYZWVAu DwF2ct3dIB0sGP/TaCnXKN7XDuw4YCMKARXTqZw5070LXyCfnjhdY2vN9PH2wj7auLC9+7YABgA9 /OFOdHCBBRB42jHLZ6OKfQjfYTR8+E/nBgDHBCSAm78A8P/Ac7jfwfDyNUwF0xrtW7s0CugDPzrW aECKFjayOdho...
yf2A+S912Lcz/gPGAFxAde9zQFwMD3QXdpEaDI+cQd1hUnHsjdYFTgoLwFdQFExhb7aC4/NxSgxI agqZWfs2W/73+TPJaLRwUQAeaLwCAA1olkzDLzArOFA3W1PbMtcaDRQVKL6AibSlI2wEVhlZUC4P ATu57m4gHSQY/9NoKdco72sHdiBgIwoBFdOpzpzpXgtfLJ+eRK6xtWb08fbCPtrY3n3buAAGAD2s 4U50cIEFEOjumGVno4p9CFdBYTR8+E/nBgDHBCQgm78A8P/A5nCf7fJgNVgF0xq7t3ZpCugDPzrW aODCaP3ayOZg...
def get_exe_bytes (self): import base64 return base64.decodestring (EXEDATA)
bde4b3adef4075407ed2396d5d01b9da498c96ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bde4b3adef4075407ed2396d5d01b9da498c96ec/bdist_wininst.py
AABFeGl0UHJvY2VzcwAAAFJlZ0Nsb3NlS2V5AAAAUHJvcGVydHlTaGVldEEAAFRleHRPdXRBAABm cmVlAABFbmRQYWludAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AABFeGl0UHJvY2VzcwAAAFJlZ0Nsb3NlS2V5AAAAUHJvcGVydHlTaGVldEEAAFRleHRPdXRBAABl eGl0AABFbmRQYWludAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
def get_exe_bytes (self): import base64 return base64.decodestring (EXEDATA)
bde4b3adef4075407ed2396d5d01b9da498c96ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bde4b3adef4075407ed2396d5d01b9da498c96ec/bdist_wininst.py
- list: list of article ids"""
- list: list of message ids"""
def newnews(self, group, date, time, file=None): """Process a NEWNEWS command. Arguments: - group: group name or '*' - date: string 'yymmdd' indicating the date - time: string 'hhmmss' indicating the time Return: - resp: server response if successful - list: list of article ids"""
d53b247497ce7cc7a82245cae6fc2cbef0a341a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d53b247497ce7cc7a82245cae6fc2cbef0a341a5/nntplib.py
- id: the article id"""
- id: the message id"""
def stat(self, id): """Process a STAT command. Argument: - id: article number or message id Returns: - resp: server response if successful - nr: the article number - id: the article id"""
d53b247497ce7cc7a82245cae6fc2cbef0a341a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d53b247497ce7cc7a82245cae6fc2cbef0a341a5/nntplib.py
del dir, L
del dir, dircase, L
def makepath(*paths): dir = os.path.abspath(os.path.join(*paths)) return dir, os.path.normcase(dir)
0cc1cd1ab13ab9ced796d9f8180c995449a4010c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0cc1cd1ab13ab9ced796d9f8180c995449a4010c/site.py
if self.force or output_file is None or newer(source, output_file)):
if self.force or output_file is None or newer(source, output_file):
def preprocess (self, source, output_file=None, macros=None, include_dirs=None, extra_preargs=None, extra_postargs=None):
912af324ac7f72be9296fb4db6cb4f6bc4bc1bc1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/912af324ac7f72be9296fb4db6cb4f6bc4bc1bc1/unixccompiler.py
def run (self):
7c02a97cc2143b114b04127da2fb06b155426214 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7c02a97cc2143b114b04127da2fb06b155426214/bdist_rpm.py
srpms = glob.glob(os.path.join(rpm_dir['SRPMS'], "*.rpm")) assert len(srpms) == 1, \ "unexpected number of SRPM files found: %s" % srpms dist_file = ('bdist_rpm', 'any', self._dist_path(srpms[0])) self.distribution.dist_files.append(dist_file) self.move_file(srpms[0], self.dist_dir)
srpm = os.path.join(rpm_dir['SRPMS'], source_rpm) assert(os.path.exists(srpm)) self.move_file(srpm, self.dist_dir)
def run (self):
7c02a97cc2143b114b04127da2fb06b155426214 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7c02a97cc2143b114b04127da2fb06b155426214/bdist_rpm.py
rpms = glob.glob(os.path.join(rpm_dir['RPMS'], "*/*.rpm")) debuginfo = glob.glob(os.path.join(rpm_dir['RPMS'], "*/*debuginfo*.rpm")) if debuginfo: rpms.remove(debuginfo[0]) assert len(rpms) == 1, \ "unexpected number of RPM files found: %s" % rpms dist_file = ('bdist_rpm', get_python_version(), self._dist_path(rpms[0])...
for rpm in binary_rpms: rpm = os.path.join(rpm_dir['RPMS'], rpm) if os.path.exists(rpm): self.move_file(rpm, self.dist_dir)
def run (self):
7c02a97cc2143b114b04127da2fb06b155426214 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7c02a97cc2143b114b04127da2fb06b155426214/bdist_rpm.py
self.repr = "{}"
self.repr = "set()"
def setUp(self): self.case = "empty set" self.values = [] self.set = set(self.values) self.dup = set(self.values) self.length = 0 self.repr = "{}"
66f4b8c0c1efa9f05c7a156b1d0d77ddbcd23dcc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66f4b8c0c1efa9f05c7a156b1d0d77ddbcd23dcc/test_set.py
headers, 'file:'+file)
headers, urlfile)
def open_local_file(self, url): import mimetypes, mimetools, StringIO mtype = mimetypes.guess_type(url)[0] headers = mimetools.Message(StringIO.StringIO( 'Content-Type: %s\n' % (mtype or 'text/plain'))) host, file = splithost(url) if not host: return addinfourl(open(url2pathname(file), 'rb'), headers, 'file:'+file) hos...
f01516a0d0252750f09100a3e9d68708fc1e63fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f01516a0d0252750f09100a3e9d68708fc1e63fd/urllib.py
headers, 'file:'+file)
headers, urlfile)
def open_local_file(self, url): import mimetypes, mimetools, StringIO mtype = mimetypes.guess_type(url)[0] headers = mimetools.Message(StringIO.StringIO( 'Content-Type: %s\n' % (mtype or 'text/plain'))) host, file = splithost(url) if not host: return addinfourl(open(url2pathname(file), 'rb'), headers, 'file:'+file) hos...
f01516a0d0252750f09100a3e9d68708fc1e63fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f01516a0d0252750f09100a3e9d68708fc1e63fd/urllib.py
"""parse the input lines from a robot.txt file.
"""parse the input lines from a robots.txt file.
def parse(self, lines): """parse the input lines from a robot.txt file. We allow that a user-agent: line is not preceded by one or more blank lines.""" state = 0 linenumber = 0 entry = Entry()
fd0d5de268892dc86a9d8bb6eb4cc8e68ce75af5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fd0d5de268892dc86a9d8bb6eb4cc8e68ce75af5/robotparser.py