rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
_debug("Checking robot.txt allowance for:\n user agent: %s\n url: %s" %
_debug("Checking robots.txt allowance for:\n user agent: %s\n url: %s" %
def can_fetch(self, useragent, url): """using the parsed robots.txt decide if useragent can fetch url""" _debug("Checking robot.txt allowance for:\n user agent: %s\n url: %s" % (useragent, url)) if self.disallow_all: return False if self.allow_all: return True # search for given user agent matches # the first match c...
fd0d5de268892dc86a9d8bb6eb4cc8e68ce75af5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fd0d5de268892dc86a9d8bb6eb4cc8e68ce75af5/robotparser.py
for m in Pack.__dict__.keys():
methods = Pack.__dict__.keys() methods = methods + Grid.__dict__.keys() methods = methods + Place.__dict__.keys() for m in methods:
def __init__(self, master=None, cnf=None, **kw): if cnf is None: cnf = {} if kw: cnf = _cnfmerge((cnf, kw)) fcnf = {} for k in cnf.keys(): if type(k) == ClassType or k == 'name': fcnf[k] = cnf[k] del cnf[k] self.frame = apply(Frame, (master,), fcnf) self.vbar = Scrollbar(self.frame, name='vbar') self.vbar.pack(side=RIG...
cd7cb81a4343ba236bd6d9ee0d6e9be0792abb71 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cd7cb81a4343ba236bd6d9ee0d6e9be0792abb71/ScrolledText.py
self.pred=[]
self.pred = []
def __init__(self, versionPredicateStr): """Parse a version predicate string. """ # Fields: # name: package name # pred: list of (comparison string, StrictVersion)
e5a596f9c3ee7eb9f236a91b47387e74fad4bb54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e5a596f9c3ee7eb9f236a91b47387e74fad4bb54/versionpredicate.py
wordlist.sort(lambda a, b: len(b[1])-len(a[1]))
def cmpwords((aword, alist),(bword, blist)): r = -cmp(len(alist),len(blist)) if r: return r return cmp(aword, bword) wordlist.sort(cmpwords)
def makeunicodename(unicode, trace): FILE = "Modules/unicodename_db.h" print "--- Preparing", FILE, "..." # collect names names = [None] * len(unicode.chars) for char in unicode.chars: record = unicode.table[char] if record: name = record[1].strip() if name and name[0] != "<": names[char] = name + chr(0) print len...
d21783b97c6d562ecf0946155432d9bc2f5fd341 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d21783b97c6d562ecf0946155432d9bc2f5fd341/makeunicodedata.py
def __init__(self, filename, exclusions, expand=1): file = open(filename) table = [None] * 0x110000 while 1: s = file.readline() if not s: break s = s.strip().split(";") char = int(s[0], 16) table[char] = s
d21783b97c6d562ecf0946155432d9bc2f5fd341 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d21783b97c6d562ecf0946155432d9bc2f5fd341/makeunicodedata.py
for i in range(0, 0xD800):
for i in range(0, 0x110000):
def __init__(self, filename, exclusions, expand=1): file = open(filename) table = [None] * 0x110000 while 1: s = file.readline() if not s: break s = s.strip().split(";") char = int(s[0], 16) table[char] = s
d21783b97c6d562ecf0946155432d9bc2f5fd341 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d21783b97c6d562ecf0946155432d9bc2f5fd341/makeunicodedata.py
ix = h & 0xff000000
ix = h & 0xff000000L
def myhash(s, magic): h = 0 for c in map(ord, s.upper()): h = (h * magic) + c ix = h & 0xff000000 if ix: h = (h ^ ((ix>>24) & 0xff)) & 0x00ffffff return h
d21783b97c6d562ecf0946155432d9bc2f5fd341 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d21783b97c6d562ecf0946155432d9bc2f5fd341/makeunicodedata.py
'unixware5':
'unixware7':
def printlist(x, width=70, indent=4): """Print the elements of iterable x to stdout. Optional arg width (default 70) is the maximum line length. Optional arg indent (default 4) is the number of blanks with which to begin each line. """ from textwrap import fill blanks = ' ' * indent print fill(' '.join(map(str, x)), ...
2f85b46e802663f3f42868abd5f70863be7d86e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2f85b46e802663f3f42868abd5f70863be7d86e1/regrtest.py
fp.write("\tif hasattr(v, '_superclassnames') and v._superclassnames:\n")
fp.write("\tif hasattr(v, '_superclassnames') and not hasattr(v, '_propdict'):\n")
fp.write("def getbaseclasses(v):\n")
9471ae92061183246569ab16f263f0b84f9720a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9471ae92061183246569ab16f263f0b84f9720a2/gensuitemodule.py
fp.write("\t\tv._superclassnames = None\n")
fp.write("def getbaseclasses(v):\n")
9471ae92061183246569ab16f263f0b84f9720a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9471ae92061183246569ab16f263f0b84f9720a2/gensuitemodule.py
f_month -- full weekday names (14-item list; dummy value in [0], which
f_month -- full month names (13-item list; dummy value in [0], which
def _getlang(): # Figure out what the current language is set to. return locale.getlocale(locale.LC_TIME)
df1ab7634a5d33a2f4ec592acef2b17dc6d6430c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/df1ab7634a5d33a2f4ec592acef2b17dc6d6430c/_strptime.py
a_month -- abbreviated weekday names (13-item list, dummy value in
a_month -- abbreviated month names (13-item list, dummy value in
def _getlang(): # Figure out what the current language is set to. return locale.getlocale(locale.LC_TIME)
df1ab7634a5d33a2f4ec592acef2b17dc6d6430c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/df1ab7634a5d33a2f4ec592acef2b17dc6d6430c/_strptime.py
* any RCS or CVS directories
* any RCS, CVS and .svn directories
def prune_file_list (self): """Prune off branches that might slip into the file list as created by 'read_template()', but really don't belong there: * the build tree (typically "build") * the release tree itself (only an issue if we ran "sdist" previously with --keep-temp, or it aborted) * any RCS or CVS directories ""...
a58c541822b7012cf55a3a0c4c747f33e3ec7a00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a58c541822b7012cf55a3a0c4c747f33e3ec7a00/sdist.py
self.filelist.exclude_pattern(r'/(RCS|CVS)/.*', is_regex=1)
self.filelist.exclude_pattern(r'/(RCS|CVS|\.svn)/.*', is_regex=1)
def prune_file_list (self): """Prune off branches that might slip into the file list as created by 'read_template()', but really don't belong there: * the build tree (typically "build") * the release tree itself (only an issue if we ran "sdist" previously with --keep-temp, or it aborted) * any RCS or CVS directories ""...
a58c541822b7012cf55a3a0c4c747f33e3ec7a00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a58c541822b7012cf55a3a0c4c747f33e3ec7a00/sdist.py
SetDialogItemText(h, string.joinfields(list, '\r'))
h.data = string.joinfields(list, '\r') d.SelectDialogItemText(TEXT_ITEM, 0, 32767) d.SelectDialogItemText(TEXT_ITEM, 0, 0)
def interact(list, pythondir, options, title): """Let the user interact with the dialog""" opythondir = pythondir try: # Try to go to the "correct" dir for GetDirectory os.chdir(pythondir.as_pathname()) except os.error: pass d = GetNewDialog(DIALOG_ID, -1) tp, h, rect = d.GetDialogItem(TITLE_ITEM) SetDialogItemText(h, ...
021c70b2b6c9dba3dd083c5bc204417353adb997 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/021c70b2b6c9dba3dd083c5bc204417353adb997/EditPythonPrefs.py
tmp = string.splitfields(GetDialogItemText(h), '\r')
tmp = string.splitfields(h.data, '\r')
def interact(list, pythondir, options, title): """Let the user interact with the dialog""" opythondir = pythondir try: # Try to go to the "correct" dir for GetDirectory os.chdir(pythondir.as_pathname()) except os.error: pass d = GetNewDialog(DIALOG_ID, -1) tp, h, rect = d.GetDialogItem(TITLE_ITEM) SetDialogItemText(h, ...
021c70b2b6c9dba3dd083c5bc204417353adb997 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/021c70b2b6c9dba3dd083c5bc204417353adb997/EditPythonPrefs.py
s = string.rjust(`vin.packfactor`, 2) if vin.packfactor and vin.format not in ('rgb', 'jpeg') and \ (vin.width/vin.packfactor) % 4 <> 0: s = s + '!'
if type(vin.packfactor) == type(()): xpf, ypf = vin.packfactor s = string.rjust(`xpf`, 2) + ',' + \ string.rjust(`ypf`, 2)
def process(filename): try: vin = VFile.RandomVinFile().init(filename) except IOError, msg: sys.stderr.write(filename + ': I/O error: ' + `msg` + '\n') return 1 except VFile.Error, msg: sys.stderr.write(msg + '\n') return 1 except EOFError: sys.stderr.write(filename + ': EOF in video file\n') return 1 if terse: print ...
61f722b0451ce1226126dc6b90492dbb90b414ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/61f722b0451ce1226126dc6b90492dbb90b414ca/Vinfo.py
s = s + ' '
s = string.rjust(`vin.packfactor`, 2) if type(vin.packfactor) == type(0) and \ vin.format not in ('rgb', 'jpeg') and \ (vin.width/vin.packfactor) % 4 <> 0: s = s + '! ' else: s = s + ' '
def process(filename): try: vin = VFile.RandomVinFile().init(filename) except IOError, msg: sys.stderr.write(filename + ': I/O error: ' + `msg` + '\n') return 1 except VFile.Error, msg: sys.stderr.write(msg + '\n') return 1 except EOFError: sys.stderr.write(filename + ': EOF in video file\n') return 1 if terse: print ...
61f722b0451ce1226126dc6b90492dbb90b414ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/61f722b0451ce1226126dc6b90492dbb90b414ca/Vinfo.py
print string.rjust(`int(n*10000.0/t)*0.1`, 5)
if t: print string.rjust(`int(n*10000.0/t)*0.1`, 5), print
def process(filename): try: vin = VFile.RandomVinFile().init(filename) except IOError, msg: sys.stderr.write(filename + ': I/O error: ' + `msg` + '\n') return 1 except VFile.Error, msg: sys.stderr.write(msg + '\n') return 1 except EOFError: sys.stderr.write(filename + ': EOF in video file\n') return 1 if terse: print ...
61f722b0451ce1226126dc6b90492dbb90b414ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/61f722b0451ce1226126dc6b90492dbb90b414ca/Vinfo.py
USE_FROZEN = hasattr(imp, "set_frozenmodules")
USE_ZIPIMPORT = "zipimport" in sys.builtin_module_names
def report(self): # XXX something decent pass
678abc68f61ae57565c4683c846e9cb003cf9e86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/678abc68f61ae57565c4683c846e9cb003cf9e86/bundlebuilder.py
if USE_FROZEN: FROZEN_ARCHIVE = "FrozenModules.marshal" SITE_PY += """\ import imp, marshal f = open(sys.path[0] + "/%s", "rb") imp.set_frozenmodules(marshal.load(f)) f.close() """ % FROZEN_ARCHIVE
if USE_ZIPIMPORT: ZIP_ARCHIVE = "Modules.zip" SITE_PY += "sys.path.append(sys.path[0] + '/%s')\n" % ZIP_ARCHIVE def getPycData(fullname, code, ispkg): if ispkg: fullname += ".__init__" path = fullname.replace(".", os.sep) + PYC_EXT return path, MAGIC + '\0\0\0\0' + marshal.dumps(code)
def report(self): # XXX something decent pass
678abc68f61ae57565c4683c846e9cb003cf9e86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/678abc68f61ae57565c4683c846e9cb003cf9e86/bundlebuilder.py
import imp, sys, os for p in sys.path: path = os.path.join(p, "%(filename)s") if os.path.exists(path): break else: assert 0, "file not found: %(filename)s" mod = imp.load_dynamic("%(name)s", path) sys.modules["%(name)s"] = mod
def __load(): import imp, sys, os for p in sys.path: path = os.path.join(p, "%(filename)s") if os.path.exists(path): break else: assert 0, "file not found: %(filename)s" mod = imp.load_dynamic("%(name)s", path) __load() del __load
def report(self): # XXX something decent pass
678abc68f61ae57565c4683c846e9cb003cf9e86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/678abc68f61ae57565c4683c846e9cb003cf9e86/bundlebuilder.py
if USE_FROZEN: frozenmodules = []
if USE_ZIPIMPORT: import zipfile relpath = pathjoin("Contents", "Resources", ZIP_ARCHIVE) abspath = pathjoin(self.bundlepath, relpath) zf = zipfile.ZipFile(abspath, "w", zipfile.ZIP_DEFLATED)
def addPythonModules(self): self.message("Adding Python modules", 1)
678abc68f61ae57565c4683c846e9cb003cf9e86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/678abc68f61ae57565c4683c846e9cb003cf9e86/bundlebuilder.py
if ispkg: self.message("Adding Python package %s" % name, 2) else: self.message("Adding Python module %s" % name, 2) frozenmodules.append((name, marshal.dumps(code), ispkg)) frozenmodules = tuple(frozenmodules) relpath = pathjoin("Contents", "Resources", FROZEN_ARCHIVE) abspath = pathjoin(self.bundlepath, relpath) f = ...
self.message("Adding Python module %s" % name, 2) path, pyc = getPycData(name, code, ispkg) zf.writestr(path, pyc) zf.close()
def addPythonModules(self): self.message("Adding Python modules", 1)
678abc68f61ae57565c4683c846e9cb003cf9e86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/678abc68f61ae57565c4683c846e9cb003cf9e86/bundlebuilder.py
if USE_FROZEN:
if USE_ZIPIMPORT:
def findDependencies(self): self.message("Finding module dependencies", 1) import modulefinder mf = modulefinder.ModuleFinder(excludes=self.excludeModules) # manually add our own site.py site = mf.add_module("site") site.__code__ = SITE_CO mf.scan_code(SITE_CO, site)
678abc68f61ae57565c4683c846e9cb003cf9e86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/678abc68f61ae57565c4683c846e9cb003cf9e86/bundlebuilder.py
if not USE_FROZEN or name != "site":
if not USE_ZIPIMPORT or name != "site":
def findDependencies(self): self.message("Finding module dependencies", 1) import modulefinder mf = modulefinder.ModuleFinder(excludes=self.excludeModules) # manually add our own site.py site = mf.add_module("site") site.__code__ = SITE_CO mf.scan_code(SITE_CO, site)
678abc68f61ae57565c4683c846e9cb003cf9e86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/678abc68f61ae57565c4683c846e9cb003cf9e86/bundlebuilder.py
def findDependencies(self): self.message("Finding module dependencies", 1) import modulefinder mf = modulefinder.ModuleFinder(excludes=self.excludeModules) # manually add our own site.py site = mf.add_module("site") site.__code__ = SITE_CO mf.scan_code(SITE_CO, site)
678abc68f61ae57565c4683c846e9cb003cf9e86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/678abc68f61ae57565c4683c846e9cb003cf9e86/bundlebuilder.py
f.write("\0" * 8)
f.write(MAGIC) f.write("\0" * 4)
def writePyc(code, path): f = open(path, "wb") f.write("\0" * 8) # don't bother about a time stamp marshal.dump(code, f) f.seek(0, 0) f.write(MAGIC) f.close()
678abc68f61ae57565c4683c846e9cb003cf9e86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/678abc68f61ae57565c4683c846e9cb003cf9e86/bundlebuilder.py
f.seek(0, 0) f.write(MAGIC)
def writePyc(code, path): f = open(path, "wb") f.write("\0" * 8) # don't bother about a time stamp marshal.dump(code, f) f.seek(0, 0) f.write(MAGIC) f.close()
678abc68f61ae57565c4683c846e9cb003cf9e86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/678abc68f61ae57565c4683c846e9cb003cf9e86/bundlebuilder.py
print "link_shared_object():" print " output_filename =", output_filename print " mkpath'ing:", os.path.dirname (output_filename)
def link_shared_object (self, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None):
f20a8d6292ce58a4192c660ead89baaa98b2c523 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f20a8d6292ce58a4192c660ead89baaa98b2c523/msvccompiler.py
else: if __debug__: self.fail("AssertionError not raised by assert 0")
def testAssert(self): # assert_stmt: 'assert' test [',' test] assert 1 assert 1, 1 assert lambda x:x assert 1, lambda x:x+1 try: assert 0, "msg" except AssertionError, e: self.assertEquals(e.args[0], "msg") # we can not expect an assertion error to be raised # if the tests are run in an optimized python #else: # sel...
ccca02b0b189b132db07fbd53e8d3fa1c5954cac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ccca02b0b189b132db07fbd53e8d3fa1c5954cac/test_grammar.py
self.badmodules[fqname][parent.__name__] = None
if parent: self.badmodules[fqname][parent.__name__] = None
def import_module(self, partname, fqname, parent): self.msgin(3, "import_module", partname, fqname, parent) try: m = self.modules[fqname] except KeyError: pass else: self.msgout(3, "import_module ->", m) return m if self.badmodules.has_key(fqname): self.msgout(3, "import_module -> None") self.badmodules[fqname][parent....
af30c9033cec13ac7e42267f98408d0bbc870661 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af30c9033cec13ac7e42267f98408d0bbc870661/modulefinder.py
self.d.DragWindow(where, screenbounds)
self.w.DragWindow(where, screenbounds)
def _update(self, value): maxval = self.maxval if maxval == 0: # XXXX Quick fix. Should probably display an unknown duration value = 0 maxval = 1 if maxval > 32767: value = int(value/(maxval/32767.0)) maxval = 32767 progbar = self.d.GetDialogItemAsControl(3) progbar.SetControlMaximum(maxval) progbar.SetControlValue(val...
811a55cb0afb5b54edbbaa9e2a71761e991f6b6b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/811a55cb0afb5b54edbbaa9e2a71761e991f6b6b/EasyDialogs.py
write32(self.fileobj, int(time.time()))
write32u(self.fileobj, long(time.time()))
def _write_gzip_header(self): self.fileobj.write('\037\213') # magic header self.fileobj.write('\010') # compression method fname = self.filename[:-3] flags = 0 if fname: flags = FNAME self.fileobj.write(chr(flags)) write32(self.fileobj, int(time.time())) self.fileobj.write('\002') self.file...
7b7df8339e977a224362dad23e00d5181c1fb269 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7b7df8339e977a224362dad23e00d5181c1fb269/gzip.py
if crc32 != self.crc:
if crc32%0x100000000L != self.crc%0x100000000L:
def _read_eof(self): # We've read to the end of the file, so we have to rewind in order # to reread the 8 bytes containing the CRC and the file size. # We check the that the computed CRC and size of the # uncompressed data matches the stored values. self.fileobj.seek(-8, 1) crc32 = read32(self.fileobj) isize = read32(s...
7b7df8339e977a224362dad23e00d5181c1fb269 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7b7df8339e977a224362dad23e00d5181c1fb269/gzip.py
def do_event(self, (dev, val)):
def do_event(self, dev, val):
def do_event(self, (dev, val)): if dev == DEVICE.REDRAW: if self.vin: self.vin.redraw(val) if self.vout: self.vout.redraw(val)
89a8f9532953b87e4128e8ce87609893e92d59eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89a8f9532953b87e4128e8ce87609893e92d59eb/Vedit.py
def cb_in_new(self, args):
def cb_in_new(self, *args):
def cb_in_new(self, args): self.msg('') hd, tl = os.path.split(self.ifile) filename = fl.file_selector('Input video file', hd, '', tl) if not filename: return self.open_input(filename)
89a8f9532953b87e4128e8ce87609893e92d59eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89a8f9532953b87e4128e8ce87609893e92d59eb/Vedit.py
def cb_in_close(self, args):
def cb_in_close(self, *args):
def cb_in_close(self, args): self.msg('') self.close_input()
89a8f9532953b87e4128e8ce87609893e92d59eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89a8f9532953b87e4128e8ce87609893e92d59eb/Vedit.py
def cb_in_skip(self, args):
def cb_in_skip(self, *args):
def cb_in_skip(self, args): if not self.icheck(): return if not self.vin.get(): self.err('End of input file') self.ishow()
89a8f9532953b87e4128e8ce87609893e92d59eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89a8f9532953b87e4128e8ce87609893e92d59eb/Vedit.py
def cb_in_back(self, args):
def cb_in_back(self, *args):
def cb_in_back(self, args): if not self.icheck(): return if not self.vin.backup(): self.err('Input buffer exhausted') self.ishow()
89a8f9532953b87e4128e8ce87609893e92d59eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89a8f9532953b87e4128e8ce87609893e92d59eb/Vedit.py
def cb_in_rewind(self, args):
def cb_in_rewind(self, *args):
def cb_in_rewind(self, args): if not self.icheck(): return self.vin.rewind() self.ishow()
89a8f9532953b87e4128e8ce87609893e92d59eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89a8f9532953b87e4128e8ce87609893e92d59eb/Vedit.py
def cb_copy(self, args):
def cb_copy(self, *args):
def cb_copy(self, args): if not self.iocheck(): return data = self.vin.get() if not data: self.err('End of input file') self.ishow() return if self.vout.getinfo() <> self.vin.getinfo(): print 'Copying info...' self.vout.setinfo(self.vin.getinfo()) self.vout.put(data) self.oshow() self.ishow()
89a8f9532953b87e4128e8ce87609893e92d59eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89a8f9532953b87e4128e8ce87609893e92d59eb/Vedit.py
def cb_uncopy(self, args):
def cb_uncopy(self, *args):
def cb_uncopy(self, args): if not self.iocheck(): return if not self.vout.backup(): self.err('Output buffer exhausted') return self.oshow() if not self.vin.backup(): self.err('Input buffer exhausted') return self.ishow()
89a8f9532953b87e4128e8ce87609893e92d59eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89a8f9532953b87e4128e8ce87609893e92d59eb/Vedit.py
def cb_out_new(self, args):
def cb_out_new(self, *args):
def cb_out_new(self, args): self.msg('') hd, tl = os.path.split(self.ofile) filename = fl.file_selector('Output video file', hd, '', tl) if not filename: return self.open_output(filename)
89a8f9532953b87e4128e8ce87609893e92d59eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89a8f9532953b87e4128e8ce87609893e92d59eb/Vedit.py
def cb_out_close(self, args):
def cb_out_close(self, *args):
def cb_out_close(self, args): self.msg('') self.close_output()
89a8f9532953b87e4128e8ce87609893e92d59eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89a8f9532953b87e4128e8ce87609893e92d59eb/Vedit.py
def cb_out_skip(self, arg):
def cb_out_skip(self, *args):
def cb_out_skip(self, arg): if not self.ocheck(): return if not self.vout.forward(): self.err('Output buffer exhausted') self.oshow()
89a8f9532953b87e4128e8ce87609893e92d59eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89a8f9532953b87e4128e8ce87609893e92d59eb/Vedit.py
def cb_out_back(self, args):
def cb_out_back(self, *args):
def cb_out_back(self, args): if not self.ocheck(): return if not self.vout.backup(): self.err('Output buffer exhausted') self.oshow()
89a8f9532953b87e4128e8ce87609893e92d59eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89a8f9532953b87e4128e8ce87609893e92d59eb/Vedit.py
def cb_out_rewind(self, args):
def cb_out_rewind(self, *args):
def cb_out_rewind(self, args): if not self.ocheck(): return self.vout.rewind() self.oshow()
89a8f9532953b87e4128e8ce87609893e92d59eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89a8f9532953b87e4128e8ce87609893e92d59eb/Vedit.py
def cb_quit(self, args):
def cb_quit(self, *args):
def cb_quit(self, args): self.close_input() self.close_output() sys.exit(0)
89a8f9532953b87e4128e8ce87609893e92d59eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89a8f9532953b87e4128e8ce87609893e92d59eb/Vedit.py
self.para.words.append(self.nextfont, text, \ self.d.textwidth(text), space, space, \ self.ascent, self.descent)
self.para.words.append((self.nextfont, text, self.d.textwidth(text), space, space, self.ascent, self.descent))
def addword(self, text, space): if self.nospace and not text: return self.nospace = 0 self.blanklines = 0 if not self.para: self.para = self.newpara() self.para.indent_left = self.leftindent self.para.just = self.just self.nextfont = self.font space = int(space * self.space) self.para.words.append(self.nextfont, text, ...
8a6aa25357d1ec1b4d7ddd1c0cbfafd711ea28af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8a6aa25357d1ec1b4d7ddd1c0cbfafd711ea28af/fmt.py
self.window.show( \
self.window.show(
def showanchor(self, id): for i in range(len(self.paralist)): p = self.paralist[i] if p.hasanchor(id): long1 = i, 0 long2 = i, len(p.extract()) hit = long1, long2 self.setselection(hit) self.window.show( \ (p.left, p.top), (p.right, p.bottom)) break
8a6aa25357d1ec1b4d7ddd1c0cbfafd711ea28af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8a6aa25357d1ec1b4d7ddd1c0cbfafd711ea28af/fmt.py
it = iter(self._fp)
eq(iter(self._fp), self._fp)
def test_iterator(self): eq = self.assertEqual unless = self.failUnless it = iter(self._fp) # Does this object support the iteration protocol? unless(hasattr(it, '__iter__')) unless(hasattr(it, 'next')) i = 0 for line in self._fp: eq(line, self._line + '\n') i += 1 eq(i, 5)
a6eca6d97632ddd0c92404c0f7b68ec6bd6ce35f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a6eca6d97632ddd0c92404c0f7b68ec6bd6ce35f/test_StringIO.py
unless(hasattr(it, '__iter__')) unless(hasattr(it, 'next'))
unless(hasattr(self._fp, '__iter__')) unless(hasattr(self._fp, 'next'))
def test_iterator(self): eq = self.assertEqual unless = self.failUnless it = iter(self._fp) # Does this object support the iteration protocol? unless(hasattr(it, '__iter__')) unless(hasattr(it, 'next')) i = 0 for line in self._fp: eq(line, self._line + '\n') i += 1 eq(i, 5)
a6eca6d97632ddd0c92404c0f7b68ec6bd6ce35f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a6eca6d97632ddd0c92404c0f7b68ec6bd6ce35f/test_StringIO.py
'member', 'sectcode', 'verb'):
'member', 'sectcode', 'verb', 'cfunction', 'cdata', 'ctype', ):
def startchange(): global hist, out hist.chaptertype = "chapter" hist.inenv = [] hist.nodenames = [] hist.cindex = [] hist.inargs = 0 hist.enumeratenesting, hist.itemizenesting = 0, 0 out.doublenodes = [] out.doublecindeces = []
8155ca150930842112da9c64dcc64f9241c80817 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8155ca150930842112da9c64dcc64f9241c80817/partparse.py
command = '' cat_class = '' if idxsi and idxsi[-1] in ('method', 'protocol', 'attribute'): command = 'defmethod' cat_class = string.join(idxsi[:-1]) elif len(idxsi) == 2 and idxsi[1] == 'function': command = 'deffn' cat_class = string.join(idxsi) elif len(idxsi) == 3 and idxsi[:2] == ['in', 'module']: command = 'deffn'...
command = 'deffn' if hist.this_module: cat_class = 'function of ' + hist.this_module else: cat_class = 'built-in function'
def do_funcdesc(length, buf, pp, i, index=1): startpoint = i-1 ch = pp[startpoint] wh = ch.where length, newi = getnextarg(length, buf, pp, i) funcname = chunk(GROUP, wh, pp[i:newi]) del pp[i:newi] length = length - (newi-i) save = hist.inargs hist.inargs = 1 length, newi = getnextarg(length, buf, pp, i) hist.inargs = ...
8155ca150930842112da9c64dcc64f9241c80817 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8155ca150930842112da9c64dcc64f9241c80817/partparse.py
if len(idxsi) == 2 and idxsi[1] == 'exception': command = 'defvr' cat_class = string.join(idxsi) elif len(idxsi) == 3 and idxsi[:2] == ['in', 'module']: command = 'defcv' cat_class = 'exception' class_class = string.join(idxsi[1:]) elif len(idxsi) == 4 and idxsi[:3] == ['exception', 'in', 'module']: command = 'defcv' c...
if idxsi == ['built-in', 'exception', 'base', 'class']:
def do_excdesc(length, buf, pp, i): startpoint = i-1 ch = pp[startpoint] wh = ch.where length, newi = getnextarg(length, buf, pp, i) excname = chunk(GROUP, wh, pp[i:newi]) del pp[i:newi] length = length - (newi-i) idxsi = hist.indexsubitem # words command = '' cat_class = '' class_class = '' if len(idxsi) == 2 and idx...
8155ca150930842112da9c64dcc64f9241c80817 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8155ca150930842112da9c64dcc64f9241c80817/partparse.py
raise error, 'don\'t know what to do with indexsubitem ' + `idxsi`
command = 'defcv' cat_class = 'exception'
def do_excdesc(length, buf, pp, i): startpoint = i-1 ch = pp[startpoint] wh = ch.where length, newi = getnextarg(length, buf, pp, i) excname = chunk(GROUP, wh, pp[i:newi]) del pp[i:newi] length = length - (newi-i) idxsi = hist.indexsubitem # words command = '' cat_class = '' class_class = '' if len(idxsi) == 2 and idx...
8155ca150930842112da9c64dcc64f9241c80817 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8155ca150930842112da9c64dcc64f9241c80817/partparse.py
'funcdescni', 'datadescni'):
'funcdescni', 'datadescni', 'methoddesc', 'memberdesc', 'methoddescni', 'memberdescni', ):
def changeit(buf, pp): global onlylatexspecial, hist, out i, length = 0, len(pp) while 1: # sanity check: length should always equal len(pp) if len(pp) != length: print i, pp[i] raise 'FATAL', 'inconsistent length. thought ' + `length` + ', but should really be ' + `len(pp)` if i >= length: break ch = pp[i] i = i + 1 ...
8155ca150930842112da9c64dcc64f9241c80817 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8155ca150930842112da9c64dcc64f9241c80817/partparse.py
stuff = pp[i].data if len(stuff) != 1: raise error, "parameter to \\setindexsubitem{} too long" if pp[i].chtype != chunk_type[GROUP]: raise error, "bad chunk type following \\setindexsubitem" \ "\nexpected GROUP, got " + str(ch.chtype) text = s(buf, stuff[0].data) if text[:1] != '(' or text[-1:] != ')': raise error, \ ...
length, i = yank_indexsubitem(pp, length, i, buf, ch, 'setindexsubitem') elif s_buf_data == 'withsubitem': oldsubitem = hist.indexsubitem try: length, i = yank_indexsubitem(pp, length, i, buf, ch, 'withsubitem') stuff = pp[i].data del pp[i] length = length - 1 changeit(buf, stuff) stuff = None finally: hist.indexsubit...
def changeit(buf, pp): global onlylatexspecial, hist, out i, length = 0, len(pp) while 1: # sanity check: length should always equal len(pp) if len(pp) != length: print i, pp[i] raise 'FATAL', 'inconsistent length. thought ' + `length` + ', but should really be ' + `len(pp)` if i >= length: break ch = pp[i] i = i + 1 ...
8155ca150930842112da9c64dcc64f9241c80817 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8155ca150930842112da9c64dcc64f9241c80817/partparse.py
cat_class = '('+string.join(idxsi)+')'
cat_class = '(%s)' % string.join(idxsi)
def changeit(buf, pp): global onlylatexspecial, hist, out i, length = 0, len(pp) while 1: # sanity check: length should always equal len(pp) if len(pp) != length: print i, pp[i] raise 'FATAL', 'inconsistent length. thought ' + `length` + ', but should really be ' + `len(pp)` if i >= length: break ch = pp[i] i = i + 1 ...
8155ca150930842112da9c64dcc64f9241c80817 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8155ca150930842112da9c64dcc64f9241c80817/partparse.py
def changeit(buf, pp): global onlylatexspecial, hist, out i, length = 0, len(pp) while 1: # sanity check: length should always equal len(pp) if len(pp) != length: print i, pp[i] raise 'FATAL', 'inconsistent length. thought ' + `length` + ', but should really be ' + `len(pp)` if i >= length: break ch = pp[i] i = i + 1 ...
8155ca150930842112da9c64dcc64f9241c80817 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8155ca150930842112da9c64dcc64f9241c80817/partparse.py
ch.chtype = chunk_type[CSLINE] ch.data = 'pindex' length, newi = getnextarg(length, buf, pp, i) ingroupch = pp[i:newi] del pp[i:newi] length = length - (newi-i) ingroupch.append(chunk(PLAIN, ch.where, ' ')) ingroupch.append(chunk(CSNAME, ch.where, 'r')) ingroupch.append(chunk(GROUP, ch.where, [ chunk(PLAIN, ch.where, ...
length, i = add_module_index( pp, length, i, buf, ch, '(built-in)', (s_buf_data[:3] == 'ref')) elif s_buf_data in ('modindex', 'refmodindex'): length, i = add_module_index( pp, length, i, buf, ch, '', (s_buf_data[:3] == 'ref'))
def changeit(buf, pp): global onlylatexspecial, hist, out i, length = 0, len(pp) while 1: # sanity check: length should always equal len(pp) if len(pp) != length: print i, pp[i] raise 'FATAL', 'inconsistent length. thought ' + `length` + ', but should really be ' + `len(pp)` if i >= length: break ch = pp[i] i = i + 1 ...
8155ca150930842112da9c64dcc64f9241c80817 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8155ca150930842112da9c64dcc64f9241c80817/partparse.py
ch.chtype = chunk_type[CSLINE] ch.data = 'pindex' length, newi = getnextarg(length, buf, pp, i) ingroupch = pp[i:newi] del pp[i:newi] length = length - (newi-i) ingroupch.append(chunk(PLAIN, ch.where, ' ')) ingroupch.append(chunk(CSNAME, ch.where, 'r')) ingroupch.append(chunk(GROUP, ch.where, [ chunk(PLAIN, ch.where,...
length, i = add_module_index( pp, length, i, buf, ch, '(standard)', (s_buf_data[:3] == 'ref')) elif s_buf_data in ('exmodindex', 'refexmodindex'): length, i = add_module_index( pp, length, i, buf, ch, '(extension)', (s_buf_data[:3] == 'ref'))
def changeit(buf, pp): global onlylatexspecial, hist, out i, length = 0, len(pp) while 1: # sanity check: length should always equal len(pp) if len(pp) != length: print i, pp[i] raise 'FATAL', 'inconsistent length. thought ' + `length` + ', but should really be ' + `len(pp)` if i >= length: break ch = pp[i] i = i + 1 ...
8155ca150930842112da9c64dcc64f9241c80817 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8155ca150930842112da9c64dcc64f9241c80817/partparse.py
while pp[i+1].chtype == chunk_type[COMMENT]: i = i + 1
def changeit(buf, pp): global onlylatexspecial, hist, out i, length = 0, len(pp) while 1: # sanity check: length should always equal len(pp) if len(pp) != length: print i, pp[i] raise 'FATAL', 'inconsistent length. thought ' + `length` + ', but should really be ' + `len(pp)` if i >= length: break ch = pp[i] i = i + 1 ...
8155ca150930842112da9c64dcc64f9241c80817 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8155ca150930842112da9c64dcc64f9241c80817/partparse.py
oparen = chunk(PLAIN, ch.where, " (") data.insert(0, oparen)
data.insert(0, chunk(PLAIN, ch.where, " ("))
def changeit(buf, pp): global onlylatexspecial, hist, out i, length = 0, len(pp) while 1: # sanity check: length should always equal len(pp) if len(pp) != length: print i, pp[i] raise 'FATAL', 'inconsistent length. thought ' + `length` + ', but should really be ' + `len(pp)` if i >= length: break ch = pp[i] i = i + 1 ...
8155ca150930842112da9c64dcc64f9241c80817 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8155ca150930842112da9c64dcc64f9241c80817/partparse.py
print 'WARNING: found newline in csline arg'
def dumpit(buf, wm, pp): global out i, length = 0, len(pp) addspace = 0 while 1: if len(pp) != length: raise 'FATAL', 'inconsistent length' if i == length: break ch = pp[i] i = i + 1 dospace = addspace addspace = 0 if ch.chtype == chunk_type[CSNAME]: s_buf_data = s(buf, ch.data)
8155ca150930842112da9c64dcc64f9241c80817 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8155ca150930842112da9c64dcc64f9241c80817/partparse.py
if hasattr(sys, "gettotalrefcount"):
if hasattr(set, "test_c_api"):
def test_weakref(self): s = self.thetype('gallahad') p = proxy(s) self.assertEqual(str(p), str(s)) s = None self.assertRaises(ReferenceError, str, p)
cc79ed095a01f1fefd8c4ceab4cf550f27b41cba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cc79ed095a01f1fefd8c4ceab4cf550f27b41cba/test_set.py
_tryorder = os.environ["BROWSER"].split(":")
_tryorder = os.environ["BROWSER"].split(os.pathsep)
def open_new(self, url): self.open(url)
385672311bc6e93887a6ffdfae3423342ca22ab9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/385672311bc6e93887a6ffdfae3423342ca22ab9/webbrowser.py
day = int(mo.group(day)) year = int(mo.group(year)) hour = int(mo.group(hour)) min = int(mo.group(min)) sec = int(mo.group(sec)) zoneh = int(mo.group(zoneh)) zonem = int(mo.group(zonem))
day = int(mo.group('day')) year = int(mo.group('year')) hour = int(mo.group('hour')) min = int(mo.group('min')) sec = int(mo.group('sec')) zoneh = int(mo.group('zoneh')) zonem = int(mo.group('zonem'))
def Internaldate2tuple(resp): """Convert IMAP4 INTERNALDATE to UT. Returns Python time module tuple. """ mo = InternalDate.match(resp) if not mo: return None mon = Mon2num[mo.group('mon')] zonen = mo.group('zonen') day = int(mo.group(day)) year = int(mo.group(year)) hour = int(mo.group(hour)) min = int(mo.group(min...
4e3df4a70e13b2e14affc5edf6019371f0c6033d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4e3df4a70e13b2e14affc5edf6019371f0c6033d/imaplib.py
if __debug__: print "colorizing already scheduled"
if DEBUG: print "colorizing already scheduled"
def notify_range(self, index1, index2=None): self.tag_add("TODO", index1, index2) if self.after_id: if __debug__: print "colorizing already scheduled" return if self.colorizing: self.stop_colorizing = 1 if __debug__: print "stop colorizing" if self.allow_colorizing: if __debug__: print "schedule colorizing" self.after_...
4fe2a7039a545a4d36f56a714ca7de67724d5db9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4fe2a7039a545a4d36f56a714ca7de67724d5db9/ColorDelegator.py
if __debug__: print "stop colorizing"
if DEBUG: print "stop colorizing"
def notify_range(self, index1, index2=None): self.tag_add("TODO", index1, index2) if self.after_id: if __debug__: print "colorizing already scheduled" return if self.colorizing: self.stop_colorizing = 1 if __debug__: print "stop colorizing" if self.allow_colorizing: if __debug__: print "schedule colorizing" self.after_...
4fe2a7039a545a4d36f56a714ca7de67724d5db9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4fe2a7039a545a4d36f56a714ca7de67724d5db9/ColorDelegator.py
if __debug__: print "schedule colorizing"
if DEBUG: print "schedule colorizing"
def notify_range(self, index1, index2=None): self.tag_add("TODO", index1, index2) if self.after_id: if __debug__: print "colorizing already scheduled" return if self.colorizing: self.stop_colorizing = 1 if __debug__: print "stop colorizing" if self.allow_colorizing: if __debug__: print "schedule colorizing" self.after_...
4fe2a7039a545a4d36f56a714ca7de67724d5db9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4fe2a7039a545a4d36f56a714ca7de67724d5db9/ColorDelegator.py
if __debug__: print "cancel scheduled recolorizer"
if DEBUG: print "cancel scheduled recolorizer"
def close(self, close_when_done=None): if self.after_id: after_id = self.after_id self.after_id = None if __debug__: print "cancel scheduled recolorizer" self.after_cancel(after_id) self.allow_colorizing = 0 self.stop_colorizing = 1 if close_when_done: if not self.colorizing: close_when_done.destroy() else: self.close_...
4fe2a7039a545a4d36f56a714ca7de67724d5db9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4fe2a7039a545a4d36f56a714ca7de67724d5db9/ColorDelegator.py
if __debug__: print "cancel scheduled recolorizer"
if DEBUG: print "cancel scheduled recolorizer"
def toggle_colorize_event(self, event): if self.after_id: after_id = self.after_id self.after_id = None if __debug__: print "cancel scheduled recolorizer" self.after_cancel(after_id) if self.allow_colorizing and self.colorizing: if __debug__: print "stop colorizing" self.stop_colorizing = 1 self.allow_colorizing = not ...
4fe2a7039a545a4d36f56a714ca7de67724d5db9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4fe2a7039a545a4d36f56a714ca7de67724d5db9/ColorDelegator.py
if __debug__: print "stop colorizing"
if DEBUG: print "stop colorizing"
def toggle_colorize_event(self, event): if self.after_id: after_id = self.after_id self.after_id = None if __debug__: print "cancel scheduled recolorizer" self.after_cancel(after_id) if self.allow_colorizing and self.colorizing: if __debug__: print "stop colorizing" self.stop_colorizing = 1 self.allow_colorizing = not ...
4fe2a7039a545a4d36f56a714ca7de67724d5db9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4fe2a7039a545a4d36f56a714ca7de67724d5db9/ColorDelegator.py
if __debug__:
if DEBUG:
def toggle_colorize_event(self, event): if self.after_id: after_id = self.after_id self.after_id = None if __debug__: print "cancel scheduled recolorizer" self.after_cancel(after_id) if self.allow_colorizing and self.colorizing: if __debug__: print "stop colorizing" self.stop_colorizing = 1 self.allow_colorizing = not ...
4fe2a7039a545a4d36f56a714ca7de67724d5db9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4fe2a7039a545a4d36f56a714ca7de67724d5db9/ColorDelegator.py
if __debug__: print "no delegate"
if DEBUG: print "no delegate"
def recolorize(self): self.after_id = None if not self.delegate: if __debug__: print "no delegate" return if not self.allow_colorizing: if __debug__: print "auto colorizing is off" return if self.colorizing: if __debug__: print "already colorizing" return try: self.stop_colorizing = 0 self.colorizing = 1 if __debug__: ...
4fe2a7039a545a4d36f56a714ca7de67724d5db9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4fe2a7039a545a4d36f56a714ca7de67724d5db9/ColorDelegator.py
if __debug__: print "auto colorizing is off"
if DEBUG: print "auto colorizing is off"
def recolorize(self): self.after_id = None if not self.delegate: if __debug__: print "no delegate" return if not self.allow_colorizing: if __debug__: print "auto colorizing is off" return if self.colorizing: if __debug__: print "already colorizing" return try: self.stop_colorizing = 0 self.colorizing = 1 if __debug__: ...
4fe2a7039a545a4d36f56a714ca7de67724d5db9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4fe2a7039a545a4d36f56a714ca7de67724d5db9/ColorDelegator.py
if __debug__: print "already colorizing"
if DEBUG: print "already colorizing"
def recolorize(self): self.after_id = None if not self.delegate: if __debug__: print "no delegate" return if not self.allow_colorizing: if __debug__: print "auto colorizing is off" return if self.colorizing: if __debug__: print "already colorizing" return try: self.stop_colorizing = 0 self.colorizing = 1 if __debug__: ...
4fe2a7039a545a4d36f56a714ca7de67724d5db9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4fe2a7039a545a4d36f56a714ca7de67724d5db9/ColorDelegator.py
if __debug__: print "colorizing..."
if DEBUG: print "colorizing..."
def recolorize(self): self.after_id = None if not self.delegate: if __debug__: print "no delegate" return if not self.allow_colorizing: if __debug__: print "auto colorizing is off" return if self.colorizing: if __debug__: print "already colorizing" return try: self.stop_colorizing = 0 self.colorizing = 1 if __debug__: ...
4fe2a7039a545a4d36f56a714ca7de67724d5db9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4fe2a7039a545a4d36f56a714ca7de67724d5db9/ColorDelegator.py
if __debug__: print "%.3f seconds" % (t1-t0)
if DEBUG: print "%.3f seconds" % (t1-t0)
def recolorize(self): self.after_id = None if not self.delegate: if __debug__: print "no delegate" return if not self.allow_colorizing: if __debug__: print "auto colorizing is off" return if self.colorizing: if __debug__: print "already colorizing" return try: self.stop_colorizing = 0 self.colorizing = 1 if __debug__: ...
4fe2a7039a545a4d36f56a714ca7de67724d5db9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4fe2a7039a545a4d36f56a714ca7de67724d5db9/ColorDelegator.py
if __debug__: print "reschedule colorizing"
if DEBUG: print "reschedule colorizing"
def recolorize(self): self.after_id = None if not self.delegate: if __debug__: print "no delegate" return if not self.allow_colorizing: if __debug__: print "auto colorizing is off" return if self.colorizing: if __debug__: print "already colorizing" return try: self.stop_colorizing = 0 self.colorizing = 1 if __debug__: ...
4fe2a7039a545a4d36f56a714ca7de67724d5db9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4fe2a7039a545a4d36f56a714ca7de67724d5db9/ColorDelegator.py
if __debug__: print "colorizing stopped"
if DEBUG: print "colorizing stopped"
def recolorize_main(self): next = "1.0" while 1: item = self.tag_nextrange("TODO", next) if not item: break head, tail = item self.tag_remove("SYNC", head, tail) item = self.tag_prevrange("SYNC", head) if item: head = item[1] else: head = "1.0"
4fe2a7039a545a4d36f56a714ca7de67724d5db9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4fe2a7039a545a4d36f56a714ca7de67724d5db9/ColorDelegator.py
def compile_dir(dir, maxlevels=10, ddir=None, force=0, rx=None):
def compile_dir(dir, maxlevels=10, ddir=None, force=0, rx=None, quiet=0):
def compile_dir(dir, maxlevels=10, ddir=None, force=0, rx=None): """Byte-compile all modules in the given directory tree. Arguments (only dir is required): dir: the directory to byte-compile maxlevels: maximum recursion level (default 10) ddir: if given, purported directory name (this is the directory name...
83a4dbbe38faea87784738af8d69e340d796bf47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/83a4dbbe38faea87784738af8d69e340d796bf47/compileall.py
print 'Listing', dir, '...'
if not quiet: print 'Listing', dir, '...'
def compile_dir(dir, maxlevels=10, ddir=None, force=0, rx=None): """Byte-compile all modules in the given directory tree. Arguments (only dir is required): dir: the directory to byte-compile maxlevels: maximum recursion level (default 10) ddir: if given, purported directory name (this is the directory name...
83a4dbbe38faea87784738af8d69e340d796bf47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/83a4dbbe38faea87784738af8d69e340d796bf47/compileall.py
print 'Compiling', fullname, '...'
if not quiet: print 'Compiling', fullname, '...'
def compile_dir(dir, maxlevels=10, ddir=None, force=0, rx=None): """Byte-compile all modules in the given directory tree. Arguments (only dir is required): dir: the directory to byte-compile maxlevels: maximum recursion level (default 10) ddir: if given, purported directory name (this is the directory name...
83a4dbbe38faea87784738af8d69e340d796bf47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/83a4dbbe38faea87784738af8d69e340d796bf47/compileall.py
if not compile_dir(fullname, maxlevels - 1, dfile, force, rx):
if not compile_dir(fullname, maxlevels - 1, dfile, force, rx, quiet):
def compile_dir(dir, maxlevels=10, ddir=None, force=0, rx=None): """Byte-compile all modules in the given directory tree. Arguments (only dir is required): dir: the directory to byte-compile maxlevels: maximum recursion level (default 10) ddir: if given, purported directory name (this is the directory name...
83a4dbbe38faea87784738af8d69e340d796bf47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/83a4dbbe38faea87784738af8d69e340d796bf47/compileall.py
def compile_path(skip_curdir=1, maxlevels=0, force=0):
def compile_path(skip_curdir=1, maxlevels=0, force=0, quiet=0):
def compile_path(skip_curdir=1, maxlevels=0, force=0): """Byte-compile all module on sys.path. Arguments (all optional): skip_curdir: if true, skip current directory (default true) maxlevels: max recursion level (default 0) force: as for compile_dir() (default 0) """ success = 1 for dir in sys.path: if (not dir or...
83a4dbbe38faea87784738af8d69e340d796bf47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/83a4dbbe38faea87784738af8d69e340d796bf47/compileall.py
success = success and compile_dir(dir, maxlevels, None, force)
success = success and compile_dir(dir, maxlevels, None, force, quiet=quiet)
def compile_path(skip_curdir=1, maxlevels=0, force=0): """Byte-compile all module on sys.path. Arguments (all optional): skip_curdir: if true, skip current directory (default true) maxlevels: max recursion level (default 0) force: as for compile_dir() (default 0) """ success = 1 for dir in sys.path: if (not dir or...
83a4dbbe38faea87784738af8d69e340d796bf47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/83a4dbbe38faea87784738af8d69e340d796bf47/compileall.py
opts, args = getopt.getopt(sys.argv[1:], 'lfd:x:')
opts, args = getopt.getopt(sys.argv[1:], 'lfqd:x:')
def main(): """Script main program.""" import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'lfd:x:') except getopt.error, msg: print msg print "usage: python compileall.py [-l] [-f] [-d destdir] " \ "[-s regexp] [directory ...]" print "-l: don't recurse down" print "-f: force rebuild even if timestamps are up-t...
83a4dbbe38faea87784738af8d69e340d796bf47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/83a4dbbe38faea87784738af8d69e340d796bf47/compileall.py
print "usage: python compileall.py [-l] [-f] [-d destdir] " \
print "usage: python compileall.py [-l] [-f] [-q] [-d destdir] " \
def main(): """Script main program.""" import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'lfd:x:') except getopt.error, msg: print msg print "usage: python compileall.py [-l] [-f] [-d destdir] " \ "[-s regexp] [directory ...]" print "-l: don't recurse down" print "-f: force rebuild even if timestamps are up-t...
83a4dbbe38faea87784738af8d69e340d796bf47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/83a4dbbe38faea87784738af8d69e340d796bf47/compileall.py
if not compile_dir(dir, maxlevels, ddir, force, rx):
if not compile_dir(dir, maxlevels, ddir, force, rx, quiet):
def main(): """Script main program.""" import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'lfd:x:') except getopt.error, msg: print msg print "usage: python compileall.py [-l] [-f] [-d destdir] " \ "[-s regexp] [directory ...]" print "-l: don't recurse down" print "-f: force rebuild even if timestamps are up-t...
83a4dbbe38faea87784738af8d69e340d796bf47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/83a4dbbe38faea87784738af8d69e340d796bf47/compileall.py
self.warn ("file %s (for module %s) not found" % module_file, module)
self.warn ("file %s (for module %s) not found" % (module_file, module))
def check_module (self, module, module_file): if not os.path.isfile (module_file): self.warn ("file %s (for module %s) not found" % module_file, module) return 0 else: return 1
9e8ca7a125e25f76bb2962afdfb237572ee8a816 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9e8ca7a125e25f76bb2962afdfb237572ee8a816/build_py.py
verify(str(c1).find('C instance at ') >= 0)
verify(str(c1).find('C object at ') >= 0)
def __getitem__(self, i): if 0 <= i < 10: return i raise IndexError
aec6f1301c74c527605e5ea54a1cfba8667a5c6b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/aec6f1301c74c527605e5ea54a1cfba8667a5c6b/test_descr.py
verify(str(d1).find('D instance at ') >= 0)
verify(str(d1).find('D object at ') >= 0)
def __getitem__(self, i): if 0 <= i < 10: return i raise IndexError
aec6f1301c74c527605e5ea54a1cfba8667a5c6b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/aec6f1301c74c527605e5ea54a1cfba8667a5c6b/test_descr.py
if '/usr/local/lib' not in self.compiler.library_dirs: self.compiler.library_dirs.insert(0, '/usr/local/lib') if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.insert(0, '/usr/local/include' )
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') add_dir_to_list(self.compiler.library_dirs, sysconfig.get_config_var("LIBDIR")) add_dir_to_list(self.compiler.include_dirs, sysconfig.get_config_var("INCLUDEDIR"))
def detect_modules(self): # Ensure that /usr/local is always used if '/usr/local/lib' not in self.compiler.library_dirs: self.compiler.library_dirs.insert(0, '/usr/local/lib') if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.insert(0, '/usr/local/include' )
4c979ee99b7c85f54aaa147c6f8177a09623c076 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4c979ee99b7c85f54aaa147c6f8177a09623c076/setup.py
_StringType = type('')
_StringTypes = (str, unicode)
def rfind(s, *args): """rfind(s, sub [,start [,end]]) -> int Return the highest index in s where substring sub is found, such that sub is contained within s[start,end]. Optional arguments start and end are interpreted as in slice notation. Return -1 on failure. """ return s.rfind(*args)
3b389da9947b3ac3d6a1e5af3ac546f3b14f8356 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3b389da9947b3ac3d6a1e5af3ac546f3b14f8356/string.py
if type(x) == type(''): s = x else: s = `x` n = len(s) if n >= width: return s
if not isinstance(x, _StringTypes): x = str(x) n = len(x) if n >= width: return x
def zfill(x, width): """zfill(x, width) -> string Pad a numeric string x with zeros on the left, to fill a field of the specified width. The string x is never truncated. """ if type(x) == type(''): s = x else: s = `x` n = len(s) if n >= width: return s sign = '' if s[0] in ('-', '+'): sign, s = s[0], s[1:] return si...
3b389da9947b3ac3d6a1e5af3ac546f3b14f8356 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3b389da9947b3ac3d6a1e5af3ac546f3b14f8356/string.py
if s[0] in ('-', '+'): sign, s = s[0], s[1:] return sign + '0'*(width-n) + s
if x[0] in '-+': sign, x = x[0], x[1:] return sign + '0'*(width-n) + x
def zfill(x, width): """zfill(x, width) -> string Pad a numeric string x with zeros on the left, to fill a field of the specified width. The string x is never truncated. """ if type(x) == type(''): s = x else: s = `x` n = len(s) if n >= width: return s sign = '' if s[0] in ('-', '+'): sign, s = s[0], s[1:] return si...
3b389da9947b3ac3d6a1e5af3ac546f3b14f8356 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3b389da9947b3ac3d6a1e5af3ac546f3b14f8356/string.py
accept = accept + string.split(line[7:])
accept = accept + string.split(line[7:], ',')
def run_cgi(self): """Execute a CGI script.""" dir, rest = self.cgi_info i = string.rfind(rest, '?') if i >= 0: rest, query = rest[:i], rest[i+1:] else: query = '' i = string.find(rest, '/') if i >= 0: script, rest = rest[:i], rest[i:] else: script, rest = rest, '' scriptname = dir + '/' + script scriptfile = self.tran...
0ed3df879f1efecfcede235201aad9d6d889dd0e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0ed3df879f1efecfcede235201aad9d6d889dd0e/CGIHTTPServer.py