rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
self.failures.append((test, self._exc_info_to_string(err))) | self.failures.append((test, self._exc_info_to_string(err, test))) | def addFailure(self, test, err): """Called when an error has occurred. 'err' is a tuple of values as returned by sys.exc_info().""" self.failures.append((test, self._exc_info_to_string(err))) | b8d5f245b7077d869121835ed72656ac14962ef0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b8d5f245b7077d869121835ed72656ac14962ef0/unittest.py |
def _exc_info_to_string(self, err): | def _exc_info_to_string(self, err, test): | def _exc_info_to_string(self, err): """Converts a sys.exc_info()-style tuple of values into a string.""" return ''.join(traceback.format_exception(*err)) | b8d5f245b7077d869121835ed72656ac14962ef0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b8d5f245b7077d869121835ed72656ac14962ef0/unittest.py |
return ''.join(traceback.format_exception(*err)) | exctype, value, tb = err while tb and self._is_relevant_tb_level(tb): tb = tb.tb_next if exctype is test.failureException: length = self._count_relevant_tb_levels(tb) return ''.join(traceback.format_exception(exctype, value, tb, length)) return ''.join(traceback.format_exception(exctype, value, tb)) def _is_relevant... | def _exc_info_to_string(self, err): """Converts a sys.exc_info()-style tuple of values into a string.""" return ''.join(traceback.format_exception(*err)) | b8d5f245b7077d869121835ed72656ac14962ef0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b8d5f245b7077d869121835ed72656ac14962ef0/unittest.py |
def __repr__(self): return "<%s run=%i errors=%i failures=%i>" % \ (_strclass(self.__class__), self.testsRun, len(self.errors), len(self.failures)) | b8d5f245b7077d869121835ed72656ac14962ef0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b8d5f245b7077d869121835ed72656ac14962ef0/unittest.py | ||
newtb = tb.tb_next if newtb is None: return (exctype, excvalue, tb) return (exctype, excvalue, newtb) | return (exctype, excvalue, tb) | def __exc_info(self): """Return a version of sys.exc_info() with the traceback frame minimised; usually the top level of the traceback frame is not needed. """ exctype, excvalue, tb = sys.exc_info() if sys.platform[:4] == 'java': ## tracebacks look different in Jython return (exctype, excvalue, tb) newtb = tb.tb_next i... | b8d5f245b7077d869121835ed72656ac14962ef0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b8d5f245b7077d869121835ed72656ac14962ef0/unittest.py |
req_host, erhn = eff_request_host(request) strict_non_domain = ( self._policy.strict_ns_domain & self._policy.DomainStrictNonDomain) | def add_cookie_header(self, request): """Add correct Cookie: header to request (urllib2.Request object). | bc6a1953443deac59dc950f2f2b12c8b0a2e0338 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bc6a1953443deac59dc950f2f2b12c8b0a2e0338/cookielib.py | |
def __init__(self, name=""): """Construct a TarInfo object. name is the optional name of the member. """ | 2527f7fee0f20946aa3162fae4ffe6181aee1eb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2527f7fee0f20946aa3162fae4ffe6181aee1eb1/tarfile.py | ||
self.prefix = "" | def __init__(self, name=""): """Construct a TarInfo object. name is the optional name of the member. """ | 2527f7fee0f20946aa3162fae4ffe6181aee1eb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2527f7fee0f20946aa3162fae4ffe6181aee1eb1/tarfile.py | |
tarinfo.prefix = buf[345:500] | prefix = buf[345:500].rstrip(NUL) if prefix and not tarinfo.issparse(): tarinfo.name = prefix + "/" + tarinfo.name | def frombuf(cls, buf): """Construct a TarInfo object from a 512 byte string buffer. """ if len(buf) != BLOCKSIZE: raise ValueError("truncated header") if buf.count(NUL) == BLOCKSIZE: raise ValueError("empty header") | 2527f7fee0f20946aa3162fae4ffe6181aee1eb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2527f7fee0f20946aa3162fae4ffe6181aee1eb1/tarfile.py |
"""Return a tar header block as a 512 byte string. """ | """Return a tar header as a string of 512 byte blocks. """ buf = "" type = self.type prefix = "" if self.name.endswith("/"): type = DIRTYPE name = normpath(self.name) if type == DIRTYPE: name += "/" linkname = self.linkname if linkname: linkname = normpath(linkname) if posix: if self.size > MAXSIZE_MEMBER: raise... | def tobuf(self, posix=False): """Return a tar header block as a 512 byte string. """ parts = [ stn(self.name, 100), itn(self.mode & 07777, 8, posix), itn(self.uid, 8, posix), itn(self.gid, 8, posix), itn(self.size, 12, posix), itn(self.mtime, 12, posix), " ", # checksum field self.type, stn(self.linkname, 100), ... | 2527f7fee0f20946aa3162fae4ffe6181aee1eb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2527f7fee0f20946aa3162fae4ffe6181aee1eb1/tarfile.py |
stn(self.name, 100), | stn(name, 100), | def tobuf(self, posix=False): """Return a tar header block as a 512 byte string. """ parts = [ stn(self.name, 100), itn(self.mode & 07777, 8, posix), itn(self.uid, 8, posix), itn(self.gid, 8, posix), itn(self.size, 12, posix), itn(self.mtime, 12, posix), " ", # checksum field self.type, stn(self.linkname, 100), ... | 2527f7fee0f20946aa3162fae4ffe6181aee1eb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2527f7fee0f20946aa3162fae4ffe6181aee1eb1/tarfile.py |
self.type, | type, | def tobuf(self, posix=False): """Return a tar header block as a 512 byte string. """ parts = [ stn(self.name, 100), itn(self.mode & 07777, 8, posix), itn(self.uid, 8, posix), itn(self.gid, 8, posix), itn(self.size, 12, posix), itn(self.mtime, 12, posix), " ", # checksum field self.type, stn(self.linkname, 100), ... | 2527f7fee0f20946aa3162fae4ffe6181aee1eb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2527f7fee0f20946aa3162fae4ffe6181aee1eb1/tarfile.py |
stn(self.prefix, 155) | stn(prefix, 155) | def tobuf(self, posix=False): """Return a tar header block as a 512 byte string. """ parts = [ stn(self.name, 100), itn(self.mode & 07777, 8, posix), itn(self.uid, 8, posix), itn(self.gid, 8, posix), itn(self.size, 12, posix), itn(self.mtime, 12, posix), " ", # checksum field self.type, stn(self.linkname, 100), ... | 2527f7fee0f20946aa3162fae4ffe6181aee1eb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2527f7fee0f20946aa3162fae4ffe6181aee1eb1/tarfile.py |
buf = struct.pack("%ds" % BLOCKSIZE, "".join(parts)) | buf += struct.pack("%ds" % BLOCKSIZE, "".join(parts)) | def tobuf(self, posix=False): """Return a tar header block as a 512 byte string. """ parts = [ stn(self.name, 100), itn(self.mode & 07777, 8, posix), itn(self.uid, 8, posix), itn(self.gid, 8, posix), itn(self.size, 12, posix), itn(self.mtime, 12, posix), " ", # checksum field self.type, stn(self.linkname, 100), ... | 2527f7fee0f20946aa3162fae4ffe6181aee1eb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2527f7fee0f20946aa3162fae4ffe6181aee1eb1/tarfile.py |
buf = buf[:148] + "%06o\0" % chksum + buf[155:] | buf = buf[:-364] + "%06o\0" % chksum + buf[-357:] | def tobuf(self, posix=False): """Return a tar header block as a 512 byte string. """ parts = [ stn(self.name, 100), itn(self.mode & 07777, 8, posix), itn(self.uid, 8, posix), itn(self.gid, 8, posix), itn(self.size, 12, posix), itn(self.mtime, 12, posix), " ", # checksum field self.type, stn(self.linkname, 100), ... | 2527f7fee0f20946aa3162fae4ffe6181aee1eb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2527f7fee0f20946aa3162fae4ffe6181aee1eb1/tarfile.py |
tarinfo.name = normpath(tarinfo.name) if tarinfo.isdir(): tarinfo.name += "/" if tarinfo.linkname: tarinfo.linkname = normpath(tarinfo.linkname) if tarinfo.size > MAXSIZE_MEMBER: if self.posix: raise ValueError("file is too large (>= 8 GB)") else: self._dbg(2, "tarfile: Created GNU tar largefile header") if len(ta... | tarinfo = copy.copy(tarinfo) buf = tarinfo.tobuf(self.posix) self.fileobj.write(buf) self.offset += len(buf) | def addfile(self, tarinfo, fileobj=None): """Add the TarInfo object `tarinfo' to the archive. If `fileobj' is given, tarinfo.size bytes are read from it and added to the archive. You can create TarInfo objects using gettarinfo(). On Windows platforms, `fileobj' should always be opened with mode 'rb' to avoid irritation... | 2527f7fee0f20946aa3162fae4ffe6181aee1eb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2527f7fee0f20946aa3162fae4ffe6181aee1eb1/tarfile.py |
tarinfo.name = normpath(os.path.join(tarinfo.prefix.rstrip(NUL), tarinfo.name)) | def next(self): """Return the next member of the archive as a TarInfo object, when TarFile is opened for reading. Return None if there is no more available. """ self._check("ra") if self.firstmember is not None: m = self.firstmember self.firstmember = None return m | 2527f7fee0f20946aa3162fae4ffe6181aee1eb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2527f7fee0f20946aa3162fae4ffe6181aee1eb1/tarfile.py | |
tarinfo.prefix = "" | def proc_sparse(self, tarinfo): """Process a GNU sparse header plus extra headers. """ buf = tarinfo.buf sp = _ringbuffer() pos = 386 lastpos = 0L realpos = 0L # There are 4 possible sparse structs in the # first header. for i in xrange(4): try: offset = nti(buf[pos:pos + 12]) numbytes = nti(buf[pos + 12:pos + 24]) exc... | 2527f7fee0f20946aa3162fae4ffe6181aee1eb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2527f7fee0f20946aa3162fae4ffe6181aee1eb1/tarfile.py | |
def _create_gnulong(self, name, type): """Write a GNU longname/longlink member to the TarFile. It consists of an extended tar header, with the length of the longname as size, followed by data blocks, which contain the longname as a null terminated string. """ name += NUL tarinfo = TarInfo() tarinfo.name = "././@LongL... | def __iter__(self): """Provide an iterator object. """ if self._loaded: return iter(self.members) else: return TarIter(self) | 2527f7fee0f20946aa3162fae4ffe6181aee1eb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2527f7fee0f20946aa3162fae4ffe6181aee1eb1/tarfile.py | |
refnum, dirid = macfs.FindFolder(MACFS.kOnSystemDisk, MACFS.kTemporaryFolderType, 0) | refnum, dirid = macfs.FindFolder(MACFS.kOnSystemDisk, MACFS.kTemporaryFolderType, 0) | def gettempdir(): global tempdir if tempdir is not None: return tempdir attempdirs = ['/usr/tmp', '/tmp', os.getcwd(), os.curdir] if os.name == 'nt': attempdirs.insert(0, 'C:\\TEMP') attempdirs.insert(0, '\\TEMP') elif os.name == 'mac': import macfs, MACFS try: refnum, dirid = macfs.FindFolder(MACFS.kOnSystemDisk, MACF... | b8c42c9825d57d35149c078cf950ccde1e8802b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b8c42c9825d57d35149c078cf950ccde1e8802b4/tempfile.py |
def mktemp(): | def mktemp(suffix=""): | def mktemp(): global counter dir = gettempdir() pre = gettempprefix() while 1: counter = counter + 1 file = os.path.join(dir, pre + `counter`) if not os.path.exists(file): return file | b8c42c9825d57d35149c078cf950ccde1e8802b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b8c42c9825d57d35149c078cf950ccde1e8802b4/tempfile.py |
file = os.path.join(dir, pre + `counter`) | file = os.path.join(dir, pre + `counter` + suffix) | def mktemp(): global counter dir = gettempdir() pre = gettempprefix() while 1: counter = counter + 1 file = os.path.join(dir, pre + `counter`) if not os.path.exists(file): return file | b8c42c9825d57d35149c078cf950ccde1e8802b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b8c42c9825d57d35149c078cf950ccde1e8802b4/tempfile.py |
self.file=file self.path=path | self.file = file self.path = path | def __init__(self, file, path): | b8c42c9825d57d35149c078cf950ccde1e8802b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b8c42c9825d57d35149c078cf950ccde1e8802b4/tempfile.py |
file=self.__dict__['file'] a=getattr(file, name) | file = self.__dict__['file'] a = getattr(file, name) | def __getattr__(self, name): | b8c42c9825d57d35149c078cf950ccde1e8802b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b8c42c9825d57d35149c078cf950ccde1e8802b4/tempfile.py |
raise error, 'option --%s requires argument' % opt | raise GetoptError('option --%s requires argument' % opt, opt) | def do_longs(opts, opt, longopts, args): try: i = string.index(opt, '=') opt, optarg = opt[:i], opt[i+1:] except ValueError: optarg = None has_arg, opt = long_has_args(opt, longopts) if has_arg: if optarg is None: if not args: raise error, 'option --%s requires argument' % opt optarg, args = args[0], args[1:] elif opt... | 80c33e562ddcc0af4eed6708aa30603972e62cfc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/80c33e562ddcc0af4eed6708aa30603972e62cfc/getopt.py |
raise error, 'option --%s must not have an argument' % opt | raise GetoptError('option --%s must not have an argument' % opt, opt) | def do_longs(opts, opt, longopts, args): try: i = string.index(opt, '=') opt, optarg = opt[:i], opt[i+1:] except ValueError: optarg = None has_arg, opt = long_has_args(opt, longopts) if has_arg: if optarg is None: if not args: raise error, 'option --%s requires argument' % opt optarg, args = args[0], args[1:] elif opt... | 80c33e562ddcc0af4eed6708aa30603972e62cfc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/80c33e562ddcc0af4eed6708aa30603972e62cfc/getopt.py |
raise error, 'option --%s not a unique prefix' % opt | raise GetoptError('option --%s not a unique prefix' % opt, opt) | def long_has_args(opt, longopts): optlen = len(opt) for i in range(len(longopts)): x, y = longopts[i][:optlen], longopts[i][optlen:] if opt != x: continue if y != '' and y != '=' and i+1 < len(longopts): if opt == longopts[i+1][:optlen]: raise error, 'option --%s not a unique prefix' % opt if longopts[i][-1:] in ('=', ... | 80c33e562ddcc0af4eed6708aa30603972e62cfc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/80c33e562ddcc0af4eed6708aa30603972e62cfc/getopt.py |
raise error, 'option --' + opt + ' not recognized' | raise GetoptError('option --%s not recognized' % opt, opt) | def long_has_args(opt, longopts): optlen = len(opt) for i in range(len(longopts)): x, y = longopts[i][:optlen], longopts[i][optlen:] if opt != x: continue if y != '' and y != '=' and i+1 < len(longopts): if opt == longopts[i+1][:optlen]: raise error, 'option --%s not a unique prefix' % opt if longopts[i][-1:] in ('=', ... | 80c33e562ddcc0af4eed6708aa30603972e62cfc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/80c33e562ddcc0af4eed6708aa30603972e62cfc/getopt.py |
raise error, 'option -%s requires argument' % opt | raise GetoptError('option -%s requires argument' % opt, opt) | def do_shorts(opts, optstring, shortopts, args): while optstring != '': opt, optstring = optstring[0], optstring[1:] if short_has_arg(opt, shortopts): if optstring == '': if not args: raise error, 'option -%s requires argument' % opt optstring, args = args[0], args[1:] optarg, optstring = optstring, '' else: optarg = '... | 80c33e562ddcc0af4eed6708aa30603972e62cfc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/80c33e562ddcc0af4eed6708aa30603972e62cfc/getopt.py |
raise error, 'option -%s not recognized' % opt | raise GetoptError('option -%s not recognized' % opt, opt) | def short_has_arg(opt, shortopts): for i in range(len(shortopts)): if opt == shortopts[i] != ':': return shortopts[i+1:i+2] == ':' raise error, 'option -%s not recognized' % opt | 80c33e562ddcc0af4eed6708aa30603972e62cfc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/80c33e562ddcc0af4eed6708aa30603972e62cfc/getopt.py |
self.status = status = int(status) | try: self.status = status = int(status) if status < 100 or status > 999: raise BadStatusLine(line) except ValueError: raise BadStatusLine(line) | def begin(self): if self.msg is not None: # we've already started reading the response return | 23d40477909054d8c0e7459601093ba750b4ea8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/23d40477909054d8c0e7459601093ba750b4ea8b/httplib.py |
print "Distribution.parse_config_files():" | if DEBUG: print "Distribution.parse_config_files():" | def parse_config_files (self, filenames=None): | 2bd3f4250d59cabc0dda29fc3289beda315ce06a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2bd3f4250d59cabc0dda29fc3289beda315ce06a/dist.py |
print " reading", filename | if DEBUG: print " reading", filename | def parse_config_files (self, filenames=None): | 2bd3f4250d59cabc0dda29fc3289beda315ce06a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2bd3f4250d59cabc0dda29fc3289beda315ce06a/dist.py |
print "showing 'global' help; commands=", self.commands | def parse_command_line (self, args): """Parse the setup script's command line. 'args' must be a list of command-line arguments, most likely 'sys.argv[1:]' (see the 'setup()' function). This list is first processed for "global options" -- options that set attributes of the Distribution instance. Then, it is alternate... | 2bd3f4250d59cabc0dda29fc3289beda315ce06a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2bd3f4250d59cabc0dda29fc3289beda315ce06a/dist.py | |
print "showing help for command", cmd_class | def _parse_command_opts (self, parser, args): """Parse the command-line options for a single command. 'parser' must be a FancyGetopt instance; 'args' must be the list of arguments, starting with the current command (whose options we are about to parse). Returns a new version of 'args' with the next command at the fron... | 2bd3f4250d59cabc0dda29fc3289beda315ce06a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2bd3f4250d59cabc0dda29fc3289beda315ce06a/dist.py | |
print "Distribution.get_command_obj(): " \ "creating '%s' command object" % command | if DEBUG: print "Distribution.get_command_obj(): " \ "creating '%s' command object" % command | def get_command_obj (self, command, create=1): """Return the command object for 'command'. Normally this object is cached on a previous call to 'get_command_obj()'; if no comand object for 'command' is in the cache, then we either create and return it (if 'create' is true) or return None. """ cmd_obj = self.command_ob... | 2bd3f4250d59cabc0dda29fc3289beda315ce06a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2bd3f4250d59cabc0dda29fc3289beda315ce06a/dist.py |
archive_basename = os.path.join(self.bdist_dir, "%s.win32" % fullname) | def run (self): if (sys.platform != "win32" and (self.distribution.has_ext_modules() or self.distribution.has_c_libraries())): raise DistutilsPlatformError \ ("distribution contains extensions and/or C libraries; " "must be compiled on a Windows 32 platform") | c7cb9ed35f878d6ac31c5b746f8b15abcc3be54d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c7cb9ed35f878d6ac31c5b746f8b15abcc3be54d/bdist_wininst.py | |
verify(C.__dynamic__ == 0) | verify(S.__dynamic__ == 0) | def dynamics(): if verbose: print "Testing __dynamic__..." verify(object.__dynamic__ == 0) verify(list.__dynamic__ == 0) class S1: __metaclass__ = type verify(S1.__dynamic__ == 0) class S(object): pass verify(C.__dynamic__ == 0) class D(object): __dynamic__ = 1 verify(D.__dynamic__ == 1) class E(D, S): pass verify(E.__... | 9d4fe4298ece1acf3401c6b4849d2cb56238d710 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9d4fe4298ece1acf3401c6b4849d2cb56238d710/test_descr.py |
def run_tests(): for input, output, kind in ((exec_tests, exec_results, "exec"), (single_tests, single_results, "single"), (eval_tests, eval_results, "eval")): for i, o in itertools.izip(input, output): ast_tree = compile(i, "?", kind, 0x400) # XXX(nnorwitz): these prints seem to be only for debugging. # If they are r... | 1b6cab65319a4374e2f93c3b8b247c9642489d1e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1b6cab65319a4374e2f93c3b8b247c9642489d1e/test_ast.py | ||
def check_close(x, y): | def check_close_real(x, y, eps=1e-9): """Return true iff floats x and y "are close\"""" if abs(x) > abs(y): x, y = y, x if y == 0: return abs(x) < eps if x == 0: return abs(y) < eps return abs((x-y)/y) < eps def check_close(x, y, eps=1e-9): | def check_close(x, y): """Return true iff complexes x and y "are close\"""" return fcmp(x.real, y.real) == 0 == fcmp(x.imag, y.imag) | c5b235c59c956ec972521ac0b0e5dc3aa56ca19a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c5b235c59c956ec972521ac0b0e5dc3aa56ca19a/test_complex.py |
return fcmp(x.real, y.real) == 0 == fcmp(x.imag, y.imag) | return check_close_real(x.real, y.real, eps) and \ check_close_real(x.imag, y.imag, eps) | def check_close(x, y): """Return true iff complexes x and y "are close\"""" return fcmp(x.real, y.real) == 0 == fcmp(x.imag, y.imag) | c5b235c59c956ec972521ac0b0e5dc3aa56ca19a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c5b235c59c956ec972521ac0b0e5dc3aa56ca19a/test_complex.py |
Continuation are represented by an embedded newline then | Continuations are represented by an embedded newline then | def _read(self, fp, fpname): """Parse a sectioned setup file. | 9050a517c8393a473b42333281e36ec35370af35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9050a517c8393a473b42333281e36ec35370af35/ConfigParser.py |
and just about everything else is ignored. | and just about everything else are ignored. | def _read(self, fp, fpname): """Parse a sectioned setup file. | 9050a517c8393a473b42333281e36ec35370af35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9050a517c8393a473b42333281e36ec35370af35/ConfigParser.py |
self.log_error("command: %s", cmdline) | self.log_message("command: %s", cmdline) | def run_cgi(self): """Execute a CGI script.""" dir, rest = self.cgi_info i = rest.rfind('?') if i >= 0: rest, query = rest[:i], rest[i+1:] else: query = '' i = rest.find('/') if i >= 0: script, rest = rest[:i], rest[i:] else: script, rest = rest, '' scriptname = dir + '/' + script scriptfile = self.translate_path(scrip... | bcbdc95e90794794081927b81006ce8563974969 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bcbdc95e90794794081927b81006ce8563974969/CGIHTTPServer.py |
self.log_error("CGI script exited OK") | self.log_message("CGI script exited OK") | def run_cgi(self): """Execute a CGI script.""" dir, rest = self.cgi_info i = rest.rfind('?') if i >= 0: rest, query = rest[:i], rest[i+1:] else: query = '' i = rest.find('/') if i >= 0: script, rest = rest[:i], rest[i:] else: script, rest = rest, '' scriptname = dir + '/' + script scriptfile = self.translate_path(scrip... | bcbdc95e90794794081927b81006ce8563974969 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bcbdc95e90794794081927b81006ce8563974969/CGIHTTPServer.py |
self.log_error("CGI script exited OK") | self.log_message("CGI script exited OK") | def run_cgi(self): """Execute a CGI script.""" dir, rest = self.cgi_info i = rest.rfind('?') if i >= 0: rest, query = rest[:i], rest[i+1:] else: query = '' i = rest.find('/') if i >= 0: script, rest = rest[:i], rest[i:] else: script, rest = rest, '' scriptname = dir + '/' + script scriptfile = self.translate_path(scrip... | bcbdc95e90794794081927b81006ce8563974969 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bcbdc95e90794794081927b81006ce8563974969/CGIHTTPServer.py |
return self.data.has_key(ref(key)) | try: wr = ref(key) except TypeError: return 0 return self.data.has_key(wr) | def has_key(self, key): return self.data.has_key(ref(key)) | 3bae7ddf8e63889b185235f85a6695bc05d59059 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3bae7ddf8e63889b185235f85a6695bc05d59059/weakref.py |
self.includepath = [':', INCLUDEDIR] | self.includepath = [os.curdir, INCLUDEDIR] | def initpaths(self): self.includepath = [':', INCLUDEDIR] | ac7cb05415af57b3752d4e26df9201f91ff0a339 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ac7cb05415af57b3752d4e26df9201f91ff0a339/scantools.py |
if MacOS: | if MacOS and CREATOR: | def initosspecifics(self): if MacOS: self.filetype = 'TEXT' self.filecreator = CREATOR else: self.filetype = self.filecreator = None | ac7cb05415af57b3752d4e26df9201f91ff0a339 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ac7cb05415af57b3752d4e26df9201f91ff0a339/scantools.py |
def err(args): | def err(*args): | def err(args): savestdout = sys.stdout try: sys.stdout = sys.stderr for i in args: print i, print finally: sys.stdout = savestdout | 064a62bc8a5b4e766dedc7afa83dc9b23267fccc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/064a62bc8a5b4e766dedc7afa83dc9b23267fccc/cgen.py |
e = 'Function', func, 'too complicated:' err(e + (a_type, a_mode, a_factor, a_sub)) | err('Function', func, 'too complicated:', a_type, a_mode, a_factor, a_sub) | def generate(type, func, database): # # Check that we can handle this case: # no variable size reply arrays yet # n_in_args = 0 n_out_args = 0 # for a_type, a_mode, a_factor, a_sub in database: if a_mode == 's': n_in_args = n_in_args + 1 elif a_mode == 'r': n_out_args = n_out_args + 1 else: # Can't happen raise arg_err... | 064a62bc8a5b4e766dedc7afa83dc9b23267fccc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/064a62bc8a5b4e766dedc7afa83dc9b23267fccc/cgen.py |
self._arrow = _canvas.create_line(x-dx,y+dy,x,y, | self._arrow = self._canvas.create_line(x-dx,y+dy,x,y, | def _draw_turtle(self,position=[]): if not self._tracing: return if position == []: position = self._position x,y = position distance = 8 dx = distance * cos(self._angle*self._invradian) dy = distance * sin(self._angle*self._invradian) self._delete_turtle() self._arrow = _canvas.create_line(x-dx,y+dy,x,y, width=self._w... | 4157ffbb96865c38facfceb2456dbd8b101d1e62 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4157ffbb96865c38facfceb2456dbd8b101d1e62/turtle.py |
def __init__(self, get, set=None): | def __init__(self, get, set=None, delete=None): | def __init__(self, get, set=None): self.__get = get self.__set = set | 0dbab4c560c944956e4b732fe33ba0d72a8fb6df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0dbab4c560c944956e4b732fe33ba0d72a8fb6df/test_descr.py |
x = computed_attribute(__get_x, __set_x) | def __delete_x(self): del self.__x x = computed_attribute(__get_x, __set_x, __delete_x) | def __set_x(self, x): self.__x = x | 0dbab4c560c944956e4b732fe33ba0d72a8fb6df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0dbab4c560c944956e4b732fe33ba0d72a8fb6df/test_descr.py |
C.x.__delete__(a) verify(not hasattr(a, "x")) | def delx(self): del self.__x | 0dbab4c560c944956e4b732fe33ba0d72a8fb6df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0dbab4c560c944956e4b732fe33ba0d72a8fb6df/test_descr.py | |
def pop (self): if self.list: result = self.list[0] del self.list[0] return (1, result) else: return (0, None) | c63a396c5fc55beeaf3c973f137e160fc844d5a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c63a396c5fc55beeaf3c973f137e160fc844d5a6/asynchat.py | ||
def pop (self): if self.list: result = self.list[0] del self.list[0] return (1, result) else: return (0, None) | c63a396c5fc55beeaf3c973f137e160fc844d5a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c63a396c5fc55beeaf3c973f137e160fc844d5a6/asynchat.py | ||
def start_a(self, attributes): self.link_attr(attributes, 'href') | def check_name_id( self, attributes ): """ Check the name or id attributes on an element. """ | def start_a(self, attributes): self.link_attr(attributes, 'href') | a982c445430355b1e162a2083d7caa28a67c70ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a982c445430355b1e162a2083d7caa28a67c70ba/webchecker.py |
if name == "name": | if name == "name" or name == "id": | def start_a(self, attributes): self.link_attr(attributes, 'href') | a982c445430355b1e162a2083d7caa28a67c70ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a982c445430355b1e162a2083d7caa28a67c70ba/webchecker.py |
self.checker.message("WARNING: duplicate name %s in %s", | self.checker.message("WARNING: duplicate ID name %s in %s", | def start_a(self, attributes): self.link_attr(attributes, 'href') | a982c445430355b1e162a2083d7caa28a67c70ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a982c445430355b1e162a2083d7caa28a67c70ba/webchecker.py |
self.create_exe(arcname, fullname) | self.create_exe(arcname, fullname, self.bitmap) | def run (self): if (sys.platform != "win32" and (self.distribution.has_ext_modules() or self.distribution.has_c_libraries())): raise DistutilsPlatformError \ ("distribution contains extensions and/or C libraries; " "must be compiled on a Windows 32 platform") | e09f63949dc67cc8d9d40bebc278a55ef6ac777c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e09f63949dc67cc8d9d40bebc278a55ef6ac777c/bdist_wininst.py |
title = self.distribution.get_fullname() | title = self.title or self.distribution.get_fullname() | def get_inidata (self): # Return data describing the installation. | e09f63949dc67cc8d9d40bebc278a55ef6ac777c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e09f63949dc67cc8d9d40bebc278a55ef6ac777c/bdist_wininst.py |
def create_exe (self, arcname, fullname): | def create_exe (self, arcname, fullname, bitmap=None): | def create_exe (self, arcname, fullname): import struct | e09f63949dc67cc8d9d40bebc278a55ef6ac777c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e09f63949dc67cc8d9d40bebc278a55ef6ac777c/bdist_wininst.py |
header = struct.pack("<ii", 0x12345679, len(cfgdata)) | header = struct.pack("<iii", 0x1234567A, len(cfgdata), bitmaplen, ) | def create_exe (self, arcname, fullname): import struct | e09f63949dc67cc8d9d40bebc278a55ef6ac777c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e09f63949dc67cc8d9d40bebc278a55ef6ac777c/bdist_wininst.py |
AAAA8AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v ZGUuDQ0KJAAAAAAAAABwj7aMNO7Y3zTu2N807tjfT/LU3zXu2N+38tbfNu7Y39zx3N827tjfVvHL 3zzu2N807tnfae7Y3zTu2N857tjf3PHS3znu2N+M6N7fNe7Y31JpY2g07tjfAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAUEUAAEwBAwAu6+E5AAAAAAAAAADgAA8BCwEGAABAAAAAEAAAAJAAAPDUAAAA oAAAAOAAAAAA... | AAAA4AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v ZGUuDQ0KJAAAAAAAAABwr7eMNM7Z3zTO2d80ztnfT9LV3zXO2d+30tffNs7Z39zR3d82ztnfVtHK 3zzO2d80ztjfVM7Z3zTO2d85ztnf3NHT3znO2d+MyN/fNc7Z31JpY2g0ztnfAAAAAAAAAABQRQAA TAEDAG/hkDoAAAAAAAAAAOAADwELAQYAAEAAAAAQAAAAkAAAwNUAAACgAAAA4AAAAABAAAAQAAAA AgAABAAAAAAA... | def get_exe_bytes (self): import base64 return base64.decodestring(EXEDATA) | e09f63949dc67cc8d9d40bebc278a55ef6ac777c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e09f63949dc67cc8d9d40bebc278a55ef6ac777c/bdist_wininst.py |
bGwgUmlnaHRzIFJlc2VydmVkLiAkCgBVUFghDAkCCl/uS+s25ddS0bYAAO40AAAAsAAAJgEAkP+/ /f9TVVaLdCQUhfZXdHaLfAi9EHBAAIA+AHRoalxWbP/29v8V/GANi/BZHll0V4AmAFcRmP833//Y g/v/dR5qD5SFwHUROUQkHHQLV9na//9VagX/VCQog8QM9sMQdR1otwAAJJD/T9itg10cACHGBlxG dZNqAVhfXu/u/v9dW8NVi+yD7AxTVleLPXguM/a7OsA5dQjt7d39dQfHRQgBDFZogE0RVlZTBfsz 9v8M/9eD+P+J... | bGwgUmlnaHRzIFJlc2VydmVkLiAkCgBVUFghDAkCCqpen60jTE6a87YAALo1AAAAsAAAJgcAZP/b //9TVVaLdCQUhfZXdH2LbCQci3wMgD4AdHBqXFb/5vZv/xUIYUAAi/BZHVl0X4AmAFcReGD9v/n+ 2IP7/3Unag98hcB1E4XtdA9XaBBw/d/+vw1qBf/Vg8QM6wdXagEJWVn2wxB1HGi3ABOyna0ALYAp Dcb3/3/7BlxGdYssWF9eXVvDVYvsg+wMU1ZXiz2ILe/uf3cz9rs5wDl1CHUHx0UIAQxWaIBMsf9v bxFWVlMFDP/X... | def get_exe_bytes (self): import base64 return base64.decodestring(EXEDATA) | e09f63949dc67cc8d9d40bebc278a55ef6ac777c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e09f63949dc67cc8d9d40bebc278a55ef6ac777c/bdist_wininst.py |
eGl0AABFbmRQYWludAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | eGl0AABHZXREQwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | def get_exe_bytes (self): import base64 return base64.decodestring(EXEDATA) | e09f63949dc67cc8d9d40bebc278a55ef6ac777c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e09f63949dc67cc8d9d40bebc278a55ef6ac777c/bdist_wininst.py |
except string.atoi_error: port = None | except string.atoi_error: pass | def connect(self, host, *args): if args: if args[1:]: raise TypeError, 'too many args' port = args[0] else: i = string.find(host, ':') if i >= 0: host, port = host[:i], host[i+1:] try: port = string.atoi(port) except string.atoi_error: port = None if not port: port = HTTP_PORT self.sock = socket.socket(socket.AF_INET, ... | 76ca3c17f0922c17b6da43f7345b4f26cff854bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/76ca3c17f0922c17b6da43f7345b4f26cff854bc/httplib.py |
writer.write("\n PUBLIC '%s'\n '%s'" % (self.publicId, self.systemId)) | writer.write("%s PUBLIC '%s'%s '%s'" % (newl, self.publicId, newl, self.systemId)) | def writexml(self, writer, indent="", addindent="", newl=""): writer.write("<!DOCTYPE ") writer.write(self.name) if self.publicId: writer.write("\n PUBLIC '%s'\n '%s'" % (self.publicId, self.systemId)) elif self.systemId: writer.write("\n SYSTEM '%s'" % self.systemId) if self.internalSubset is not None: writer.write... | 175a7dcf6588f41df1ea99f9180a930d37224598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/175a7dcf6588f41df1ea99f9180a930d37224598/minidom.py |
writer.write("\n SYSTEM '%s'" % self.systemId) | writer.write("%s SYSTEM '%s'" % (newl, self.systemId)) | def writexml(self, writer, indent="", addindent="", newl=""): writer.write("<!DOCTYPE ") writer.write(self.name) if self.publicId: writer.write("\n PUBLIC '%s'\n '%s'" % (self.publicId, self.systemId)) elif self.systemId: writer.write("\n SYSTEM '%s'" % self.systemId) if self.internalSubset is not None: writer.write... | 175a7dcf6588f41df1ea99f9180a930d37224598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/175a7dcf6588f41df1ea99f9180a930d37224598/minidom.py |
writer.write(">\n") | writer.write(">"+newl) | def writexml(self, writer, indent="", addindent="", newl=""): writer.write("<!DOCTYPE ") writer.write(self.name) if self.publicId: writer.write("\n PUBLIC '%s'\n '%s'" % (self.publicId, self.systemId)) elif self.systemId: writer.write("\n SYSTEM '%s'" % self.systemId) if self.internalSubset is not None: writer.write... | 175a7dcf6588f41df1ea99f9180a930d37224598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/175a7dcf6588f41df1ea99f9180a930d37224598/minidom.py |
writer.write('<?xml version="1.0" ?>\n') else: writer.write('<?xml version="1.0" encoding="%s"?>\n' % encoding) | writer.write('<?xml version="1.0" ?>'+newl) else: writer.write('<?xml version="1.0" encoding="%s"?>%s' % (encoding, newl)) | def writexml(self, writer, indent="", addindent="", newl="", encoding = None): if encoding is None: writer.write('<?xml version="1.0" ?>\n') else: writer.write('<?xml version="1.0" encoding="%s"?>\n' % encoding) for node in self.childNodes: node.writexml(writer, indent, addindent, newl) | 175a7dcf6588f41df1ea99f9180a930d37224598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/175a7dcf6588f41df1ea99f9180a930d37224598/minidom.py |
coords = self._canvas.bbox(self._TAG) | coords = self._canvas.coords(self._TAG) | def _x(self): coords = self._canvas.bbox(self._TAG) assert coords return coords[2] - 6 # BAW: kludge | 538561e4660eb2c15c5a2e71b7cb7e2584e09e4d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/538561e4660eb2c15c5a2e71b7cb7e2584e09e4d/StripViewer.py |
return coords[2] - 6 | return coords[0] + self._ARROWWIDTH | def _x(self): coords = self._canvas.bbox(self._TAG) assert coords return coords[2] - 6 # BAW: kludge | 538561e4660eb2c15c5a2e71b7cb7e2584e09e4d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/538561e4660eb2c15c5a2e71b7cb7e2584e09e4d/StripViewer.py |
def remove_option(section, option): | def remove_option(self, section, option): | def remove_option(section, option): """Remove an option.""" if not section or section == "DEFAULT": sectdict = self.__defaults else: try: sectdict = self.__sections[section] except KeyError: raise NoSectionError(section) existed = sectdict.has_key(key) if existed: del sectdict[key] return existed | ff4df6d6fbeac136053ba4f9b7ac567fbf39e6be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ff4df6d6fbeac136053ba4f9b7ac567fbf39e6be/ConfigParser.py |
def remove_section(section): | def remove_section(self, section): | def remove_section(section): """Remove a file section.""" if self.__sections.has_key(section): del self.__sections[section] return 1 else: return 0 | ff4df6d6fbeac136053ba4f9b7ac567fbf39e6be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ff4df6d6fbeac136053ba4f9b7ac567fbf39e6be/ConfigParser.py |
def check_split(self, wrapper, text, expect): result = wrapper._split(text) | def check_split(self, text, expect): result = self.wrapper._split(text) | def check_split(self, wrapper, text, expect): result = wrapper._split(text) self.assertEquals(result, expect, "\nexpected %r\n" "but got %r" % (expect, result)) | d1a72a0d5e14d04ea83f154e5ed23202d311db46 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d1a72a0d5e14d04ea83f154e5ed23202d311db46/test_textwrap.py |
self.check_split(self.wrapper, text, expect) | self.check_split(text, expect) | def test_em_dash(self): # Test text with em-dashes text = "Em-dashes should be written -- thus." self.check_wrap(text, 25, ["Em-dashes should be", "written -- thus."]) | d1a72a0d5e14d04ea83f154e5ed23202d311db46 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d1a72a0d5e14d04ea83f154e5ed23202d311db46/test_textwrap.py |
self.check_split(self.wrapper, text, expect) | self.check_split(text, expect) | def test_em_dash(self): # Test text with em-dashes text = "Em-dashes should be written -- thus." self.check_wrap(text, 25, ["Em-dashes should be", "written -- thus."]) | d1a72a0d5e14d04ea83f154e5ed23202d311db46 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d1a72a0d5e14d04ea83f154e5ed23202d311db46/test_textwrap.py |
self.check_split(self.wrapper, text, expect) | self.check_split(text, expect) def test_funky_hyphens (self): self.check_split("what the--hey!", ["what", " ", "the", "--", "hey!"]) self.check_split("what the--", ["what", " ", "the--"]) self.check_split("what the--.", ["what", " ", "the--."]) self.check_split("--text--.", ["--text--."]) self.check_split("--opti... | def test_unix_options (self): # Test that Unix-style command-line options are wrapped correctly. # Both Optik (OptionParser) and Docutils rely on this behaviour! | d1a72a0d5e14d04ea83f154e5ed23202d311db46 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d1a72a0d5e14d04ea83f154e5ed23202d311db46/test_textwrap.py |
while not self.state: | if not self.state: | def wait(self): self.posted.acquire() while not self.state: self.posted.wait() self.posted.release() | 846c3224a8e4fcdd93005056d86a7ae32da8ecc9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/846c3224a8e4fcdd93005056d86a7ae32da8ecc9/sync.py |
if terminator is None: | if terminator is None or terminator == '': | def handle_read (self): | a416341b3067306959397e896bd6b712501bd28c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a416341b3067306959397e896bd6b712501bd28c/asynchat.py |
openitem = FrameWork.MenuItem(m, "Open"+ELIPSES, "O", 'open') openbynameitem = FrameWork.MenuItem(m, "Open File by Name"+ELIPSES, "D", 'openbyname') | openitem = FrameWork.MenuItem(m, "Open"+ELLIPSIS, "O", 'open') openbynameitem = FrameWork.MenuItem(m, "Open File by Name"+ELLIPSIS, "D", 'openbyname') | def makeusermenus(self): m = Wapplication.Menu(self.menubar, "File") newitem = FrameWork.MenuItem(m, "New", "N", 'new') openitem = FrameWork.MenuItem(m, "Open"+ELIPSES, "O", 'open') openbynameitem = FrameWork.MenuItem(m, "Open File by Name"+ELIPSES, "D", 'openbyname') self.openrecentmenu = FrameWork.SubMenu(m, "Open Re... | 001734ca7fd4fb4f53040c83bf06579cc171aded /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/001734ca7fd4fb4f53040c83bf06579cc171aded/PythonIDEMain.py |
saveasitem = FrameWork.MenuItem(m, "Save as"+ELIPSES, None, 'save_as') FrameWork.Separator(m) saveasappletitem = FrameWork.MenuItem(m, "Save as Applet"+ELIPSES, None, 'save_as_applet') | saveasitem = FrameWork.MenuItem(m, "Save as"+ELLIPSIS, None, 'save_as') FrameWork.Separator(m) saveasappletitem = FrameWork.MenuItem(m, "Save as Applet"+ELLIPSIS, None, 'save_as_applet') | def makeusermenus(self): m = Wapplication.Menu(self.menubar, "File") newitem = FrameWork.MenuItem(m, "New", "N", 'new') openitem = FrameWork.MenuItem(m, "Open"+ELIPSES, "O", 'open') openbynameitem = FrameWork.MenuItem(m, "Open File by Name"+ELIPSES, "D", 'openbyname') self.openrecentmenu = FrameWork.SubMenu(m, "Open Re... | 001734ca7fd4fb4f53040c83bf06579cc171aded /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/001734ca7fd4fb4f53040c83bf06579cc171aded/PythonIDEMain.py |
finditem = FrameWork.MenuItem(m, "Find"+ELIPSES, "F", "find") | finditem = FrameWork.MenuItem(m, "Find"+ELLIPSIS, "F", "find") | def makeusermenus(self): m = Wapplication.Menu(self.menubar, "File") newitem = FrameWork.MenuItem(m, "New", "N", 'new') openitem = FrameWork.MenuItem(m, "Open"+ELIPSES, "O", 'open') openbynameitem = FrameWork.MenuItem(m, "Open File by Name"+ELIPSES, "D", 'openbyname') self.openrecentmenu = FrameWork.SubMenu(m, "Open Re... | 001734ca7fd4fb4f53040c83bf06579cc171aded /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/001734ca7fd4fb4f53040c83bf06579cc171aded/PythonIDEMain.py |
moditem = FrameWork.MenuItem(m, "Module browser"+ELIPSES, "M", self.domenu_modulebrowser) | moditem = FrameWork.MenuItem(m, "Module browser"+ELLIPSIS, "M", self.domenu_modulebrowser) | def makeusermenus(self): m = Wapplication.Menu(self.menubar, "File") newitem = FrameWork.MenuItem(m, "New", "N", 'new') openitem = FrameWork.MenuItem(m, "Open"+ELIPSES, "O", 'open') openbynameitem = FrameWork.MenuItem(m, "Open File by Name"+ELIPSES, "D", 'openbyname') self.openrecentmenu = FrameWork.SubMenu(m, "Open Re... | 001734ca7fd4fb4f53040c83bf06579cc171aded /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/001734ca7fd4fb4f53040c83bf06579cc171aded/PythonIDEMain.py |
FrameWork.MenuItem(mm, "Set Scripts folder"+ELIPSES, None, self.do_setscriptsfolder) FrameWork.MenuItem(mm, "Editor default settings"+ELIPSES, None, self.do_editorprefs) FrameWork.MenuItem(mm, "Set default window font"+ELIPSES, None, self.do_setwindowfont) | FrameWork.MenuItem(mm, "Set Scripts folder"+ELLIPSIS, None, self.do_setscriptsfolder) FrameWork.MenuItem(mm, "Editor default settings"+ELLIPSIS, None, self.do_editorprefs) FrameWork.MenuItem(mm, "Set default window font"+ELLIPSIS, None, self.do_setwindowfont) | def makeusermenus(self): m = Wapplication.Menu(self.menubar, "File") newitem = FrameWork.MenuItem(m, "New", "N", 'new') openitem = FrameWork.MenuItem(m, "Open"+ELIPSES, "O", 'open') openbynameitem = FrameWork.MenuItem(m, "Open File by Name"+ELIPSES, "D", 'openbyname') self.openrecentmenu = FrameWork.SubMenu(m, "Open Re... | 001734ca7fd4fb4f53040c83bf06579cc171aded /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/001734ca7fd4fb4f53040c83bf06579cc171aded/PythonIDEMain.py |
f = open(os.path.join(path, "Place your scripts here"+ELIPSES), "w") | f = open(os.path.join(path, "Place your scripts here"+ELLIPSIS), "w") | def makeusermenus(self): m = Wapplication.Menu(self.menubar, "File") newitem = FrameWork.MenuItem(m, "New", "N", 'new') openitem = FrameWork.MenuItem(m, "Open"+ELIPSES, "O", 'open') openbynameitem = FrameWork.MenuItem(m, "Open File by Name"+ELIPSES, "D", 'openbyname') self.openrecentmenu = FrameWork.SubMenu(m, "Open Re... | 001734ca7fd4fb4f53040c83bf06579cc171aded /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/001734ca7fd4fb4f53040c83bf06579cc171aded/PythonIDEMain.py |
return "About Python IDE"+ELIPSES | return "About Python IDE"+ELLIPSIS | def getabouttext(self): return "About Python IDE"+ELIPSES | 001734ca7fd4fb4f53040c83bf06579cc171aded /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/001734ca7fd4fb4f53040c83bf06579cc171aded/PythonIDEMain.py |
extra_postargs.extend(extra_postargs) | pp_args.extend(extra_postargs) | def preprocess (self, source, output_file=None, macros=None, include_dirs=None, extra_preargs=None, extra_postargs=None): | 286b107bea83c10075e263f02a1795beb7de8e70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/286b107bea83c10075e263f02a1795beb7de8e70/unixccompiler.py |
if self.force or (output_file and newer(source, output_file)): | if self.force or output_file is None or newer(source, output_file)): | def preprocess (self, source, output_file=None, macros=None, include_dirs=None, extra_preargs=None, extra_postargs=None): | 286b107bea83c10075e263f02a1795beb7de8e70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/286b107bea83c10075e263f02a1795beb7de8e70/unixccompiler.py |
ainv = _sqrt(2.0 * alpha - 1.0) return beta * self.stdgamma(alpha, ainv, alpha - LOG4, alpha + ainv) def stdgamma(self, alpha, ainv, bbb, ccc): | return beta * self.stdgamma(alpha) def stdgamma(self, alpha, *args): | def gammavariate(self, alpha, beta): # beta times standard gamma ainv = _sqrt(2.0 * alpha - 1.0) return beta * self.stdgamma(alpha, ainv, alpha - LOG4, alpha + ainv) | ca6cdc2c0259b1b74a3f4c2d29a35e76617a3019 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ca6cdc2c0259b1b74a3f4c2d29a35e76617a3019/random.py |
print items[i]; i+=1 | b = items[i]; i+=1 | def tightloop_example(): items = range(0, 3) try: i = 0 while 1: print items[i]; i+=1 except IndexError: pass | ee6c9b8613336912bea827b607f7454c5368cd57 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ee6c9b8613336912bea827b607f7454c5368cd57/test_trace.py |
self._parseheaders(root, fp) | firstbodyline = self._parseheaders(root, fp) | def parse(self, fp, headersonly=False): """Create a message structure from the data in a file. | da2525ed2a9c8ee6219b469fbbae47b9cec2c4ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/da2525ed2a9c8ee6219b469fbbae47b9cec2c4ba/Parser.py |
self._parsebody(root, fp) | self._parsebody(root, fp, firstbodyline) | def parse(self, fp, headersonly=False): """Create a message structure from the data in a file. | da2525ed2a9c8ee6219b469fbbae47b9cec2c4ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/da2525ed2a9c8ee6219b469fbbae47b9cec2c4ba/Parser.py |
"Not a header, not a continuation: ``%s''"%line) | "Not a header, not a continuation: ``%s''" % line) | def _parseheaders(self, container, fp): # Parse the headers, returning a list of header/value pairs. None as # the header means the Unix-From header. lastheader = '' lastvalue = [] lineno = 0 while True: # Don't strip the line before we test for the end condition, # because whitespace-only header lines are RFC complia... | da2525ed2a9c8ee6219b469fbbae47b9cec2c4ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/da2525ed2a9c8ee6219b469fbbae47b9cec2c4ba/Parser.py |
raise Errors.HeaderParseError( "Not a header, not a continuation: ``%s''"%line) | firstbodyline = line break | def _parseheaders(self, container, fp): # Parse the headers, returning a list of header/value pairs. None as # the header means the Unix-From header. lastheader = '' lastvalue = [] lineno = 0 while True: # Don't strip the line before we test for the end condition, # because whitespace-only header lines are RFC complia... | da2525ed2a9c8ee6219b469fbbae47b9cec2c4ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/da2525ed2a9c8ee6219b469fbbae47b9cec2c4ba/Parser.py |
def _parsebody(self, container, fp): | return firstbodyline def _parsebody(self, container, fp, firstbodyline=None): | def _parseheaders(self, container, fp): # Parse the headers, returning a list of header/value pairs. None as # the header means the Unix-From header. lastheader = '' lastvalue = [] lineno = 0 while True: # Don't strip the line before we test for the end condition, # because whitespace-only header lines are RFC complia... | da2525ed2a9c8ee6219b469fbbae47b9cec2c4ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/da2525ed2a9c8ee6219b469fbbae47b9cec2c4ba/Parser.py |
container.set_payload(fp.read()) | text = fp.read() if firstbodyline is not None: text = firstbodyline + '\n' + text container.set_payload(text) | def _parsebody(self, container, fp): # Parse the body, but first split the payload on the content-type # boundary if present. boundary = container.get_boundary() isdigest = (container.get_content_type() == 'multipart/digest') # If there's a boundary, split the payload text into its constituent # parts and parse each se... | da2525ed2a9c8ee6219b469fbbae47b9cec2c4ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/da2525ed2a9c8ee6219b469fbbae47b9cec2c4ba/Parser.py |
prefix = PREFIX prefix_len = len(prefix) | def main(): rcfile = os.path.join(os.path.dirname(refcounts.__file__), os.pardir, "api", "refcounts.dat") outfile = "-" opts, args = getopt.getopt(sys.argv[1:], "o:r:", ["output=", "refcounts="]) for opt, arg in opts: if opt in ("-o", "--output"): outfile = arg elif opt in ("-r", "--refcounts"): rcfile = arg rcdict = r... | 3764b6b67ec28e594d03bb95efb9b9ad029f018c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3764b6b67ec28e594d03bb95efb9b9ad029f018c/anno-api.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.