rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
<<<<<<< Vrec.py
def main(): format = SV.RGB8_FRAMES qsize = 2 audio = 0 rate = 2 width = 0 norecord = 0 drop = 0 mono = 0 grey = 0 monotreshold = -1 opts, args = getopt.getopt(sys.argv[1:], 'aq:r:w:ndgmM:') for opt, arg in opts: if opt == '-a': audio = 1 elif opt == '-q': qsize = string.atoi(arg) elif opt == '-r': rate = string.atoi(arg) if rate < 2: sys.stderr.write('-r rate must be >= 2\n') sys.exit(2) elif opt == '-w': width = string.atoi(arg) elif opt == '-n': norecord = 1 elif opt == '-d': drop = 1 elif opt == '-g': grey = 1 elif opt == '-m': mono = 1 elif opt == '-M': mono = 1 monotreshold = string.atoi(arg) if args[2:]: sys.stderr.write('usage: Vrec [options] [file [audiofile]]\n') sys.exit(2) if args: filename = args[0] else: filename = 'film.video' if args[1:] and not audio: sys.stderr.write('-a turned on by appearance of 2nd file\n') audio = 1 if audio: if args[1:]: audiofilename = args[1] else: audiofilename = 'film.aiff' else: audiofilename = None if norecord: filename = audiofilename = '' v = sv.OpenVideo() # Determine maximum window size based on signal standard param = [SV.BROADCAST, 0] v.GetParam(param) if param[1] == SV.PAL: x = SV.PAL_XMAX y = SV.PAL_YMAX elif param[1] == SV.NTSC: x = SV.NTSC_XMAX y = SV.NTSC_YMAX else: print 'Unknown video standard', param[1] sys.exit(1) gl.foreground() gl.maxsize(x, y) gl.keepaspect(x, y) gl.stepunit(8, 6) if width: gl.prefsize(width, width*3/4) win = gl.winopen(filename) if width: gl.maxsize(x, y) gl.keepaspect(x, y) gl.stepunit(8, 6) gl.winconstraints() x, y = gl.getsize() print x, 'x', y v.SetSize(x, y)
9533ebe85737fdd61b9f9936472303c0d51d233b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9533ebe85737fdd61b9f9936472303c0d51d233b/Vrec.py
======= param = [SV.FIELDDROP, 0] v.SetParam(param) >>>>>>> 1.7
def main(): format = SV.RGB8_FRAMES qsize = 2 audio = 0 rate = 2 width = 0 norecord = 0 drop = 0 mono = 0 grey = 0 monotreshold = -1 opts, args = getopt.getopt(sys.argv[1:], 'aq:r:w:ndgmM:') for opt, arg in opts: if opt == '-a': audio = 1 elif opt == '-q': qsize = string.atoi(arg) elif opt == '-r': rate = string.atoi(arg) if rate < 2: sys.stderr.write('-r rate must be >= 2\n') sys.exit(2) elif opt == '-w': width = string.atoi(arg) elif opt == '-n': norecord = 1 elif opt == '-d': drop = 1 elif opt == '-g': grey = 1 elif opt == '-m': mono = 1 elif opt == '-M': mono = 1 monotreshold = string.atoi(arg) if args[2:]: sys.stderr.write('usage: Vrec [options] [file [audiofile]]\n') sys.exit(2) if args: filename = args[0] else: filename = 'film.video' if args[1:] and not audio: sys.stderr.write('-a turned on by appearance of 2nd file\n') audio = 1 if audio: if args[1:]: audiofilename = args[1] else: audiofilename = 'film.aiff' else: audiofilename = None if norecord: filename = audiofilename = '' v = sv.OpenVideo() # Determine maximum window size based on signal standard param = [SV.BROADCAST, 0] v.GetParam(param) if param[1] == SV.PAL: x = SV.PAL_XMAX y = SV.PAL_YMAX elif param[1] == SV.NTSC: x = SV.NTSC_XMAX y = SV.NTSC_YMAX else: print 'Unknown video standard', param[1] sys.exit(1) gl.foreground() gl.maxsize(x, y) gl.keepaspect(x, y) gl.stepunit(8, 6) if width: gl.prefsize(width, width*3/4) win = gl.winopen(filename) if width: gl.maxsize(x, y) gl.keepaspect(x, y) gl.stepunit(8, 6) gl.winconstraints() x, y = gl.getsize() print x, 'x', y v.SetSize(x, y)
9533ebe85737fdd61b9f9936472303c0d51d233b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9533ebe85737fdd61b9f9936472303c0d51d233b/Vrec.py
queue.put(data, int(id*tpf))
queue.put((data, int(id*tpf)))
def record(v, info, filename, audiofilename, mono, grey, monotreshold): import thread format, x, y, qsize, rate = info fps = 59.64 # Fields per second # XXX (Strange: need fps of Indigo monitor, not of PAL or NTSC!) tpf = 1000.0 / fps # Time per field in msec if filename: vout = VFile.VoutFile().init(filename) if mono: vout.format = 'mono' elif grey: vout.format = 'grey' else: vout.format = 'rgb8' vout.width = x vout.height = y vout.writeheader() MAXSIZE = 20 # XXX should be a user option import Queue queue = Queue.Queue().init(MAXSIZE) done = thread.allocate_lock() done.acquire_lock() thread.start_new_thread(saveframes, \ (vout, queue, done, mono, monotreshold)) if audiofilename: audiodone = thread.allocate_lock() audiodone.acquire_lock() audiostop = [] initaudio(audiofilename, audiostop, audiodone) gl.wintitle('(rec) ' + filename) lastid = 0 t0 = time.millitimer() count = 0 timestamps = [] ids = [] v.InitContinuousCapture(info) while not gl.qtest(): try: cd, id = v.GetCaptureData() except sv.error: time.millisleep(10) # XXX is this necessary? continue timestamps.append(time.millitimer()) ids.append(id) id = id + 2*rate
9533ebe85737fdd61b9f9936472303c0d51d233b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9533ebe85737fdd61b9f9936472303c0d51d233b/Vrec.py
print 'Captured',count*2, 'fields,', 0.1*int(count*20000.0/(t1-t0)), 'f/s', print count*200.0/lastid, '%,', print count*rate*200.0/lastid, '% of wanted rate'
print 'Captured',count*2, 'fields,', print 0.1*int(count*20000.0/(t1-t0)), 'f/s', if lastid: print count*200.0/lastid, '%,', print count*rate*200.0/lastid, '% of wanted rate', print
def record(v, info, filename, audiofilename, mono, grey, monotreshold): import thread format, x, y, qsize, rate = info fps = 59.64 # Fields per second # XXX (Strange: need fps of Indigo monitor, not of PAL or NTSC!) tpf = 1000.0 / fps # Time per field in msec if filename: vout = VFile.VoutFile().init(filename) if mono: vout.format = 'mono' elif grey: vout.format = 'grey' else: vout.format = 'rgb8' vout.width = x vout.height = y vout.writeheader() MAXSIZE = 20 # XXX should be a user option import Queue queue = Queue.Queue().init(MAXSIZE) done = thread.allocate_lock() done.acquire_lock() thread.start_new_thread(saveframes, \ (vout, queue, done, mono, monotreshold)) if audiofilename: audiodone = thread.allocate_lock() audiodone.acquire_lock() audiostop = [] initaudio(audiofilename, audiostop, audiodone) gl.wintitle('(rec) ' + filename) lastid = 0 t0 = time.millitimer() count = 0 timestamps = [] ids = [] v.InitContinuousCapture(info) while not gl.qtest(): try: cd, id = v.GetCaptureData() except sv.error: time.millisleep(10) # XXX is this necessary? continue timestamps.append(time.millitimer()) ids.append(id) id = id + 2*rate
9533ebe85737fdd61b9f9936472303c0d51d233b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9533ebe85737fdd61b9f9936472303c0d51d233b/Vrec.py
def valueseq(self, value1, value2): return value1.gr_name==value2.gr_name and \ value1.gr_gid==value2.gr_gid and value1.gr_mem==value2.gr_mem
def valueseq(self, value1, value2): # are two grp tuples equal (don't compare passwords) return value1.gr_name==value2.gr_name and \ value1.gr_gid==value2.gr_gid and value1.gr_mem==value2.gr_mem
ce6829ade0071e5463a5dc5cde7bbb01667073d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ce6829ade0071e5463a5dc5cde7bbb01667073d5/test_grp.py
entriesbygid = {} entriesbyname = {}
def test_values(self): entries = grp.getgrall() entriesbygid = {} entriesbyname = {}
ce6829ade0071e5463a5dc5cde7bbb01667073d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ce6829ade0071e5463a5dc5cde7bbb01667073d5/test_grp.py
entriesbygid.setdefault(e.gr_gid, []).append(e) entriesbyname.setdefault(e.gr_name, []).append(e)
def test_values(self): entries = grp.getgrall() entriesbygid = {} entriesbyname = {}
ce6829ade0071e5463a5dc5cde7bbb01667073d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ce6829ade0071e5463a5dc5cde7bbb01667073d5/test_grp.py
self.assert_(max([self.valueseq(e2, x) \ for x in entriesbygid[e.gr_gid]]))
self.assertEqual(e2.gr_gid, e.gr_gid)
def test_values(self): entries = grp.getgrall() entriesbygid = {} entriesbyname = {}
ce6829ade0071e5463a5dc5cde7bbb01667073d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ce6829ade0071e5463a5dc5cde7bbb01667073d5/test_grp.py
self.assert_(max([self.valueseq(e2, x) \ for x in entriesbyname[e.gr_name]]))
self.assertEqual(e2.gr_name, e.gr_name)
def test_values(self): entries = grp.getgrall() entriesbygid = {} entriesbyname = {}
ce6829ade0071e5463a5dc5cde7bbb01667073d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ce6829ade0071e5463a5dc5cde7bbb01667073d5/test_grp.py
func, targs, kargs = _exithandlers[-1]
func, targs, kargs = _exithandlers.pop()
def _run_exitfuncs(): """run any registered exit functions _exithandlers is traversed in reverse order so functions are executed last in, first out. """ while _exithandlers: func, targs, kargs = _exithandlers[-1] apply(func, targs, kargs) _exithandlers.remove(_exithandlers[-1])
384fd106e89ec859ace7c098620aad8ce2c2abaa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/384fd106e89ec859ace7c098620aad8ce2c2abaa/atexit.py
_exithandlers.remove(_exithandlers[-1])
def _run_exitfuncs(): """run any registered exit functions _exithandlers is traversed in reverse order so functions are executed last in, first out. """ while _exithandlers: func, targs, kargs = _exithandlers[-1] apply(func, targs, kargs) _exithandlers.remove(_exithandlers[-1])
384fd106e89ec859ace7c098620aad8ce2c2abaa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/384fd106e89ec859ace7c098620aad8ce2c2abaa/atexit.py
a.pop()
x = a.pop() if x != 'e': raise TestFailed, "array(%s) pop-test" % `type`
def testtype(type, example): a = array.array(type) a.append(example) if verbose: print 40*'*' print 'array after append: ', a a.typecode a.itemsize if a.typecode in ('i', 'b', 'h', 'l'): a.byteswap() if a.typecode == 'c': f = open(TESTFN, "w") f.write("The quick brown fox jumps over the lazy dog.\n") f.close() f = open(TESTFN, 'r') a.fromfile(f, 10) f.close() if verbose: print 'char array with 10 bytes of TESTFN appended: ', a a.fromlist(['a', 'b', 'c']) if verbose: print 'char array with list appended: ', a a.insert(0, example) if verbose: print 'array of %s after inserting another:' % a.typecode, a f = open(TESTFN, 'w') a.tofile(f) f.close() a.tolist() a.tostring() if verbose: print 'array of %s converted to a list: ' % a.typecode, a.tolist() if verbose: print 'array of %s converted to a string: ' \ % a.typecode, `a.tostring()` if type == 'c': a = array.array(type, "abcde") a[:-1] = a if a != array.array(type, "abcdee"): raise TestFailed, "array(%s) self-slice-assign (head)" % `type` a = array.array(type, "abcde") a[1:] = a if a != array.array(type, "aabcde"): raise TestFailed, "array(%s) self-slice-assign (tail)" % `type` a = array.array(type, "abcde") a[1:-1] = a if a != array.array(type, "aabcdee"): raise TestFailed, "array(%s) self-slice-assign (cntr)" % `type` if a.index("e") != 5: raise TestFailed, "array(%s) index-test" % `type` if a.count("a") != 2: raise TestFailed, "array(%s) count-test" % `type` a.remove("e") if a != array.array(type, "aabcde"): raise TestFailed, "array(%s) remove-test" % `type` if a.pop(0) != "a": raise TestFailed, "array(%s) pop-test" % `type` if a.pop(1) != "b": raise TestFailed, "array(%s) pop-test" % `type` a.extend(array.array(type, "xyz")) if a != array.array(type, "acdexyz"): raise TestFailed, "array(%s) extend-test" % `type` a.pop() a.pop() a.pop() a.pop() if a != array.array(type, "acd"): raise TestFailed, "array(%s) pop-test" % `type` else: a = array.array(type, [1, 2, 3, 4, 5]) a[:-1] = a if a != array.array(type, [1, 2, 3, 4, 5, 5]): raise TestFailed, "array(%s) self-slice-assign (head)" % `type` a = array.array(type, [1, 2, 3, 4, 5]) a[1:] = a if a != array.array(type, [1, 1, 2, 3, 4, 5]): raise TestFailed, "array(%s) self-slice-assign (tail)" % `type` a = array.array(type, [1, 2, 3, 4, 5]) a[1:-1] = a if a != array.array(type, [1, 1, 2, 3, 4, 5, 5]): raise TestFailed, "array(%s) self-slice-assign (cntr)" % `type` if a.index(5) != 5: raise TestFailed, "array(%s) index-test" % `type` if a.count(1) != 2: raise TestFailed, "array(%s) count-test" % `type` a.remove(5) if a != array.array(type, [1, 1, 2, 3, 4, 5]): raise TestFailed, "array(%s) remove-test" % `type` if a.pop(0) != 1: raise TestFailed, "array(%s) pop-test" % `type` if a.pop(1) != 2: raise TestFailed, "array(%s) pop-test" % `type` a.extend(array.array(type, [7, 8, 9])) if a != array.array(type, [1, 3, 4, 5, 7, 8, 9]): raise TestFailed, "array(%s) extend-test" % `type` a.pop() a.pop() a.pop() a.pop() if a != array.array(type, [1, 3, 4]): raise TestFailed, "array(%s) pop-test" % `type` # test that overflow exceptions are raised as expected for assignment # to array of specific integral types from math import pow if type in ('b', 'h', 'i', 'l'): # check signed and unsigned versions a = array.array(type) signedLowerLimit = -1 * long(pow(2, a.itemsize * 8 - 1)) signedUpperLimit = long(pow(2, a.itemsize * 8 - 1)) - 1L unsignedLowerLimit = 0 unsignedUpperLimit = long(pow(2, a.itemsize * 8)) - 1L testoverflow(type, signedLowerLimit, signedUpperLimit) testoverflow(type.upper(), unsignedLowerLimit, unsignedUpperLimit)
077a11dd00092fead641b9f2bd824790791512c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/077a11dd00092fead641b9f2bd824790791512c7/test_array.py
a.pop()
x = a.pop() if x != 5: raise TestFailed, "array(%s) pop-test" % `type`
def testtype(type, example): a = array.array(type) a.append(example) if verbose: print 40*'*' print 'array after append: ', a a.typecode a.itemsize if a.typecode in ('i', 'b', 'h', 'l'): a.byteswap() if a.typecode == 'c': f = open(TESTFN, "w") f.write("The quick brown fox jumps over the lazy dog.\n") f.close() f = open(TESTFN, 'r') a.fromfile(f, 10) f.close() if verbose: print 'char array with 10 bytes of TESTFN appended: ', a a.fromlist(['a', 'b', 'c']) if verbose: print 'char array with list appended: ', a a.insert(0, example) if verbose: print 'array of %s after inserting another:' % a.typecode, a f = open(TESTFN, 'w') a.tofile(f) f.close() a.tolist() a.tostring() if verbose: print 'array of %s converted to a list: ' % a.typecode, a.tolist() if verbose: print 'array of %s converted to a string: ' \ % a.typecode, `a.tostring()` if type == 'c': a = array.array(type, "abcde") a[:-1] = a if a != array.array(type, "abcdee"): raise TestFailed, "array(%s) self-slice-assign (head)" % `type` a = array.array(type, "abcde") a[1:] = a if a != array.array(type, "aabcde"): raise TestFailed, "array(%s) self-slice-assign (tail)" % `type` a = array.array(type, "abcde") a[1:-1] = a if a != array.array(type, "aabcdee"): raise TestFailed, "array(%s) self-slice-assign (cntr)" % `type` if a.index("e") != 5: raise TestFailed, "array(%s) index-test" % `type` if a.count("a") != 2: raise TestFailed, "array(%s) count-test" % `type` a.remove("e") if a != array.array(type, "aabcde"): raise TestFailed, "array(%s) remove-test" % `type` if a.pop(0) != "a": raise TestFailed, "array(%s) pop-test" % `type` if a.pop(1) != "b": raise TestFailed, "array(%s) pop-test" % `type` a.extend(array.array(type, "xyz")) if a != array.array(type, "acdexyz"): raise TestFailed, "array(%s) extend-test" % `type` a.pop() a.pop() a.pop() a.pop() if a != array.array(type, "acd"): raise TestFailed, "array(%s) pop-test" % `type` else: a = array.array(type, [1, 2, 3, 4, 5]) a[:-1] = a if a != array.array(type, [1, 2, 3, 4, 5, 5]): raise TestFailed, "array(%s) self-slice-assign (head)" % `type` a = array.array(type, [1, 2, 3, 4, 5]) a[1:] = a if a != array.array(type, [1, 1, 2, 3, 4, 5]): raise TestFailed, "array(%s) self-slice-assign (tail)" % `type` a = array.array(type, [1, 2, 3, 4, 5]) a[1:-1] = a if a != array.array(type, [1, 1, 2, 3, 4, 5, 5]): raise TestFailed, "array(%s) self-slice-assign (cntr)" % `type` if a.index(5) != 5: raise TestFailed, "array(%s) index-test" % `type` if a.count(1) != 2: raise TestFailed, "array(%s) count-test" % `type` a.remove(5) if a != array.array(type, [1, 1, 2, 3, 4, 5]): raise TestFailed, "array(%s) remove-test" % `type` if a.pop(0) != 1: raise TestFailed, "array(%s) pop-test" % `type` if a.pop(1) != 2: raise TestFailed, "array(%s) pop-test" % `type` a.extend(array.array(type, [7, 8, 9])) if a != array.array(type, [1, 3, 4, 5, 7, 8, 9]): raise TestFailed, "array(%s) extend-test" % `type` a.pop() a.pop() a.pop() a.pop() if a != array.array(type, [1, 3, 4]): raise TestFailed, "array(%s) pop-test" % `type` # test that overflow exceptions are raised as expected for assignment # to array of specific integral types from math import pow if type in ('b', 'h', 'i', 'l'): # check signed and unsigned versions a = array.array(type) signedLowerLimit = -1 * long(pow(2, a.itemsize * 8 - 1)) signedUpperLimit = long(pow(2, a.itemsize * 8 - 1)) - 1L unsignedLowerLimit = 0 unsignedUpperLimit = long(pow(2, a.itemsize * 8)) - 1L testoverflow(type, signedLowerLimit, signedUpperLimit) testoverflow(type.upper(), unsignedLowerLimit, unsignedUpperLimit)
077a11dd00092fead641b9f2bd824790791512c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/077a11dd00092fead641b9f2bd824790791512c7/test_array.py
def constant_red_generator(numchips, rgbtuple): red = rgbtuple[0]
def constant_cyan_generator(numchips, rgbtuple): red, green, blue = rgbtuple
def constant_red_generator(numchips, rgbtuple): red = rgbtuple[0] seq = constant(numchips) return map(None, [red] * numchips, seq, seq)
79a787931867fcbd6a6d6a78c25726382cc88bf0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/79a787931867fcbd6a6d6a78c25726382cc88bf0/PyncheWidget.py
return map(None, [red] * numchips, seq, seq)
return map(None, seq, [green] * numchips, [blue] * numchips)
def constant_red_generator(numchips, rgbtuple): red = rgbtuple[0] seq = constant(numchips) return map(None, [red] * numchips, seq, seq)
79a787931867fcbd6a6d6a78c25726382cc88bf0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/79a787931867fcbd6a6d6a78c25726382cc88bf0/PyncheWidget.py
def constant_green_generator(numchips, rgbtuple): green = rgbtuple[1]
def constant_magenta_generator(numchips, rgbtuple): red, green, blue = rgbtuple
def constant_green_generator(numchips, rgbtuple): green = rgbtuple[1] seq = constant(numchips) return map(None, seq, [green] * numchips, seq)
79a787931867fcbd6a6d6a78c25726382cc88bf0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/79a787931867fcbd6a6d6a78c25726382cc88bf0/PyncheWidget.py
return map(None, seq, [green] * numchips, seq)
return map(None, [red] * numchips, seq, [blue] * numchips)
def constant_green_generator(numchips, rgbtuple): green = rgbtuple[1] seq = constant(numchips) return map(None, seq, [green] * numchips, seq)
79a787931867fcbd6a6d6a78c25726382cc88bf0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/79a787931867fcbd6a6d6a78c25726382cc88bf0/PyncheWidget.py
def constant_blue_generator(numchips, rgbtuple): blue = rgbtuple[2]
def constant_yellow_generator(numchips, rgbtuple): red, green, blue = rgbtuple
def constant_blue_generator(numchips, rgbtuple): blue = rgbtuple[2] seq = constant(numchips) return map(None, seq, seq, [blue] * numchips)
79a787931867fcbd6a6d6a78c25726382cc88bf0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/79a787931867fcbd6a6d6a78c25726382cc88bf0/PyncheWidget.py
return map(None, seq, seq, [blue] * numchips)
return map(None, [red] * numchips, [green] * numchips, seq)
def constant_blue_generator(numchips, rgbtuple): blue = rgbtuple[2] seq = constant(numchips) return map(None, seq, seq, [blue] * numchips)
79a787931867fcbd6a6d6a78c25726382cc88bf0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/79a787931867fcbd6a6d6a78c25726382cc88bf0/PyncheWidget.py
generator=constant_red_generator)
generator=constant_cyan_generator, axis=0)
def __init__(self, colordb, parent=None, **kw):
79a787931867fcbd6a6d6a78c25726382cc88bf0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/79a787931867fcbd6a6d6a78c25726382cc88bf0/PyncheWidget.py
generator=constant_blue_generator)
generator=constant_magenta_generator, axis=1)
def __init__(self, colordb, parent=None, **kw):
79a787931867fcbd6a6d6a78c25726382cc88bf0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/79a787931867fcbd6a6d6a78c25726382cc88bf0/PyncheWidget.py
generator=constant_green_generator)
generator=constant_yellow_generator, axis=2)
def __init__(self, colordb, parent=None, **kw):
79a787931867fcbd6a6d6a78c25726382cc88bf0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/79a787931867fcbd6a6d6a78c25726382cc88bf0/PyncheWidget.py
self.error("expected name token")
self.error("expected name token at %r" % rawdata[declstartpos:declstartpos+20])
def _scan_name(self, i, declstartpos): rawdata = self.rawdata n = len(rawdata) if i == n: return None, -1 m = _declname_match(rawdata, i) if m: s = m.group() name = s.strip() if (i + len(s)) == n: return None, -1 # end of buffer return name.lower(), m.end() else: self.updatepos(declstartpos, i) self.error("expected name token")
f027ca816741fcea6267c6e8ea33ae43edfb7447 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f027ca816741fcea6267c6e8ea33ae43edfb7447/markupbase.py
if os.path.exists (self.build_bdist)
if os.path.exists (self.build_bdist):
def run(self): # remove the build/temp.<plat> directory (unless it's already # gone) if os.path.exists (self.build_temp): remove_tree (self.build_temp, self.verbose, self.dry_run)
c00848898129ac230fd130f4c7806a398bdfefaf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c00848898129ac230fd130f4c7806a398bdfefaf/clean.py
if ((localName == "*" or node.tagName == localName) and
if ((localName == "*" or node.localName == localName) and
def _getElementsByTagNameNSHelper(parent, nsURI, localName, rc): for node in parent.childNodes: if node.nodeType == Node.ELEMENT_NODE: if ((localName == "*" or node.tagName == localName) and (nsURI == "*" or node.namespaceURI == nsURI)): rc.append(node) _getElementsByTagNameNSHelper(node, nsURI, localName, rc) return rc
ed525fb0dfa45595e8e93cbde3d5b05838bf993a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ed525fb0dfa45595e8e93cbde3d5b05838bf993a/minidom.py
_getElementsByTagNameNSHelper(self, namespaceURI, localName, [])
rc = [] _getElementsByTagNameNSHelper(self, namespaceURI, localName, rc) return rc
def getElementsByTagNameNS(self, namespaceURI, localName): _getElementsByTagNameNSHelper(self, namespaceURI, localName, [])
ed525fb0dfa45595e8e93cbde3d5b05838bf993a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ed525fb0dfa45595e8e93cbde3d5b05838bf993a/minidom.py
_getElementsByTagNameNSHelper(self, namespaceURI, localName)
rc = [] _getElementsByTagNameNSHelper(self, namespaceURI, localName, rc) return rc
def getElementsByTagNameNS(self, namespaceURI, localName): _getElementsByTagNameNSHelper(self, namespaceURI, localName)
ed525fb0dfa45595e8e93cbde3d5b05838bf993a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ed525fb0dfa45595e8e93cbde3d5b05838bf993a/minidom.py
def check_processing_instruction_only(self):
def test_processing_instruction_only(self):
def check_processing_instruction_only(self): self._run_check("<?processing instruction>", [ ("pi", "processing instruction"), ])
84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b/test_htmlparser.py
def check_simple_html(self):
def test_simple_html(self):
def check_simple_html(self): self._run_check("""
84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b/test_htmlparser.py
def check_bad_nesting(self):
def test_bad_nesting(self):
def check_bad_nesting(self): self._run_check("<a><b></a></b>", [ ("starttag", "a", []), ("starttag", "b", []), ("endtag", "a"), ("endtag", "b"), ])
84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b/test_htmlparser.py
def check_attr_syntax(self):
def test_attr_syntax(self):
def check_attr_syntax(self): output = [ ("starttag", "a", [("b", "v"), ("c", "v"), ("d", "v"), ("e", None)]) ] self._run_check("""<a b='v' c="v" d=v e>""", output) self._run_check("""<a b = 'v' c = "v" d = v e>""", output) self._run_check("""<a\nb\n=\n'v'\nc\n=\n"v"\nd\n=\nv\ne>""", output) self._run_check("""<a\tb\t=\t'v'\tc\t=\t"v"\td\t=\tv\te>""", output)
84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b/test_htmlparser.py
def check_attr_values(self):
def test_attr_values(self):
def check_attr_values(self): self._run_check("""<a b='xxx\n\txxx' c="yyy\t\nyyy" d='\txyz\n'>""", [("starttag", "a", [("b", "xxx\n\txxx"), ("c", "yyy\t\nyyy"), ("d", "\txyz\n")]) ]) self._run_check("""<a b='' c="">""", [ ("starttag", "a", [("b", ""), ("c", "")]), ])
84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b/test_htmlparser.py
def check_attr_entity_replacement(self):
def test_attr_entity_replacement(self):
def check_attr_entity_replacement(self): self._run_check("""<a b='&amp;&gt;&lt;&quot;&apos;'>""", [ ("starttag", "a", [("b", "&><\"'")]), ])
84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b/test_htmlparser.py
def check_attr_funky_names(self):
def test_attr_funky_names(self):
def check_attr_funky_names(self): self._run_check("""<a a.b='v' c:d=v e-f=v>""", [ ("starttag", "a", [("a.b", "v"), ("c:d", "v"), ("e-f", "v")]), ])
84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b/test_htmlparser.py
def check_starttag_end_boundary(self):
def test_starttag_end_boundary(self):
def check_starttag_end_boundary(self): self._run_check("""<a b='<'>""", [("starttag", "a", [("b", "<")])]) self._run_check("""<a b='>'>""", [("starttag", "a", [("b", ">")])])
84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b/test_htmlparser.py
def check_buffer_artefacts(self):
def test_buffer_artefacts(self):
def check_buffer_artefacts(self): output = [("starttag", "a", [("b", "<")])] self._run_check(["<a b='<'>"], output) self._run_check(["<a ", "b='<'>"], output) self._run_check(["<a b", "='<'>"], output) self._run_check(["<a b=", "'<'>"], output) self._run_check(["<a b='<", "'>"], output) self._run_check(["<a b='<'", ">"], output)
84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b/test_htmlparser.py
def check_starttag_junk_chars(self):
def test_starttag_junk_chars(self):
def check_starttag_junk_chars(self): self._parse_error("<") self._parse_error("<>") self._parse_error("</>") self._parse_error("</$>") self._parse_error("</") self._parse_error("</a") self._parse_error("<a<a>") self._parse_error("</a<a>") self._parse_error("<$") self._parse_error("<$>") self._parse_error("<!") self._parse_error("<a $>") self._parse_error("<a") self._parse_error("<a foo='bar'") self._parse_error("<a foo='bar") self._parse_error("<a foo='>'") self._parse_error("<a foo='>") self._parse_error("<a foo=>")
84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b/test_htmlparser.py
def check_declaration_junk_chars(self):
def test_declaration_junk_chars(self):
def check_declaration_junk_chars(self): self._parse_error("<!DOCTYPE foo $ >")
84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b/test_htmlparser.py
def check_startendtag(self):
def test_startendtag(self):
def check_startendtag(self): self._run_check("<p/>", [ ("startendtag", "p", []), ]) self._run_check("<p></p>", [ ("starttag", "p", []), ("endtag", "p"), ]) self._run_check("<p><img src='foo' /></p>", [ ("starttag", "p", []), ("startendtag", "img", [("src", "foo")]), ("endtag", "p"), ])
84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b/test_htmlparser.py
def check_get_starttag_text(self):
def test_get_starttag_text(self):
def check_get_starttag_text(self): s = """<foo:bar \n one="1"\ttwo=2 >""" self._run_check_extra(s, [ ("starttag", "foo:bar", [("one", "1"), ("two", "2")]), ("starttag_text", s)])
84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b/test_htmlparser.py
def check_cdata_content(self):
def test_cdata_content(self):
def check_cdata_content(self): s = """<script> <!-- not a comment --> &not-an-entity-ref; </script>""" self._run_check(s, [ ("starttag", "script", []), ("data", " <!-- not a comment --> &not-an-entity-ref; "), ("endtag", "script"), ]) s = """<script> <not a='start tag'> </script>""" self._run_check(s, [ ("starttag", "script", []), ("data", " <not a='start tag'> "), ("endtag", "script"), ])
84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/84bb9d8dc463eaa3e38080e4ee6fe3d150b3cb1b/test_htmlparser.py
print string.ljust(opname[op], 15),
print string.ljust(opname[op], 20),
def disassemble(co, lasti=-1): """Disassemble a code object.""" code = co.co_code labels = findlabels(code) n = len(code) i = 0 while i < n: c = code[i] op = ord(c) if op == SET_LINENO and i > 0: print # Extra blank line if i == lasti: print '-->', else: print ' ', if i in labels: print '>>', else: print ' ', print string.rjust(`i`, 4), print string.ljust(opname[op], 15), i = i+1 if op >= HAVE_ARGUMENT: oparg = ord(code[i]) + ord(code[i+1])*256 i = i+2 print string.rjust(`oparg`, 5), if op in hasconst: print '(' + `co.co_consts[oparg]` + ')', elif op in hasname: print '(' + co.co_names[oparg] + ')', elif op in hasjrel: print '(to ' + `i + oparg` + ')', elif op in haslocal: print '(' + co.co_varnames[oparg] + ')', elif op in hascompare: print '(' + cmp_op[oparg] + ')', print
d30dedca27308441014e67a4208f37ce43e7d85c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d30dedca27308441014e67a4208f37ce43e7d85c/dis.py
FileHandler.names = (socket.gethostbyname('localhost'), socket.gethostbyname(socket.gethostname()))
try: FileHandler.names = (socket.gethostbyname('localhost'), socket.gethostbyname(socket.gethostname())) except socket.gaierror: FileHandler.names = (socket.gethostbyname('localhost'),)
def get_names(self): if FileHandler.names is None: FileHandler.names = (socket.gethostbyname('localhost'), socket.gethostbyname(socket.gethostname())) return FileHandler.names
4eb521e595216a406ad1d3175056dc8cd8be157b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4eb521e595216a406ad1d3175056dc8cd8be157b/urllib2.py
if tr_enc: if tr_enc.lower() != 'chunked': raise UnknownTransferEncoding()
if tr_enc and tr_enc.lower() == "chunked":
def begin(self): if self.msg is not None: # we've already started reading the response return
d229b3ae048ca51d9f3865e1e9eaf83ba5a6c424 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d229b3ae048ca51d9f3865e1e9eaf83ba5a6c424/httplib.py
`fileName`+' .')
`fn`+' .', parent=self)
def ViewFile(self, viewTitle, viewFile, encoding=None): fn = os.path.join(os.path.abspath(os.path.dirname(__file__)), viewFile) if encoding: import codecs try: textFile = codecs.open(fn, 'r') except IOError: tkMessageBox.showerror(title='File Load Error', message='Unable to load file '+ `fileName`+' .') return else: data = textFile.read() else: data = None textView.TextViewer(self, viewTitle, fn, data=data)
99204301074940a1921e0469295a4bf80250b40c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/99204301074940a1921e0469295a4bf80250b40c/aboutDialog.py
Should be able to handle anything rfc822.parseaddr can handle."""
Should be able to handle anything rfc822.parseaddr can handle. """
def quoteaddr(addr): """Quote a subset of the email addresses defined by RFC 821. Should be able to handle anything rfc822.parseaddr can handle.""" m=None try: m=rfc822.parseaddr(addr)[1] except AttributeError: pass if not m: #something weird here.. punt -ddm return addr else: return "<%s>" % m
a7d9bdfab61551ed16efc55c1b6c37268c2d9832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a7d9bdfab61551ed16efc55c1b6c37268c2d9832/smtplib.py
Internet CRLF end-of-line."""
Internet CRLF end-of-line. """
def quotedata(data): """Quote data for email. Double leading '.', and change Unix newline '\n', or Mac '\r' into Internet CRLF end-of-line.""" return re.sub(r'(?m)^\.', '..', re.sub(r'(?:\r\n|\n|\r(?!\n))', CRLF, data))
a7d9bdfab61551ed16efc55c1b6c37268c2d9832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a7d9bdfab61551ed16efc55c1b6c37268c2d9832/smtplib.py
transaction."""
transaction. """
def quotedata(data): """Quote data for email. Double leading '.', and change Unix newline '\n', or Mac '\r' into Internet CRLF end-of-line.""" return re.sub(r'(?m)^\.', '..', re.sub(r'(?:\r\n|\n|\r(?!\n))', CRLF, data))
a7d9bdfab61551ed16efc55c1b6c37268c2d9832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a7d9bdfab61551ed16efc55c1b6c37268c2d9832/smtplib.py
If specified, `host' is the name of the remote host to which to connect. If specified, `port' specifies the port to which to connect. By default, smtplib.SMTP_PORT is used.
If specified, `host' is the name of the remote host to which to connect. If specified, `port' specifies the port to which to connect. By default, smtplib.SMTP_PORT is used.
def __init__(self, host = '', port = 0): """Initialize a new instance.
a7d9bdfab61551ed16efc55c1b6c37268c2d9832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a7d9bdfab61551ed16efc55c1b6c37268c2d9832/smtplib.py
A non-false value results in debug messages for connection and for all messages sent to and received from the server.
A non-false value results in debug messages for connection and for all messages sent to and received from the server.
def set_debuglevel(self, debuglevel): """Set the debug output level.
a7d9bdfab61551ed16efc55c1b6c37268c2d9832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a7d9bdfab61551ed16efc55c1b6c37268c2d9832/smtplib.py
Note: This method is automatically invoked by __init__, if a host is specified during instantiation.
Note: This method is automatically invoked by __init__, if a host is specified during instantiation.
def connect(self, host='localhost', port = 0): """Connect to a host on a given port.
a7d9bdfab61551ed16efc55c1b6c37268c2d9832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a7d9bdfab61551ed16efc55c1b6c37268c2d9832/smtplib.py
"""Send a command to the server. """
"""Send a command to the server."""
def putcmd(self, cmd, args=""): """Send a command to the server. """ str = '%s %s%s' % (cmd, args, CRLF) self.send(str)
a7d9bdfab61551ed16efc55c1b6c37268c2d9832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a7d9bdfab61551ed16efc55c1b6c37268c2d9832/smtplib.py
- server response code (e.g. '250', or such, if all goes well) Note: returns -1 if it can't read response code. - server response string corresponding to response code (note : multiline responses converted to a single, multiline string)
- server response code (e.g. '250', or such, if all goes well) Note: returns -1 if it can't read response code. - server response string corresponding to response code (multiline responses are converted to a single, multiline string).
def getreply(self): """Get a reply from the server. Returns a tuple consisting of: - server response code (e.g. '250', or such, if all goes well) Note: returns -1 if it can't read response code. - server response string corresponding to response code (note : multiline responses converted to a single, multiline string) """ resp=[] self.file = self.sock.makefile('rb') while 1: line = self.file.readline() if self.debuglevel > 0: print 'reply:', `line` resp.append(string.strip(line[4:])) code=line[:3] #check if multiline resp if line[3:4]!="-": break try: errcode = string.atoi(code) except(ValueError): errcode = -1
a7d9bdfab61551ed16efc55c1b6c37268c2d9832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a7d9bdfab61551ed16efc55c1b6c37268c2d9832/smtplib.py
""" Send a command, and return its response code """
"""Send a command, and return its response code."""
def docmd(self, cmd, args=""): """ Send a command, and return its response code """ self.putcmd(cmd,args) (code,msg)=self.getreply() return code
a7d9bdfab61551ed16efc55c1b6c37268c2d9832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a7d9bdfab61551ed16efc55c1b6c37268c2d9832/smtplib.py
def docmd(self, cmd, args=""): """ Send a command, and return its response code """ self.putcmd(cmd,args) (code,msg)=self.getreply() return code
a7d9bdfab61551ed16efc55c1b6c37268c2d9832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a7d9bdfab61551ed16efc55c1b6c37268c2d9832/smtplib.py
""" SMTP 'helo' command. Hostname to send for this command defaults to the FQDN of the local host """
"""SMTP 'helo' command. Hostname to send for this command defaults to the FQDN of the local host. """
def helo(self, name=''): """ SMTP 'helo' command. Hostname to send for this command defaults to the FQDN of the local host """ name=string.strip(name) if len(name)==0: name=socket.gethostbyaddr(socket.gethostname())[0] self.putcmd("helo",name) (code,msg)=self.getreply() self.helo_resp=msg return code
a7d9bdfab61551ed16efc55c1b6c37268c2d9832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a7d9bdfab61551ed16efc55c1b6c37268c2d9832/smtplib.py
name=socket.gethostbyaddr(socket.gethostname())[0]
name=socket.gethostbyaddr(socket.gethostname())[0]
def helo(self, name=''): """ SMTP 'helo' command. Hostname to send for this command defaults to the FQDN of the local host """ name=string.strip(name) if len(name)==0: name=socket.gethostbyaddr(socket.gethostname())[0] self.putcmd("helo",name) (code,msg)=self.getreply() self.helo_resp=msg return code
a7d9bdfab61551ed16efc55c1b6c37268c2d9832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a7d9bdfab61551ed16efc55c1b6c37268c2d9832/smtplib.py
""" SMTP 'ehlo' command. Hostname to send for this command defaults to the FQDN of the local host. """
""" SMTP 'ehlo' command. Hostname to send for this command defaults to the FQDN of the local host. """
def ehlo(self, name=''): """ SMTP 'ehlo' command. Hostname to send for this command defaults to the FQDN of the local host. """ name=string.strip(name) if len(name)==0: name=socket.gethostbyaddr(socket.gethostname())[0] self.putcmd("ehlo",name) (code,msg)=self.getreply() # According to RFC1869 some (badly written) # MTA's will disconnect on an ehlo. Toss an exception if # that happens -ddm if code == -1 and len(msg) == 0: raise SMTPServerDisconnected self.ehlo_resp=msg if code<>250: return code self.does_esmtp=1 #parse the ehlo responce -ddm resp=string.split(self.ehlo_resp,'\n') del resp[0] for each in resp: m=re.match(r'(?P<feature>[A-Za-z0-9][A-Za-z0-9\-]*)',each) if m: feature=string.lower(m.group("feature")) params=string.strip(m.string[m.end("feature"):]) self.esmtp_features[feature]=params return code
a7d9bdfab61551ed16efc55c1b6c37268c2d9832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a7d9bdfab61551ed16efc55c1b6c37268c2d9832/smtplib.py
name=socket.gethostbyaddr(socket.gethostname())[0]
name=socket.gethostbyaddr(socket.gethostname())[0]
def ehlo(self, name=''): """ SMTP 'ehlo' command. Hostname to send for this command defaults to the FQDN of the local host. """ name=string.strip(name) if len(name)==0: name=socket.gethostbyaddr(socket.gethostname())[0] self.putcmd("ehlo",name) (code,msg)=self.getreply() # According to RFC1869 some (badly written) # MTA's will disconnect on an ehlo. Toss an exception if # that happens -ddm if code == -1 and len(msg) == 0: raise SMTPServerDisconnected self.ehlo_resp=msg if code<>250: return code self.does_esmtp=1 #parse the ehlo responce -ddm resp=string.split(self.ehlo_resp,'\n') del resp[0] for each in resp: m=re.match(r'(?P<feature>[A-Za-z0-9][A-Za-z0-9\-]*)',each) if m: feature=string.lower(m.group("feature")) params=string.strip(m.string[m.end("feature"):]) self.esmtp_features[feature]=params return code
a7d9bdfab61551ed16efc55c1b6c37268c2d9832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a7d9bdfab61551ed16efc55c1b6c37268c2d9832/smtplib.py
"""SMTP 'help' command. Returns help text from server."""
"""SMTP 'help' command. Returns help text from server."""
def help(self, args=''): """SMTP 'help' command. Returns help text from server.""" self.putcmd("help", args) (code,msg)=self.getreply() return msg
a7d9bdfab61551ed16efc55c1b6c37268c2d9832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a7d9bdfab61551ed16efc55c1b6c37268c2d9832/smtplib.py
"""SMTP 'rset' command. Resets session."""
"""SMTP 'rset' command -- resets session."""
def rset(self): """SMTP 'rset' command. Resets session.""" code=self.docmd("rset") return code
a7d9bdfab61551ed16efc55c1b6c37268c2d9832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a7d9bdfab61551ed16efc55c1b6c37268c2d9832/smtplib.py
"""SMTP 'noop' command. Doesn't do anything :>"""
"""SMTP 'noop' command -- doesn't do anything :>"""
def noop(self): """SMTP 'noop' command. Doesn't do anything :>""" code=self.docmd("noop") return code
a7d9bdfab61551ed16efc55c1b6c37268c2d9832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a7d9bdfab61551ed16efc55c1b6c37268c2d9832/smtplib.py
"""SMTP 'mail' command. Begins mail xfer session."""
"""SMTP 'mail' command -- begins mail xfer session."""
def mail(self,sender,options=[]): """SMTP 'mail' command. Begins mail xfer session.""" optionlist = '' if options and self.does_esmtp: optionlist = string.join(options, ' ') self.putcmd("mail", "FROM:%s %s" % (quoteaddr(sender) ,optionlist)) return self.getreply()
a7d9bdfab61551ed16efc55c1b6c37268c2d9832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a7d9bdfab61551ed16efc55c1b6c37268c2d9832/smtplib.py
"""SMTP 'rcpt' command. Indicates 1 recipient for this mail."""
"""SMTP 'rcpt' command -- indicates 1 recipient for this mail."""
def rcpt(self,recip,options=[]): """SMTP 'rcpt' command. Indicates 1 recipient for this mail.""" optionlist = '' if options and self.does_esmtp: optionlist = string.join(options, ' ') self.putcmd("rcpt","TO:%s %s" % (quoteaddr(recip),optionlist)) return self.getreply()
a7d9bdfab61551ed16efc55c1b6c37268c2d9832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a7d9bdfab61551ed16efc55c1b6c37268c2d9832/smtplib.py
"""SMTP 'DATA' command. Sends message data to server.
"""SMTP 'DATA' command -- sends message data to server.
def data(self,msg): """SMTP 'DATA' command. Sends message data to server. Automatically quotes lines beginning with a period per rfc821. """ self.putcmd("data") (code,repl)=self.getreply() if self.debuglevel >0 : print "data:", (code,repl) if code <> 354: return -1 else: self.send(quotedata(msg)) self.send("%s.%s" % (CRLF, CRLF)) (code,msg)=self.getreply() if self.debuglevel >0 : print "data:", (code,msg) return code
a7d9bdfab61551ed16efc55c1b6c37268c2d9832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a7d9bdfab61551ed16efc55c1b6c37268c2d9832/smtplib.py
"""SMTP 'verify' command. Checks for address validity."""
"""SMTP 'verify' command -- checks for address validity."""
def verify(self, address): """SMTP 'verify' command. Checks for address validity.""" self.putcmd("vrfy", quoteaddr(address)) return self.getreply()
a7d9bdfab61551ed16efc55c1b6c37268c2d9832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a7d9bdfab61551ed16efc55c1b6c37268c2d9832/smtplib.py
"""SMTP 'verify' command. Checks for address validity."""
"""SMTP 'verify' command -- checks for address validity."""
def expn(self, address): """SMTP 'verify' command. Checks for address validity.""" self.putcmd("expn", quoteaddr(address)) return self.getreply()
a7d9bdfab61551ed16efc55c1b6c37268c2d9832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a7d9bdfab61551ed16efc55c1b6c37268c2d9832/smtplib.py
except ImportError:
gzip.GzipFile except (ImportError, AttributeError):
def gzopen(cls, name, mode="r", fileobj=None, compresslevel=9): """Open gzip compressed tar archive name for reading or writing. Appending is not allowed. """ if len(mode) > 1 or mode not in "rw": raise ValueError, "mode must be 'r' or 'w'"
4ec6824896e22637a421cb99fdde694f0a1cdbc5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4ec6824896e22637a421cb99fdde694f0a1cdbc5/tarfile.py
if type (package) is StringType: path = string.split (package, '.') elif type (package) in (TupleType, ListType): path = list (package) else: raise TypeError, "'package' must be a string, list, or tuple"
path = string.split (package, '.')
def get_package_dir (self, package): """Return the directory, relative to the top of the source distribution, where package 'package' should be found (at least according to the 'package_dir' option, if any)."""
c0fe82ca26b1da22e35f2d0676f09795d052e4f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c0fe82ca26b1da22e35f2d0676f09795d052e4f0/build_py.py
package = tuple (path[0:-1])
package = string.join(path[0:-1], '.')
def find_modules (self): """Finds individually-specified Python modules, ie. those listed by module name in 'self.py_modules'. Returns a list of tuples (package, module_base, filename): 'package' is a tuple of the path through package-space to the module; 'module_base' is the bare (no packages, no dots) module name, and 'filename' is the path to the ".py" file (relative to the distribution root) that implements the module. """
c0fe82ca26b1da22e35f2d0676f09795d052e4f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c0fe82ca26b1da22e35f2d0676f09795d052e4f0/build_py.py
try: self.ftp.nlst(file) except ftplib.error_perm, reason: raise IOError, ('ftp error', reason), sys.exc_info()[2] self.ftp.voidcmd(cmd)
def retrfile(self, file, type): import ftplib self.endtransfer() if type in ('d', 'D'): cmd = 'TYPE A'; isdir = 1 else: cmd = 'TYPE ' + type; isdir = 0 try: self.ftp.voidcmd(cmd) except ftplib.all_errors: self.init() self.ftp.voidcmd(cmd) conn = None if file and not isdir: # Use nlst to see if the file exists at all try: self.ftp.nlst(file) except ftplib.error_perm, reason: raise IOError, ('ftp error', reason), sys.exc_info()[2] # Restore the transfer mode! self.ftp.voidcmd(cmd) # Try to retrieve as a file try: cmd = 'RETR ' + file conn = self.ftp.ntransfercmd(cmd) except ftplib.error_perm, reason: if str(reason)[:3] != '550': raise IOError, ('ftp error', reason), sys.exc_info()[2] if not conn: # Set transfer mode to ASCII! self.ftp.voidcmd('TYPE A') # Try a directory listing if file: cmd = 'LIST ' + file else: cmd = 'LIST' conn = self.ftp.ntransfercmd(cmd) self.busy = 1 # Pass back both a suitably decorated object and a retrieval length return (addclosehook(conn[0].makefile('rb'), self.endtransfer), conn[1])
44a118af5043ed6919bd1d0bcfc603f496ae4d7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/44a118af5043ed6919bd1d0bcfc603f496ae4d7c/urllib.py
def __init__(self):
_locator = None document = None def __init__(self, documentFactory=None): self.documentFactory = documentFactory
def __init__(self): self.firstEvent = [None, None] self.lastEvent = self.firstEvent self._ns_contexts = [{}] # contains uri -> prefix dicts self._current_context = self._ns_contexts[-1]
c16adce273d20e462d705a7dcdbf17948cc8ba91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c16adce273d20e462d705a7dcdbf17948cc8ba91/pulldom.py
def setDocumentLocator(self, locator): pass
def setDocumentLocator(self, locator): self._locator = locator
def setDocumentLocator(self, locator): pass
c16adce273d20e462d705a7dcdbf17948cc8ba91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c16adce273d20e462d705a7dcdbf17948cc8ba91/pulldom.py
self._current_context[uri] = prefix
self._current_context[uri] = prefix or ''
def startPrefixMapping(self, prefix, uri): self._ns_contexts.append(self._current_context.copy()) self._current_context[uri] = prefix
c16adce273d20e462d705a7dcdbf17948cc8ba91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c16adce273d20e462d705a7dcdbf17948cc8ba91/pulldom.py
del self._ns_contexts[-1]
self._current_context = self._ns_contexts.pop()
def endPrefixMapping(self, prefix): del self._ns_contexts[-1]
c16adce273d20e462d705a7dcdbf17948cc8ba91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c16adce273d20e462d705a7dcdbf17948cc8ba91/pulldom.py
uri,localname = name
uri, localname = name
def startElementNS(self, name, tagName , attrs): uri,localname = name if uri: # When using namespaces, the reader may or may not # provide us with the original name. If not, create # *a* valid tagName from the current context. if tagName is None: tagName = self._current_context[uri] + ":" + localname node = self.document.createElementNS(uri, tagName) else: # When the tagname is not prefixed, it just appears as # localname node = self.document.createElement(localname)
c16adce273d20e462d705a7dcdbf17948cc8ba91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c16adce273d20e462d705a7dcdbf17948cc8ba91/pulldom.py
parent = self.curNode node.parentNode = parent
node.parentNode = self.curNode
def startElementNS(self, name, tagName , attrs): uri,localname = name if uri: # When using namespaces, the reader may or may not # provide us with the original name. If not, create # *a* valid tagName from the current context. if tagName is None: tagName = self._current_context[uri] + ":" + localname node = self.document.createElementNS(uri, tagName) else: # When the tagname is not prefixed, it just appears as # localname node = self.document.createElement(localname)
c16adce273d20e462d705a7dcdbf17948cc8ba91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c16adce273d20e462d705a7dcdbf17948cc8ba91/pulldom.py
self.curNode = node.parentNode
self.curNode = self.curNode.parentNode
def endElementNS(self, name, tagName): node = self.curNode self.lastEvent[1] = [(END_ELEMENT, node), None] self.lastEvent = self.lastEvent[1] #self.events.append((END_ELEMENT, node)) self.curNode = node.parentNode
c16adce273d20e462d705a7dcdbf17948cc8ba91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c16adce273d20e462d705a7dcdbf17948cc8ba91/pulldom.py
parent = self.curNode node.parentNode = parent
node.parentNode = self.curNode
def startElement(self, name, attrs): node = self.document.createElement(name)
c16adce273d20e462d705a7dcdbf17948cc8ba91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c16adce273d20e462d705a7dcdbf17948cc8ba91/pulldom.py
node = self.document.createTextNode(chars[start:start + length])
node = self.document.createTextNode(chars)
def ignorableWhitespace(self, chars): node = self.document.createTextNode(chars[start:start + length]) parent = self.curNode node.parentNode = parent self.lastEvent[1] = [(IGNORABLE_WHITESPACE, node), None] self.lastEvent = self.lastEvent[1] #self.events.append((IGNORABLE_WHITESPACE, node))
c16adce273d20e462d705a7dcdbf17948cc8ba91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c16adce273d20e462d705a7dcdbf17948cc8ba91/pulldom.py
node = self.curNode = self.document = minidom.Document() node.parentNode = None
publicId = systemId = None if self._locator: publicId = self._locator.getPublicId() systemId = self._locator.getSystemId() if self.documentFactory is None: import xml.dom.minidom self.documentFactory = xml.dom.minidom.Document.implementation node = self.documentFactory.createDocument(None, publicId, systemId) self.curNode = self.document = node
def startDocument(self): node = self.curNode = self.document = minidom.Document() node.parentNode = None self.lastEvent[1] = [(START_DOCUMENT, node), None] self.lastEvent = self.lastEvent[1] #self.events.append((START_DOCUMENT, node))
c16adce273d20e462d705a7dcdbf17948cc8ba91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c16adce273d20e462d705a7dcdbf17948cc8ba91/pulldom.py
assert not self.curNode.parentNode for node in self.curNode.childNodes: if node.nodeType == node.ELEMENT_NODE: self.document.documentElement = node
assert self.curNode.parentNode is None, \ "not all elements have been properly closed" assert self.curNode.documentElement is not None, \ "document does not contain a root element" node = self.curNode.documentElement
def endDocument(self): assert not self.curNode.parentNode for node in self.curNode.childNodes: if node.nodeType == node.ELEMENT_NODE: self.document.documentElement = node #if not self.document.documentElement: # raise Error, "No document element"
c16adce273d20e462d705a7dcdbf17948cc8ba91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c16adce273d20e462d705a7dcdbf17948cc8ba91/pulldom.py
self.parser.setFeature(xml.sax.handler.feature_namespaces,1)
self.parser.setFeature(xml.sax.handler.feature_namespaces, 1)
def reset(self): self.pulldom = PullDOM() # This content handler relies on namespace support self.parser.setFeature(xml.sax.handler.feature_namespaces,1) self.parser.setContentHandler(self.pulldom)
c16adce273d20e462d705a7dcdbf17948cc8ba91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c16adce273d20e462d705a7dcdbf17948cc8ba91/pulldom.py
buf=self.stream.read(self.bufsize)
buf = self.stream.read(self.bufsize)
def getEvent(self): if not self.pulldom.firstEvent[1]: self.pulldom.lastEvent = self.pulldom.firstEvent while not self.pulldom.firstEvent[1]: buf=self.stream.read(self.bufsize) if not buf: #FIXME: why doesn't Expat close work? #self.parser.close() return None self.parser.feed(buf) rc = self.pulldom.firstEvent[1][0] self.pulldom.firstEvent[1] = self.pulldom.firstEvent[1][1] return rc
c16adce273d20e462d705a7dcdbf17948cc8ba91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c16adce273d20e462d705a7dcdbf17948cc8ba91/pulldom.py
def parse(stream_or_string, parser=None, bufsize=default_bufsize): if type(stream_or_string) is type(""):
def parse(stream_or_string, parser=None, bufsize=None): if bufsize is None: bufsize = default_bufsize if type(stream_or_string) in [type(""), type(u"")]:
def parse(stream_or_string, parser=None, bufsize=default_bufsize): if type(stream_or_string) is type(""): stream = open(stream_or_string) else: stream = stream_or_string if not parser: parser = xml.sax.make_parser() return DOMEventStream(stream, parser, bufsize)
c16adce273d20e462d705a7dcdbf17948cc8ba91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c16adce273d20e462d705a7dcdbf17948cc8ba91/pulldom.py
SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.__test__.syntax[0]>, line 2)
SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.__test__.syntax[0]>, line 3)
>>> def f():
ddbaa660d3b64a71b4ac9eab64b1bb944ca1276b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ddbaa660d3b64a71b4ac9eab64b1bb944ca1276b/test_generators.py
... yield 2
... yield 2
... def f(i):
ddbaa660d3b64a71b4ac9eab64b1bb944ca1276b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ddbaa660d3b64a71b4ac9eab64b1bb944ca1276b/test_generators.py
SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.__test__.syntax[24]>, line 8)
SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.__test__.syntax[24]>, line 10)
... def f(i):
ddbaa660d3b64a71b4ac9eab64b1bb944ca1276b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ddbaa660d3b64a71b4ac9eab64b1bb944ca1276b/test_generators.py
userlist = self.__class__() userlist.data[:] = self.data[i:j] return userlist
return self.__class__(self.data[i:j])
def __getslice__(self, i, j): i = max(i, 0); j = max(j, 0) userlist = self.__class__() userlist.data[:] = self.data[i:j] return userlist
cc773d3b11967b36684b0681e54ed6388bf7370c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cc773d3b11967b36684b0681e54ed6388bf7370c/UserList.py
Returns a file object; the name of the file is accessible as file.name. The file will be automatically deleted when it is closed.
Returns an object with a file-like interface; the name of the file is accessible as file.name. The file will be automatically deleted when it is closed.
def NamedTemporaryFile(mode='w+b', bufsize=-1, suffix="", prefix=template, dir=None): """Create and return a temporary file. Arguments: 'prefix', 'suffix', 'dir' -- as for mkstemp. 'mode' -- the mode argument to os.fdopen (default "w+b"). 'bufsize' -- the buffer size argument to os.fdopen (default -1). The file is created as mkstemp() would do it. Returns a file object; the name of the file is accessible as file.name. The file will be automatically deleted when it is closed. """ if dir is None: dir = gettempdir() if 'b' in mode: flags = _bin_openflags else: flags = _text_openflags # Setting O_TEMPORARY in the flags causes the OS to delete # the file when it is closed. This is only supported by Windows. if _os.name == 'nt': flags |= _os.O_TEMPORARY (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags) file = _os.fdopen(fd, mode, bufsize) return _TemporaryFileWrapper(file, name)
faa10ebdd0c250a59b9073c6e0829c42fedfac43 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/faa10ebdd0c250a59b9073c6e0829c42fedfac43/tempfile.py
Returns a file object. The file has no name, and will cease to exist when it is closed.
Returns an object with a file-like interface. The file has no name, and will cease to exist when it is closed.
def TemporaryFile(mode='w+b', bufsize=-1, suffix="", prefix=template, dir=None): """Create and return a temporary file. Arguments: 'prefix', 'suffix', 'directory' -- as for mkstemp. 'mode' -- the mode argument to os.fdopen (default "w+b"). 'bufsize' -- the buffer size argument to os.fdopen (default -1). The file is created as mkstemp() would do it.
faa10ebdd0c250a59b9073c6e0829c42fedfac43 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/faa10ebdd0c250a59b9073c6e0829c42fedfac43/tempfile.py
del names["__builtins__"]
if names.has_key("__builtins__"): del names["__builtins__"]
def check_all(modname): names = {} try: exec "import %s" % modname in names except ImportError: # silent fail here seems the best route since some modules # may not be available in all environments return verify(hasattr(sys.modules[modname], "__all__"), "%s has no __all__ attribute" % modname) names = {} exec "from %s import *" % modname in names del names["__builtins__"] keys = names.keys() keys.sort() all = list(sys.modules[modname].__all__) # in case it's a tuple all.sort() verify(keys==all, "%s != %s" % (keys, all))
cc012e92b21fbd8476bbaa8d4aa91b7e78111182 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cc012e92b21fbd8476bbaa8d4aa91b7e78111182/test___all__.py
def __init__(self, filename):
def __init__(self, filename, config={}):
def __init__(self, filename): self.items = {} self.filename = filename self.fp = open(filename) self.lineno = 0 self.resolving = {} self.resolved = {} self.pushback = None
0eea16633adab90227826c3dc96b991829665012 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0eea16633adab90227826c3dc96b991829665012/unweave.py
rv.append((lineno, pre+'\n'))
rv.append((lineno, pre))
def _readitem(self): """Read the definition of an item. Insert #line where needed. """ rv = [] while 1: lineno, line = self._readline() if not line: break if ENDDEFINITION.search(line): break if BEGINDEFINITION.match(line): self.pushback = lineno, line break mo = USEDEFINITION.match(line) if mo: pre = mo.group('pre') if pre: rv.append((lineno, pre+'\n')) rv.append((lineno, line)) # For simplicity we add #line directives now, if # needed. if mo: post = mo.group('post') if post and post != '\n': rv.append((lineno, post)) return rv
0eea16633adab90227826c3dc96b991829665012 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0eea16633adab90227826c3dc96b991829665012/unweave.py
def _readitem(self): """Read the definition of an item. Insert #line where needed. """ rv = [] while 1: lineno, line = self._readline() if not line: break if ENDDEFINITION.search(line): break if BEGINDEFINITION.match(line): self.pushback = lineno, line break mo = USEDEFINITION.match(line) if mo: pre = mo.group('pre') if pre: rv.append((lineno, pre+'\n')) rv.append((lineno, line)) # For simplicity we add #line directives now, if # needed. if mo: post = mo.group('post') if post and post != '\n': rv.append((lineno, post)) return rv
0eea16633adab90227826c3dc96b991829665012 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0eea16633adab90227826c3dc96b991829665012/unweave.py
pass
if self.gencomments: if savedcomment or line.strip(): savedcomment.append((lineno, '// '+line)) def _extendlines(self, comment): rv = [] for lineno, line in comment: line = line[:-1] if len(line) < 75: line = line + (75-len(line))*' ' line = line + '\n' rv.append((lineno, line)) return rv
def read(self): """Read the source file and store all definitions""" while 1: lineno, line = self._readline() if not line: break mo = BEGINDEFINITION.search(line) if mo: name = mo.group('name') value = self._readitem() self._define(name, value) else: pass # We could output the TeX code but we don't bother.
0eea16633adab90227826c3dc96b991829665012 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0eea16633adab90227826c3dc96b991829665012/unweave.py
if line and line != '\n' and lineno != curlineno:
if self.genlinedirectives and line and line != '\n' and lineno != curlineno:
def _addlinedirectives(self, data): curlineno = -100 rv = [] for lineno, line in data: curlineno = curlineno + 1 if line and line != '\n' and lineno != curlineno: rv.append(self._linedirective(lineno)) curlineno = lineno rv.append(line) return rv
0eea16633adab90227826c3dc96b991829665012 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0eea16633adab90227826c3dc96b991829665012/unweave.py
pr = Processor(file)
pr = Processor(file, config)
def process(file, config): pr = Processor(file) pr.read() pr.resolve() for pattern, folder in config: pr.save(folder, pattern)
0eea16633adab90227826c3dc96b991829665012 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0eea16633adab90227826c3dc96b991829665012/unweave.py
for pattern, folder in config:
for pattern, folder in config['config']:
def process(file, config): pr = Processor(file) pr.read() pr.resolve() for pattern, folder in config: pr.save(folder, pattern)
0eea16633adab90227826c3dc96b991829665012 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0eea16633adab90227826c3dc96b991829665012/unweave.py
confstr = """config = [ ("^.*\.cp$", ":unweave-src"), ("^.*\.h$", ":unweave-include"), ]"""
confstr = DEFAULT_CONFIG
def readconfig(): """Read a configuration file, if it doesn't exist create it.""" configname = sys.argv[0] + '.config' if not os.path.exists(configname): confstr = """config = [ ("^.*\.cp$", ":unweave-src"), ("^.*\.h$", ":unweave-include"),
0eea16633adab90227826c3dc96b991829665012 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0eea16633adab90227826c3dc96b991829665012/unweave.py