rem
stringlengths 1
322k
| add
stringlengths 0
2.05M
| context
stringlengths 4
228k
| meta
stringlengths 156
215
|
---|---|---|---|
"n" * newtabwith) | "n" * newtabwidth) | def set_tabwidth(self, newtabwidth): text = self.text if self.get_tabwidth() != newtabwidth: pixels = text.tk.call("font", "measure", text["font"], "-displayof", text.master, "n" * newtabwith) text.configure(tabs=pixels) | e3bc0d4f4500fc3d95991b7bfe0176d6bc043e53 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e3bc0d4f4500fc3d95991b7bfe0176d6bc043e53/EditorWindow.py |
path = module.__path__ | try: path = module.__path__ except AttributeError: raise ImportError, 'No source for module ' + module.__name__ | def _find_module(fullname, path=None): """Version of imp.find_module() that handles hierarchical module names""" file = None for tgt in fullname.split('.'): if file is not None: file.close() # close intermediate files (file, filename, descr) = imp.find_module(tgt, path) if descr[2] == imp.PY_SOURCE: break # find but not load the source file module = imp.load_module(tgt, file, filename, descr) path = module.__path__ return file, filename, descr | d26eeffd4d44f3ca0ad5fbebfa32fd4735d98db7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d26eeffd4d44f3ca0ad5fbebfa32fd4735d98db7/EditorWindow.py |
if not callback: callback = print_line | if not callable(callback): callback = print_line | def retrlines(self, cmd, callback = None): '''Retrieve data in line mode. The argument is a RETR or LIST command. The callback function (2nd argument) is called for each line, with trailing CRLF stripped. This creates a new port for you. print_line() is the default callback.''' if not callback: callback = print_line resp = self.sendcmd('TYPE A') conn = self.transfercmd(cmd) fp = conn.makefile('rb') while 1: line = fp.readline() if self.debugging > 2: print '*retr*', `line` if not line: break if line[-2:] == CRLF: line = line[:-2] elif line[-1:] == '\n': line = line[:-1] callback(line) fp.close() conn.close() return self.voidresp() | 210d949964ac59e16a0010a0321960e182cade25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/210d949964ac59e16a0010a0321960e182cade25/ftplib.py |
exc_type, exc_val, exc_tb = sys.exc_info() | exc_type, exc_val = sys.exc_info()[:2] | def _run_examples_inner(out, fakeout, examples, globs, verbose, name): import sys, traceback OK, BOOM, FAIL = range(3) NADA = "nothing" stderr = _SpoofOut() failures = 0 for source, want, lineno in examples: if verbose: _tag_out(out, ("Trying", source), ("Expecting", want or NADA)) fakeout.clear() try: exec compile(source, "<string>", "single") in globs got = fakeout.get() state = OK except: # See whether the exception was expected. if want.find("Traceback (innermost last):\n") == 0 or \ want.find("Traceback (most recent call last):\n") == 0: # Only compare exception type and value - the rest of # the traceback isn't necessary. want = want.split('\n')[-2] + '\n' exc_type, exc_val, exc_tb = sys.exc_info() got = traceback.format_exception_only(exc_type, exc_val)[-1] state = OK else: # unexpected exception stderr.clear() traceback.print_exc(file=stderr) state = BOOM if state == OK: if got == want: if verbose: out("ok\n") continue state = FAIL assert state in (FAIL, BOOM) failures = failures + 1 out("*" * 65 + "\n") _tag_out(out, ("Failure in example", source)) out("from line #" + `lineno` + " of " + name + "\n") if state == FAIL: _tag_out(out, ("Expected", want or NADA), ("Got", got)) else: assert state == BOOM _tag_out(out, ("Exception raised", stderr.get())) return failures, len(examples) | d64022fddc1d4f73fce1c5447a7e9bfa7e974656 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d64022fddc1d4f73fce1c5447a7e9bfa7e974656/doctest.py |
if isinstance(s, StringType): unicode(s, charset.get_output_charset()) elif isinstance(s, UnicodeType): for charset in USASCII, charset, UTF8: try: s = s.encode(charset.get_output_charset()) break except UnicodeError: pass else: assert False, 'Could not encode to utf-8' | if charset <> '8bit': if isinstance(s, StringType): incodec = charset.input_codec or 'us-ascii' ustr = unicode(s, incodec) outcodec = charset.output_codec or 'us-ascii' ustr.encode(outcodec) elif isinstance(s, UnicodeType): for charset in USASCII, charset, UTF8: try: outcodec = charset.output_codec or 'us-ascii' s = s.encode(outcodec) break except UnicodeError: pass else: assert False, 'utf-8 conversion failed' | def append(self, s, charset=None): """Append a string to the MIME header. | baa09369a6b781d33cf331ecc4b117c28fe5f39c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/baa09369a6b781d33cf331ecc4b117c28fe5f39c/Header.py |
typ, dat = self._simple_command('GETQUOTA', mailbox) | typ, dat = self._simple_command('GETQUOTAROOT', mailbox) | def getquotaroot(self, mailbox): """Get the list of quota roots for the named mailbox. | f7f618ee4bb237f47955e8cdd6f98c62ea9ebf57 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f7f618ee4bb237f47955e8cdd6f98c62ea9ebf57/imaplib.py |
""" | Mandated responses are ('FLAGS', 'EXISTS', 'RECENT', 'UIDVALIDITY'), so other responses should be obtained via <instance>.response('FLAGS') etc. """ | def select(self, mailbox='INBOX', readonly=None): """Select a mailbox. | f7f618ee4bb237f47955e8cdd6f98c62ea9ebf57 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f7f618ee4bb237f47955e8cdd6f98c62ea9ebf57/imaplib.py |
try: ignore = posix.fdopen except: raise AttributeError, 'dup() method unavailable' | if not hasattr(posix, 'fdopen'): raise AttributeError, 'dup() method unavailable' | def dup(self): import posix | dcd465307021ea32e342ce955e99e3bb4a129848 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dcd465307021ea32e342ce955e99e3bb4a129848/posixfile.py |
try: ignore = posix.fdopen except: raise AttributeError, 'dup() method unavailable' | if not hasattr(posix, 'fdopen'): raise AttributeError, 'dup() method unavailable' | def dup2(self, fd): import posix | dcd465307021ea32e342ce955e99e3bb4a129848 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dcd465307021ea32e342ce955e99e3bb4a129848/posixfile.py |
fn = os.path.join(fn, os.pardir, os.pardir, "Doc", "index.html") | fn = os.path.join(fn, os.pardir, os.pardir, "pythlp.chm") | def help_dialog(self, event=None): fn=os.path.join(os.path.abspath(os.path.dirname(__file__)),'help.txt') textView.TextViewer(self.top,'Help',fn) | 317ca59264465f3a48544227808f5deeaea986da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/317ca59264465f3a48544227808f5deeaea986da/EditorWindow.py |
def python_docs(self, event=None): self.display_docs(self.help_url) | def python_docs(self, event=None): os.startfile(self.help_url) else: def python_docs(self, event=None): self.display_docs(self.help_url) | def help_dialog(self, event=None): fn=os.path.join(os.path.abspath(os.path.dirname(__file__)),'help.txt') textView.TextViewer(self.top,'Help',fn) | 317ca59264465f3a48544227808f5deeaea986da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/317ca59264465f3a48544227808f5deeaea986da/EditorWindow.py |
self.baseFilename = filename | self.baseFilename = os.path.abspath(filename) | def __init__(self, filename, mode="a"): """ Open the specified file and use it as the stream for logging. """ StreamHandler.__init__(self, open(filename, mode)) self.baseFilename = filename self.mode = mode | bc228c3b794085212a398f8af181b5e6eaaaca17 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bc228c3b794085212a398f8af181b5e6eaaaca17/__init__.py |
return Utils.collapse_rfc2231_value(boundary).strip() | return Utils.collapse_rfc2231_value(boundary).rstrip() | def get_boundary(self, failobj=None): """Return the boundary associated with the payload if present. | f62a2f413779abd204539bacb270b15141f2d173 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f62a2f413779abd204539bacb270b15141f2d173/Message.py |
'recv', 'recvfrom', 'send', 'sendall', 'sendto', 'setblocking', | 'sendall', 'setblocking', | def getfqdn(name=''): """Get fully qualified domain name from name. An empty argument is interpreted as meaning the local host. First the hostname returned by gethostbyaddr() is checked, then possibly existing aliases. In case no FQDN is available, hostname is returned. """ name = name.strip() if not name or name == '0.0.0.0': name = gethostname() try: hostname, aliases, ipaddrs = gethostbyaddr(name) except error: pass else: aliases.insert(0, hostname) for name in aliases: if '.' in name: break else: name = hostname return name | 989966d25708bea632f78cedd70c2f9924187e94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/989966d25708bea632f78cedd70c2f9924187e94/socket.py |
def __getattr__(self, name): | def _dummy(*args): | def __getattr__(self, name): raise error(9, 'Bad file descriptor') | 989966d25708bea632f78cedd70c2f9924187e94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/989966d25708bea632f78cedd70c2f9924187e94/socket.py |
__slots__ = ["_sock"] | __slots__ = ["_sock", "send", "recv", "sendto", "recvfrom"] | def __getattr__(self, name): raise error(9, 'Bad file descriptor') | 989966d25708bea632f78cedd70c2f9924187e94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/989966d25708bea632f78cedd70c2f9924187e94/socket.py |
return self.dict.len() | return len(self.dict) | def __len__(self): return self.dict.len() | 96c37c77c1582386f0770b6b3392ef7482f141d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/96c37c77c1582386f0770b6b3392ef7482f141d6/shelve.py |
if DEBUG: | if DEBUG: | def write(self, data): if DEBUG: | 772b07e2ea8b495a9ca50823bc407f3034d31d3b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/772b07e2ea8b495a9ca50823bc407f3034d31d3b/binhex.py |
if sys.platform == "darwin": supports_unicode_filenames = True else: supports_unicode_filenames = False | supports_unicode_filenames = False | def realpath(filename): """Return the canonical path of the specified filename, eliminating any | f600c155af4d7e98122a6a3f8e8f56b27e8d5878 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f600c155af4d7e98122a6a3f8e8f56b27e8d5878/posixpath.py |
def_op('RAISE_VARARGS', 130) def_op('CALL_FUNCTION', 131) def_op('MAKE_FUNCTION', 132) def_op('BUILD_SLICE', 133) | def_op('RAISE_VARARGS', 130) def_op('CALL_FUNCTION', 131) def_op('MAKE_FUNCTION', 132) def_op('BUILD_SLICE', 133) def_op('CALL_FUNCTION_VAR', 140) def_op('CALL_FUNCTION_KW', 141) def_op('CALL_FUNCTION_VAR_KW', 142) | def jabs_op(name, op): opname[op] = name hasjabs.append(op) | 80627ca18cdfbbed87ced031c847e9c8139083ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/80627ca18cdfbbed87ced031c847e9c8139083ae/dis.py |
self.fp.write("\n%s = %s\n"%(pname, othername)) | self.fp.write("\n_Prop_%s = _Prop_%s\n"%(pname, othername)) | def compileproperty(self, prop): [name, code, what] = prop if code == 'c@#!': # Something silly with plurals. Skip it. return pname = identify(name) if self.namemappers[0].hascode('property', code): # plural forms and such othername, dummy, dummy = self.namemappers[0].findcodename('property', code) if pname == othername: return if self.fp: self.fp.write("\n%s = %s\n"%(pname, othername)) else: if self.fp: self.fp.write("class %s(aetools.NProperty):\n" % pname) self.fp.write('\t"""%s - %s """\n' % (ascii(name), ascii(what[1]))) self.fp.write("\twhich = %s\n" % `code`) self.fp.write("\twant = %s\n" % `what[0]`) self.namemappers[0].addnamecode('property', pname, code) | 74e2a2cfdfed9c97eeb4312a78a5e11beb30a7eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/74e2a2cfdfed9c97eeb4312a78a5e11beb30a7eb/gensuitemodule.py |
self.fp.write("class %s(aetools.NProperty):\n" % pname) | self.fp.write("class _Prop_%s(aetools.NProperty):\n" % pname) | def compileproperty(self, prop): [name, code, what] = prop if code == 'c@#!': # Something silly with plurals. Skip it. return pname = identify(name) if self.namemappers[0].hascode('property', code): # plural forms and such othername, dummy, dummy = self.namemappers[0].findcodename('property', code) if pname == othername: return if self.fp: self.fp.write("\n%s = %s\n"%(pname, othername)) else: if self.fp: self.fp.write("class %s(aetools.NProperty):\n" % pname) self.fp.write('\t"""%s - %s """\n' % (ascii(name), ascii(what[1]))) self.fp.write("\twhich = %s\n" % `code`) self.fp.write("\twant = %s\n" % `what[0]`) self.namemappers[0].addnamecode('property', pname, code) | 74e2a2cfdfed9c97eeb4312a78a5e11beb30a7eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/74e2a2cfdfed9c97eeb4312a78a5e11beb30a7eb/gensuitemodule.py |
self.fp.write("\t'%s' : %s,\n"%(n, n)) | self.fp.write("\t'%s' : _Prop_%s,\n"%(n, n)) | def fillclasspropsandelems(self, cls): [name, code, desc, properties, elements] = cls cname = identify(name) if self.namemappers[0].hascode('class', code) and \ self.namemappers[0].findcodename('class', code)[0] != cname: # This is an other name (plural or so) for something else. Skip. if self.fp and (elements or len(properties) > 1 or (len(properties) == 1 and properties[0][1] != 'c@#!')): if self.verbose: print >>self.verbose, '** Skip multiple %s of %s (code %s)' % (cname, self.namemappers[0].findcodename('class', code)[0], `code`) raise RuntimeError, "About to skip non-empty class" return plist = [] elist = [] superclasses = [] for prop in properties: [pname, pcode, what] = prop if pcode == "c@#^": superclasses.append(what) if pcode == 'c@#!': continue pname = identify(pname) plist.append(pname) | 74e2a2cfdfed9c97eeb4312a78a5e11beb30a7eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/74e2a2cfdfed9c97eeb4312a78a5e11beb30a7eb/gensuitemodule.py |
self.fp.write("\n_propdeclarations = {\n") proplist = self.namemappers[0].getall('property') proplist.sort() for k, v in proplist: self.fp.write("\t%s : %s,\n" % (`k`, v)) self.fp.write("}\n") self.fp.write("\n_compdeclarations = {\n") complist = self.namemappers[0].getall('comparison') complist.sort() for k, v in complist: self.fp.write("\t%s : %s,\n" % (`k`, v)) self.fp.write("}\n") self.fp.write("\n_enumdeclarations = {\n") enumlist = self.namemappers[0].getall('enum') enumlist.sort() for k, v in enumlist: self.fp.write("\t%s : %s,\n" % (`k`, v)) self.fp.write("}\n") | def dumpindex(self): if not self.fp: return self.fp.write("\n#\n# Indices of types declared in this module\n#\n") self.fp.write("_classdeclarations = {\n") classlist = self.namemappers[0].getall('class') classlist.sort() for k, v in classlist: self.fp.write("\t%s : %s,\n" % (`k`, v)) self.fp.write("}\n") self.fp.write("\n_propdeclarations = {\n") proplist = self.namemappers[0].getall('property') proplist.sort() for k, v in proplist: self.fp.write("\t%s : %s,\n" % (`k`, v)) self.fp.write("}\n") self.fp.write("\n_compdeclarations = {\n") complist = self.namemappers[0].getall('comparison') complist.sort() for k, v in complist: self.fp.write("\t%s : %s,\n" % (`k`, v)) self.fp.write("}\n") self.fp.write("\n_enumdeclarations = {\n") enumlist = self.namemappers[0].getall('enum') enumlist.sort() for k, v in enumlist: self.fp.write("\t%s : %s,\n" % (`k`, v)) self.fp.write("}\n") | 74e2a2cfdfed9c97eeb4312a78a5e11beb30a7eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/74e2a2cfdfed9c97eeb4312a78a5e11beb30a7eb/gensuitemodule.py |
|
Pack the values v2, v2, ... according to fmt, write | Pack the values v1, v2, ... according to fmt, write | def pack_into(fmt, buf, offset, *args): """ Pack the values v2, v2, ... according to fmt, write the packed bytes into the writable buffer buf starting at offset. See struct.__doc__ for more on format strings. """ try: o = _cache[fmt] except KeyError: o = _compile(fmt) return o.pack_into(buf, offset, *args) | b54bd57a6f2cc0cf6de981289e6d8c505e62dc0d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b54bd57a6f2cc0cf6de981289e6d8c505e62dc0d/struct.py |
langdict = {} | nelangs = [] | def find(domain, localedir=None, languages=None): # Get some reasonable defaults for arguments that were not supplied if localedir is None: localedir = _default_localedir if languages is None: languages = [] for envar in ('LANGUAGE', 'LC_ALL', 'LC_MESSAGES', 'LANG'): val = os.environ.get(envar) if val: languages = val.split(':') break if 'C' not in languages: languages.append('C') # now normalize and expand the languages langdict = {} for lang in languages: for nelang in _expand_lang(lang): langdict[nelang] = nelang languages = langdict.keys() # select a language for lang in languages: if lang == 'C': break mofile = os.path.join(localedir, lang, 'LC_MESSAGES', '%s.mo' % domain) if os.path.exists(mofile): return mofile return None | 3f6abd2879ef815ecaafaeb81f10d1d702e057d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3f6abd2879ef815ecaafaeb81f10d1d702e057d6/gettext.py |
langdict[nelang] = nelang languages = langdict.keys() | if nelang not in nelangs: nelangs.append(nelang) | def find(domain, localedir=None, languages=None): # Get some reasonable defaults for arguments that were not supplied if localedir is None: localedir = _default_localedir if languages is None: languages = [] for envar in ('LANGUAGE', 'LC_ALL', 'LC_MESSAGES', 'LANG'): val = os.environ.get(envar) if val: languages = val.split(':') break if 'C' not in languages: languages.append('C') # now normalize and expand the languages langdict = {} for lang in languages: for nelang in _expand_lang(lang): langdict[nelang] = nelang languages = langdict.keys() # select a language for lang in languages: if lang == 'C': break mofile = os.path.join(localedir, lang, 'LC_MESSAGES', '%s.mo' % domain) if os.path.exists(mofile): return mofile return None | 3f6abd2879ef815ecaafaeb81f10d1d702e057d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3f6abd2879ef815ecaafaeb81f10d1d702e057d6/gettext.py |
for lang in languages: | for lang in nelangs: | def find(domain, localedir=None, languages=None): # Get some reasonable defaults for arguments that were not supplied if localedir is None: localedir = _default_localedir if languages is None: languages = [] for envar in ('LANGUAGE', 'LC_ALL', 'LC_MESSAGES', 'LANG'): val = os.environ.get(envar) if val: languages = val.split(':') break if 'C' not in languages: languages.append('C') # now normalize and expand the languages langdict = {} for lang in languages: for nelang in _expand_lang(lang): langdict[nelang] = nelang languages = langdict.keys() # select a language for lang in languages: if lang == 'C': break mofile = os.path.join(localedir, lang, 'LC_MESSAGES', '%s.mo' % domain) if os.path.exists(mofile): return mofile return None | 3f6abd2879ef815ecaafaeb81f10d1d702e057d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3f6abd2879ef815ecaafaeb81f10d1d702e057d6/gettext.py |
This (mostly) supports the API for Cryptographic Hash Functions (PEP 247). | This supports the API for Cryptographic Hash Functions (PEP 247). | def _strxor(s1, s2): """Utility method. XOR the two strings s1 and s2 (must have same length). """ return "".join(map(lambda x, y: chr(ord(x) ^ ord(y)), s1, s2)) | 9939f114462230168df44f7f380ab516cccee873 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9939f114462230168df44f7f380ab516cccee873/hmac.py |
self.digest_size = digestmod.digest_size | def __init__(self, key, msg = None, digestmod = None): """Create a new HMAC object. | 9939f114462230168df44f7f380ab516cccee873 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9939f114462230168df44f7f380ab516cccee873/hmac.py |
|
return HMAC(self) | other = HMAC("") other.digestmod = self.digestmod other.inner = self.inner.copy() other.outer = self.outer.copy() return other | def copy(self): """Return a separate copy of this hashing object. | 9939f114462230168df44f7f380ab516cccee873 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9939f114462230168df44f7f380ab516cccee873/hmac.py |
def test(): def md5test(key, data, digest): h = HMAC(key, data) assert(h.hexdigest().upper() == digest.upper()) md5test(chr(0x0b) * 16, "Hi There", "9294727A3638BB1C13F48EF8158BFC9D") md5test("Jefe", "what do ya want for nothing?", "750c783e6ab0b503eaa86e310a5db738") md5test(chr(0xAA)*16, chr(0xDD)*50, "56be34521d144c88dbb8c733f0e8b3f6") if __name__ == "__main__": test() | def test(): def md5test(key, data, digest): h = HMAC(key, data) assert(h.hexdigest().upper() == digest.upper()) # Test vectors from the RFC md5test(chr(0x0b) * 16, "Hi There", "9294727A3638BB1C13F48EF8158BFC9D") md5test("Jefe", "what do ya want for nothing?", "750c783e6ab0b503eaa86e310a5db738") md5test(chr(0xAA)*16, chr(0xDD)*50, "56be34521d144c88dbb8c733f0e8b3f6") | 9939f114462230168df44f7f380ab516cccee873 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9939f114462230168df44f7f380ab516cccee873/hmac.py |
|
if not self._dict['MD5Sum']: | if not self._dict.get('MD5Sum'): | def _archiveOK(self): """Test an archive. It should exist and the MD5 checksum should be correct.""" if not os.path.exists(self.archiveFilename): return 0 if not self._dict['MD5Sum']: sys.stderr.write("Warning: no MD5Sum for %s\n" % self.fullname()) return 1 data = open(self.archiveFilename, 'rb').read() checksum = md5.new(data).hexdigest() return checksum == self._dict['MD5Sum'] | c5cebd0d430920f4a28201efb6684343838174b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c5cebd0d430920f4a28201efb6684343838174b5/pimp.py |
def configure(self, cnf=None, **kw): """Configure resources of a widget. The values for resources are specified as keyword arguments. To get an overview about the allowed keyword arguments call the method keys. """ | def _configure(self, cmd, cnf, kw): """Internal function.""" | def _report_exception(self): """Internal function.""" import sys exc, val, tb = sys.exc_type, sys.exc_value, sys.exc_traceback root = self._root() root.report_callback_exception(exc, val, tb) | de0de912af2cf06056f14da80b65af88192c45a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/de0de912af2cf06056f14da80b65af88192c45a8/Tkinter.py |
self.tk.call(self._w, 'configure')): | self.tk.call(_flatten((self._w, cmd)))): | def configure(self, cnf=None, **kw): """Configure resources of a widget. | de0de912af2cf06056f14da80b65af88192c45a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/de0de912af2cf06056f14da80b65af88192c45a8/Tkinter.py |
x = self.tk.split(self.tk.call( self._w, 'configure', '-'+cnf)) | x = self.tk.split( self.tk.call(_flatten((self._w, cmd, '-'+cnf)))) | def configure(self, cnf=None, **kw): """Configure resources of a widget. | de0de912af2cf06056f14da80b65af88192c45a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/de0de912af2cf06056f14da80b65af88192c45a8/Tkinter.py |
self.tk.call((self._w, 'configure') + self._options(cnf)) | self.tk.call(_flatten((self._w, cmd)) + self._options(cnf)) def configure(self, cnf=None, **kw): """Configure resources of a widget. The values for resources are specified as keyword arguments. To get an overview about the allowed keyword arguments call the method keys. """ return self._configure('configure', cnf, kw) | def configure(self, cnf=None, **kw): """Configure resources of a widget. | de0de912af2cf06056f14da80b65af88192c45a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/de0de912af2cf06056f14da80b65af88192c45a8/Tkinter.py |
if cnf is None and not kw: cnf = {} for x in self.tk.split( self.tk.call(self._w, 'itemconfigure', tagOrId)): cnf[x[0][1:]] = (x[0][1:],) + x[1:] return cnf if type(cnf) == StringType and not kw: x = self.tk.split(self.tk.call( self._w, 'itemconfigure', tagOrId, '-'+cnf)) return (x[0][1:],) + x[1:] self.tk.call((self._w, 'itemconfigure', tagOrId) + self._options(cnf, kw)) | return self._configure(('itemconfigure', tagOrId), cnf, kw) | def itemconfigure(self, tagOrId, cnf=None, **kw): """Configure resources of an item TAGORID. | de0de912af2cf06056f14da80b65af88192c45a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/de0de912af2cf06056f14da80b65af88192c45a8/Tkinter.py |
if cnf is None and not kw: cnf = {} for x in self.tk.split( self.tk.call(self._w, 'itemconfigure', index)): cnf[x[0][1:]] = (x[0][1:],) + x[1:] return cnf if type(cnf) == StringType and not kw: x = self.tk.split(self.tk.call( self._w, 'itemconfigure', index, '-'+cnf)) return (x[0][1:],) + x[1:] self.tk.call((self._w, 'itemconfigure', index) + self._options(cnf, kw)) | return self._configure(('itemconfigure', index), cnf, kw) | def itemconfigure(self, index, cnf=None, **kw): """Configure resources of an ITEM. | de0de912af2cf06056f14da80b65af88192c45a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/de0de912af2cf06056f14da80b65af88192c45a8/Tkinter.py |
if cnf is None and not kw: cnf = {} for x in self.tk.split(self.tk.call( (self._w, 'entryconfigure', index))): cnf[x[0][1:]] = (x[0][1:],) + x[1:] return cnf if type(cnf) == StringType and not kw: x = self.tk.split(self.tk.call( (self._w, 'entryconfigure', index, '-'+cnf))) return (x[0][1:],) + x[1:] self.tk.call((self._w, 'entryconfigure', index) + self._options(cnf, kw)) | return self._configure(('entryconfigure', index), cnf, kw) | def entryconfigure(self, index, cnf=None, **kw): """Configure a menu item at INDEX.""" if cnf is None and not kw: cnf = {} for x in self.tk.split(self.tk.call( (self._w, 'entryconfigure', index))): cnf[x[0][1:]] = (x[0][1:],) + x[1:] return cnf if type(cnf) == StringType and not kw: x = self.tk.split(self.tk.call( (self._w, 'entryconfigure', index, '-'+cnf))) return (x[0][1:],) + x[1:] self.tk.call((self._w, 'entryconfigure', index) + self._options(cnf, kw)) | de0de912af2cf06056f14da80b65af88192c45a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/de0de912af2cf06056f14da80b65af88192c45a8/Tkinter.py |
def image_configure(self, index, cnf={}, **kw): | def image_configure(self, index, cnf=None, **kw): | def image_configure(self, index, cnf={}, **kw): """Configure an embedded image at INDEX.""" if not cnf and not kw: cnf = {} for x in self.tk.split( self.tk.call( self._w, "image", "configure", index)): cnf[x[0][1:]] = (x[0][1:],) + x[1:] return cnf apply(self.tk.call, (self._w, "image", "configure", index) + self._options(cnf, kw)) | de0de912af2cf06056f14da80b65af88192c45a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/de0de912af2cf06056f14da80b65af88192c45a8/Tkinter.py |
if not cnf and not kw: cnf = {} for x in self.tk.split( self.tk.call( self._w, "image", "configure", index)): cnf[x[0][1:]] = (x[0][1:],) + x[1:] return cnf apply(self.tk.call, (self._w, "image", "configure", index) + self._options(cnf, kw)) | return self._configure(('image', 'configure', index), cnf, kw) | def image_configure(self, index, cnf={}, **kw): """Configure an embedded image at INDEX.""" if not cnf and not kw: cnf = {} for x in self.tk.split( self.tk.call( self._w, "image", "configure", index)): cnf[x[0][1:]] = (x[0][1:],) + x[1:] return cnf apply(self.tk.call, (self._w, "image", "configure", index) + self._options(cnf, kw)) | de0de912af2cf06056f14da80b65af88192c45a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/de0de912af2cf06056f14da80b65af88192c45a8/Tkinter.py |
def tag_configure(self, tagName, cnf={}, **kw): | def tag_configure(self, tagName, cnf=None, **kw): | def tag_configure(self, tagName, cnf={}, **kw): """Configure a tag TAGNAME.""" if type(cnf) == StringType: x = self.tk.split(self.tk.call( self._w, 'tag', 'configure', tagName, '-'+cnf)) return (x[0][1:],) + x[1:] self.tk.call( (self._w, 'tag', 'configure', tagName) + self._options(cnf, kw)) | de0de912af2cf06056f14da80b65af88192c45a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/de0de912af2cf06056f14da80b65af88192c45a8/Tkinter.py |
if type(cnf) == StringType: x = self.tk.split(self.tk.call( self._w, 'tag', 'configure', tagName, '-'+cnf)) return (x[0][1:],) + x[1:] self.tk.call( (self._w, 'tag', 'configure', tagName) + self._options(cnf, kw)) | return self._configure(('tag', 'configure', tagName), cnf, kw) | def tag_configure(self, tagName, cnf={}, **kw): """Configure a tag TAGNAME.""" if type(cnf) == StringType: x = self.tk.split(self.tk.call( self._w, 'tag', 'configure', tagName, '-'+cnf)) return (x[0][1:],) + x[1:] self.tk.call( (self._w, 'tag', 'configure', tagName) + self._options(cnf, kw)) | de0de912af2cf06056f14da80b65af88192c45a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/de0de912af2cf06056f14da80b65af88192c45a8/Tkinter.py |
def window_configure(self, index, cnf={}, **kw): | def window_configure(self, index, cnf=None, **kw): | def window_configure(self, index, cnf={}, **kw): """Configure an embedded window at INDEX.""" if type(cnf) == StringType: x = self.tk.split(self.tk.call( self._w, 'window', 'configure', index, '-'+cnf)) return (x[0][1:],) + x[1:] self.tk.call( (self._w, 'window', 'configure', index) + self._options(cnf, kw)) | de0de912af2cf06056f14da80b65af88192c45a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/de0de912af2cf06056f14da80b65af88192c45a8/Tkinter.py |
if type(cnf) == StringType: x = self.tk.split(self.tk.call( self._w, 'window', 'configure', index, '-'+cnf)) return (x[0][1:],) + x[1:] self.tk.call( (self._w, 'window', 'configure', index) + self._options(cnf, kw)) | return self._configure(('window', 'configure', index), cnf, kw) | def window_configure(self, index, cnf={}, **kw): """Configure an embedded window at INDEX.""" if type(cnf) == StringType: x = self.tk.split(self.tk.call( self._w, 'window', 'configure', index, '-'+cnf)) return (x[0][1:],) + x[1:] self.tk.call( (self._w, 'window', 'configure', index) + self._options(cnf, kw)) | de0de912af2cf06056f14da80b65af88192c45a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/de0de912af2cf06056f14da80b65af88192c45a8/Tkinter.py |
port.connect(HOST, PORT) | port.connect(host, PORT) | def main(): try: optlist, args = getopt.getopt(sys.argv[1:], 'ls') except getopt.error, msg: sys.stderr.write(msg + '\n') sys.exit(2) player = cd.open() prstatus(player) size = player.bestreadsize() if optlist: for opt, arg in optlist: if opt == '-l': prtrackinfo(player) elif opt == '-s': prstatus(player) return sys.stdout.write('waiting for socket... ') sys.stdout.flush() port = socket(AF_INET, SOCK_DGRAM) port.connect(HOST, PORT) print 'socket connected' parser = cd.createparser() parser.setcallback(0, audiocallback, port) parser.setcallback(1, pnumcallback, player) parser.setcallback(2, indexcallback, None) ## 3 = ptime: too many calls ## 4 = atime: too many calls parser.setcallback(5, catalogcallback, None) parser.setcallback(6, identcallback, None) parser.setcallback(7, controlcallback, None) if len(args) >= 2: if len(args) >= 3: [min, sec, frame] = args[:3] else: [min, sec] = args frame = 0 min, sec, frame = eval(min), eval(sec), eval(frame) print 'Seek to', triple(min, sec, frame) dummy = player.seek(min, sec, frame) elif len(args) == 1: track = eval(args[0]) print 'Seek to track', track dummy = player.seektrack(track) else: min, sec, frame = player.getstatus()[5:8] print 'Try to seek back to', triple(min, sec, frame) try: player.seek(min, sec, frame) except RuntimeError: print 'Seek failed' try: while 1: frames = player.readda(size) if frames == '': print 'END OF CD' break parser.parseframe(frames) except KeyboardInterrupt: print '[Interrupted]' pass | c0043be8082881ee61e725accffc2d7f40d1d9b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c0043be8082881ee61e725accffc2d7f40d1d9b5/sendcd.py |
frame = 0 | frame = '0' | def main(): try: optlist, args = getopt.getopt(sys.argv[1:], 'ls') except getopt.error, msg: sys.stderr.write(msg + '\n') sys.exit(2) player = cd.open() prstatus(player) size = player.bestreadsize() if optlist: for opt, arg in optlist: if opt == '-l': prtrackinfo(player) elif opt == '-s': prstatus(player) return sys.stdout.write('waiting for socket... ') sys.stdout.flush() port = socket(AF_INET, SOCK_DGRAM) port.connect(HOST, PORT) print 'socket connected' parser = cd.createparser() parser.setcallback(0, audiocallback, port) parser.setcallback(1, pnumcallback, player) parser.setcallback(2, indexcallback, None) ## 3 = ptime: too many calls ## 4 = atime: too many calls parser.setcallback(5, catalogcallback, None) parser.setcallback(6, identcallback, None) parser.setcallback(7, controlcallback, None) if len(args) >= 2: if len(args) >= 3: [min, sec, frame] = args[:3] else: [min, sec] = args frame = 0 min, sec, frame = eval(min), eval(sec), eval(frame) print 'Seek to', triple(min, sec, frame) dummy = player.seek(min, sec, frame) elif len(args) == 1: track = eval(args[0]) print 'Seek to track', track dummy = player.seektrack(track) else: min, sec, frame = player.getstatus()[5:8] print 'Try to seek back to', triple(min, sec, frame) try: player.seek(min, sec, frame) except RuntimeError: print 'Seek failed' try: while 1: frames = player.readda(size) if frames == '': print 'END OF CD' break parser.parseframe(frames) except KeyboardInterrupt: print '[Interrupted]' pass | c0043be8082881ee61e725accffc2d7f40d1d9b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c0043be8082881ee61e725accffc2d7f40d1d9b5/sendcd.py |
min, sec, frame = player.getstatus()[5:8] | min, sec, frame = player.getstatus()[3] | def main(): try: optlist, args = getopt.getopt(sys.argv[1:], 'ls') except getopt.error, msg: sys.stderr.write(msg + '\n') sys.exit(2) player = cd.open() prstatus(player) size = player.bestreadsize() if optlist: for opt, arg in optlist: if opt == '-l': prtrackinfo(player) elif opt == '-s': prstatus(player) return sys.stdout.write('waiting for socket... ') sys.stdout.flush() port = socket(AF_INET, SOCK_DGRAM) port.connect(HOST, PORT) print 'socket connected' parser = cd.createparser() parser.setcallback(0, audiocallback, port) parser.setcallback(1, pnumcallback, player) parser.setcallback(2, indexcallback, None) ## 3 = ptime: too many calls ## 4 = atime: too many calls parser.setcallback(5, catalogcallback, None) parser.setcallback(6, identcallback, None) parser.setcallback(7, controlcallback, None) if len(args) >= 2: if len(args) >= 3: [min, sec, frame] = args[:3] else: [min, sec] = args frame = 0 min, sec, frame = eval(min), eval(sec), eval(frame) print 'Seek to', triple(min, sec, frame) dummy = player.seek(min, sec, frame) elif len(args) == 1: track = eval(args[0]) print 'Seek to track', track dummy = player.seektrack(track) else: min, sec, frame = player.getstatus()[5:8] print 'Try to seek back to', triple(min, sec, frame) try: player.seek(min, sec, frame) except RuntimeError: print 'Seek failed' try: while 1: frames = player.readda(size) if frames == '': print 'END OF CD' break parser.parseframe(frames) except KeyboardInterrupt: print '[Interrupted]' pass | c0043be8082881ee61e725accffc2d7f40d1d9b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c0043be8082881ee61e725accffc2d7f40d1d9b5/sendcd.py |
start_min, start_sec, start_frame, \ total_min, total_sec, total_frame = info[i] print 'Track', zfill(i+1), \ triple(start_min, start_sec, start_frame), \ triple(total_min, total_sec, total_frame) | start, total = info[i] print 'Track', zfill(i+1), triple(start), triple(total) | def prtrackinfo(player): info = [] while 1: try: info.append(player.gettrackinfo(len(info) + 1)) except RuntimeError: break for i in range(len(info)): start_min, start_sec, start_frame, \ total_min, total_sec, total_frame = info[i] print 'Track', zfill(i+1), \ triple(start_min, start_sec, start_frame), \ triple(total_min, total_sec, total_frame) | c0043be8082881ee61e725accffc2d7f40d1d9b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c0043be8082881ee61e725accffc2d7f40d1d9b5/sendcd.py |
state, track, min, sec, frame, abs_min, abs_sec, abs_frame, \ total_min, total_sec, total_frame, first, last, scsi_audio, \ cur_block, dum1, dum2, dum3 = player.getstatus() | state, track, curtime, abstime, totaltime, first, last, \ scsi_audio, cur_block, dummy = player.getstatus() | def prstatus(player): state, track, min, sec, frame, abs_min, abs_sec, abs_frame, \ total_min, total_sec, total_frame, first, last, scsi_audio, \ cur_block, dum1, dum2, dum3 = player.getstatus() print 'Status:', if 0 <= state < len(statedict): print statedict[state] else: print state print 'Track: ', track print 'Time: ', triple(min, sec, frame) print 'Abs: ', triple(abs_min, abs_sec, abs_frame) print 'Total: ', triple(total_min, total_sec, total_frame) print 'First: ', first print 'Last: ', last print 'SCSI: ', scsi_audio print 'Block: ', cur_block print 'Future:', (dum1, dum2, dum3) | c0043be8082881ee61e725accffc2d7f40d1d9b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c0043be8082881ee61e725accffc2d7f40d1d9b5/sendcd.py |
print 'Time: ', triple(min, sec, frame) print 'Abs: ', triple(abs_min, abs_sec, abs_frame) print 'Total: ', triple(total_min, total_sec, total_frame) | print 'Time: ', triple(curtime) print 'Abs: ', triple(abstime) print 'Total: ', triple(totaltime) | def prstatus(player): state, track, min, sec, frame, abs_min, abs_sec, abs_frame, \ total_min, total_sec, total_frame, first, last, scsi_audio, \ cur_block, dum1, dum2, dum3 = player.getstatus() print 'Status:', if 0 <= state < len(statedict): print statedict[state] else: print state print 'Track: ', track print 'Time: ', triple(min, sec, frame) print 'Abs: ', triple(abs_min, abs_sec, abs_frame) print 'Total: ', triple(total_min, total_sec, total_frame) print 'First: ', first print 'Last: ', last print 'SCSI: ', scsi_audio print 'Block: ', cur_block print 'Future:', (dum1, dum2, dum3) | c0043be8082881ee61e725accffc2d7f40d1d9b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c0043be8082881ee61e725accffc2d7f40d1d9b5/sendcd.py |
print 'Future:', (dum1, dum2, dum3) | print 'Future:', dummy | def prstatus(player): state, track, min, sec, frame, abs_min, abs_sec, abs_frame, \ total_min, total_sec, total_frame, first, last, scsi_audio, \ cur_block, dum1, dum2, dum3 = player.getstatus() print 'Status:', if 0 <= state < len(statedict): print statedict[state] else: print state print 'Track: ', track print 'Time: ', triple(min, sec, frame) print 'Abs: ', triple(abs_min, abs_sec, abs_frame) print 'Total: ', triple(total_min, total_sec, total_frame) print 'First: ', first print 'Last: ', last print 'SCSI: ', scsi_audio print 'Block: ', cur_block print 'Future:', (dum1, dum2, dum3) | c0043be8082881ee61e725accffc2d7f40d1d9b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c0043be8082881ee61e725accffc2d7f40d1d9b5/sendcd.py |
def triple(a, b, c): | def triple((a, b, c)): | def triple(a, b, c): return zfill(a) + ':' + zfill(b) + ':' + zfill(c) | c0043be8082881ee61e725accffc2d7f40d1d9b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c0043be8082881ee61e725accffc2d7f40d1d9b5/sendcd.py |
map = socket_map | map = self._map | def add_channel(self, map=None): #self.log_info('adding channel %s' % self) if map is None: map = socket_map map[self._fileno] = self | 19175f547b8d22a1440208ee97447cf9099e00be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/19175f547b8d22a1440208ee97447cf9099e00be/asyncore.py |
map = socket_map | map = self._map | def del_channel(self, map=None): fd = self._fileno if map is None: map = socket_map if map.has_key(fd): #self.log_info('closing channel %d:%s' % (fd, self)) del map[fd] | 19175f547b8d22a1440208ee97447cf9099e00be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/19175f547b8d22a1440208ee97447cf9099e00be/asyncore.py |
for i in ['_exit']: try: exec "from nt import " + i except ImportError: pass | try: from nt import _exit except ImportError: pass | def _get_exports_list(module): try: return list(module.__all__) except AttributeError: return [n for n in dir(module) if n[0] != '_'] | db8fff2ba1164335c8def37385fa3e0e8ccdf2f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/db8fff2ba1164335c8def37385fa3e0e8ccdf2f4/os.py |
for i in ['_exit']: try: exec "from ce import " + i except ImportError: pass | try: from ce import _exit except ImportError: pass | def _get_exports_list(module): try: return list(module.__all__) except AttributeError: return [n for n in dir(module) if n[0] != '_'] | db8fff2ba1164335c8def37385fa3e0e8ccdf2f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/db8fff2ba1164335c8def37385fa3e0e8ccdf2f4/os.py |
other = HMAC("") | other = HMAC(_secret_backdoor_key) | def copy(self): """Return a separate copy of this hashing object. | 697b3781b45af0d29805e232627d8e150a7850e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/697b3781b45af0d29805e232627d8e150a7850e8/hmac.py |
import MacOS | def __init__(self, timer=None): self.timings = {} self.cur = None self.cmd = "" | 281ea987ee0ac4856f011c007e861128a909dc3c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/281ea987ee0ac4856f011c007e861128a909dc3c/profile.py |
|
if not type: type = 'file' | if not type: type = 'file' | def open(self, fullurl, data=None): fullurl = unwrap(fullurl) if self.tempcache and self.tempcache.has_key(fullurl): filename, headers = self.tempcache[fullurl] fp = open(filename, 'rb') return addinfourl(fp, headers, fullurl) type, url = splittype(fullurl) if not type: type = 'file' if self.proxies.has_key(type): proxy = self.proxies[type] type, proxy = splittype(proxy) host, selector = splithost(proxy) url = (host, fullurl) # Signal special case to open_*() name = 'open_' + type if '-' in name: # replace - with _ name = string.join(string.split(name, '-'), '_') if not hasattr(self, name): if data is None: return self.open_unknown(fullurl) else: return self.open_unknown(fullurl, data) try: if data is None: return getattr(self, name)(url) else: return getattr(self, name)(url, data) except socket.error, msg: raise IOError, ('socket error', msg), sys.exc_info()[2] | 2d38d3f1f4ff990c5bea7bc3505e01b697c7563f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2d38d3f1f4ff990c5bea7bc3505e01b697c7563f/urllib.py |
match = _hostprog.match(url) | match = _hostprog.match(url) | def splithost(url): global _hostprog if _hostprog is None: import re _hostprog = re.compile('^//([^/]+)(.*)$') match = _hostprog.match(url) if match: return match.group(1, 2) return None, url | 2d38d3f1f4ff990c5bea7bc3505e01b697c7563f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2d38d3f1f4ff990c5bea7bc3505e01b697c7563f/urllib.py |
match = _userprog.match(host) | match = _userprog.match(host) | def splituser(host): global _userprog if _userprog is None: import re _userprog = re.compile('^([^@]*)@(.*)$') match = _userprog.match(host) if match: return match.group(1, 2) return None, host | 2d38d3f1f4ff990c5bea7bc3505e01b697c7563f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2d38d3f1f4ff990c5bea7bc3505e01b697c7563f/urllib.py |
match = _passwdprog.match(user) | match = _passwdprog.match(user) | def splitpasswd(user): global _passwdprog if _passwdprog is None: import re _passwdprog = re.compile('^([^:]*):(.*)$') match = _passwdprog.match(user) if match: return match.group(1, 2) return user, None | 2d38d3f1f4ff990c5bea7bc3505e01b697c7563f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2d38d3f1f4ff990c5bea7bc3505e01b697c7563f/urllib.py |
match = _portprog.match(host) | match = _portprog.match(host) | def splitport(host): global _portprog if _portprog is None: import re _portprog = re.compile('^(.*):([0-9]+)$') match = _portprog.match(host) if match: return match.group(1, 2) return host, None | 2d38d3f1f4ff990c5bea7bc3505e01b697c7563f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2d38d3f1f4ff990c5bea7bc3505e01b697c7563f/urllib.py |
match = _nportprog.match(host) | match = _nportprog.match(host) | def splitnport(host, defport=-1): global _nportprog if _nportprog is None: import re _nportprog = re.compile('^(.*):(.*)$') match = _nportprog.match(host) if match: host, port = match.group(1, 2) try: if not port: raise string.atoi_error, "no digits" nport = string.atoi(port) except string.atoi_error: nport = None return host, nport return host, defport | 2d38d3f1f4ff990c5bea7bc3505e01b697c7563f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2d38d3f1f4ff990c5bea7bc3505e01b697c7563f/urllib.py |
match = _queryprog.match(url) | match = _queryprog.match(url) | def splitquery(url): global _queryprog if _queryprog is None: import re _queryprog = re.compile('^(.*)\?([^?]*)$') match = _queryprog.match(url) if match: return match.group(1, 2) return url, None | 2d38d3f1f4ff990c5bea7bc3505e01b697c7563f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2d38d3f1f4ff990c5bea7bc3505e01b697c7563f/urllib.py |
match = _tagprog.match(url) | match = _tagprog.match(url) | def splittag(url): global _tagprog if _tagprog is None: import re _tagprog = re.compile('^(.*)#([^#]*)$') match = _tagprog.match(url) if match: return match.group(1, 2) return url, None | 2d38d3f1f4ff990c5bea7bc3505e01b697c7563f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2d38d3f1f4ff990c5bea7bc3505e01b697c7563f/urllib.py |
if hasattr(socket, 'AF_UNIX'): class UnixStreamServer(TCPServer): address_family = socket.AF_UNIX class UnixDatagramServer(UDPServer): address_family = socket.AF_UNIX | def server_activate(self): # No need to call listen() for UDP. pass | da237d0cde73a809b5be5c33c871747515da3756 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/da237d0cde73a809b5be5c33c871747515da3756/SocketServer.py |
|
dry_run=0): CCompiler.__init__ (self, verbose, dry_run) | dry_run=0, force=0): CCompiler.__init__ (self, verbose, dry_run, force) | def __init__ (self, verbose=0, dry_run=0): | 2eb3867e8dff3a0d22bd6a90398938ccc002e01b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2eb3867e8dff3a0d22bd6a90398938ccc002e01b/unixccompiler.py |
skipped = newer_pairwise (sources, objects) for skipped_pair in skipped: self.announce ("skipping %s (%s up-to-date)" % skipped_pair) | if not self.force: skipped = newer_pairwise (sources, objects) for skipped_pair in skipped: self.announce ("skipping %s (%s up-to-date)" % skipped_pair) | def compile (self, sources, output_dir=None, macros=None, includes=None, extra_preargs=None, extra_postargs=None): | 2eb3867e8dff3a0d22bd6a90398938ccc002e01b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2eb3867e8dff3a0d22bd6a90398938ccc002e01b/unixccompiler.py |
lib_opts = gen_lib_options (self.library_dirs + library_dirs, self.libraries + libraries, "-L%s", "-l%s") | lib_opts = gen_lib_options (self, self.library_dirs + library_dirs, self.libraries + libraries) | def link_shared_object (self, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, extra_preargs=None, extra_postargs=None): | 2eb3867e8dff3a0d22bd6a90398938ccc002e01b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2eb3867e8dff3a0d22bd6a90398938ccc002e01b/unixccompiler.py |
try: newer = newer_group (objects, output_filename) except OSError: if self.dry_run: newer = 1 else: raise if newer: ld_args = self.ldflags_shared + lib_opts + \ objects + ['-o', output_filename] | if not self.force: try: newer = newer_group (objects, output_filename) except OSError: if self.dry_run: newer = 1 else: raise if self.force or newer: ld_args = self.ldflags_shared + objects + \ lib_opts + ['-o', output_filename] | def link_shared_object (self, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, extra_preargs=None, extra_postargs=None): | 2eb3867e8dff3a0d22bd6a90398938ccc002e01b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2eb3867e8dff3a0d22bd6a90398938ccc002e01b/unixccompiler.py |
return "lib%s%s" % (libname, self._static_lib_ext ) | return "lib%s%s" % (libname, self._static_lib_ext) | def library_filename (self, libname): return "lib%s%s" % (libname, self._static_lib_ext ) | 2eb3867e8dff3a0d22bd6a90398938ccc002e01b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2eb3867e8dff3a0d22bd6a90398938ccc002e01b/unixccompiler.py |
return "lib%s%s" % (libname, self._shared_lib_ext ) | return "lib%s%s" % (libname, self._shared_lib_ext) def library_dir_option (self, dir): return "-L" + dir def library_option (self, lib): return "-l" + lib def find_library_file (self, dirs, lib): for dir in dirs: shared = os.path.join (dir, self.shared_library_filename (lib)) static = os.path.join (dir, self.library_filename (lib)) if os.path.exists (shared): return shared elif os.path.exists (static): return static else: return None | def shared_library_filename (self, libname): return "lib%s%s" % (libname, self._shared_lib_ext ) | 2eb3867e8dff3a0d22bd6a90398938ccc002e01b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2eb3867e8dff3a0d22bd6a90398938ccc002e01b/unixccompiler.py |
prefix = buf[345:500] while prefix and prefix[-1] == NUL: prefix = prefix[:-1] if len(prefix.split(NUL)) == 1: tarinfo.prefix = prefix tarinfo.name = normpath(os.path.join(tarinfo.prefix, tarinfo.name)) else: tarinfo.prefix = buf[345:500] | if tarinfo.type != GNUTYPE_SPARSE: tarinfo.name = normpath(os.path.join(nts(tarinfo.prefix), tarinfo.name)) | def frombuf(cls, buf): """Construct a TarInfo object from a 512 byte string buffer. """ tarinfo = cls() tarinfo.name = nts(buf[0:100]) tarinfo.mode = int(buf[100:108], 8) tarinfo.uid = int(buf[108:116],8) tarinfo.gid = int(buf[116:124],8) tarinfo.size = long(buf[124:136], 8) tarinfo.mtime = long(buf[136:148], 8) tarinfo.chksum = int(buf[148:156], 8) tarinfo.type = buf[156:157] tarinfo.linkname = nts(buf[157:257]) tarinfo.uname = nts(buf[265:297]) tarinfo.gname = nts(buf[297:329]) try: tarinfo.devmajor = int(buf[329:337], 8) tarinfo.devminor = int(buf[337:345], 8) except ValueError: tarinfo.devmajor = tarinfo.devmajor = 0 | abdca0f423be8cc8ebdbada4a3060f6d444dff21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/abdca0f423be8cc8ebdbada4a3060f6d444dff21/tarfile.py |
print a, k | print a, sortdict(k) | def f(*a, **k): print a, k | 23ea25473209b6ebaddfdaedecd2a1f42a4c674b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/23ea25473209b6ebaddfdaedecd2a1f42a4c674b/test_extcall.py |
print x, y, z | print x, y, sortdict(z) | def g(x, *y, **z): print x, y, z | 23ea25473209b6ebaddfdaedecd2a1f42a4c674b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/23ea25473209b6ebaddfdaedecd2a1f42a4c674b/test_extcall.py |
print d print d2 | print sortdict(d) print sortdict(d2) | def __getitem__(self, i): if i < 3: return i else: raise IndexError, i | 23ea25473209b6ebaddfdaedecd2a1f42a4c674b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/23ea25473209b6ebaddfdaedecd2a1f42a4c674b/test_extcall.py |
print func.func_name, args, kwdict, '->', | print func.func_name, args, sortdict(kwdict), '->', | decl = 'def %s(%s): print "ok %s", a, b, d, e, v, k' % ( name, string.join(arglist, ', '), name) | 23ea25473209b6ebaddfdaedecd2a1f42a4c674b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/23ea25473209b6ebaddfdaedecd2a1f42a4c674b/test_extcall.py |
self.filename = file | self.filename = filename | def __init__(self, msg, filename=None, lineno=None): self.filename = file self.lineno = lineno self.msg = msg Exception.__init__(self, msg) | 66d4d9c9813503bbabf0911acc31b7676e83a17b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66d4d9c9813503bbabf0911acc31b7676e83a17b/netrc.py |
self.emit('ROT_TWO') self.visit(k) | self.emit('ROT_THREE') | def visitDict(self, node): lineno = getattr(node, 'lineno', None) if lineno: self.emit('SET_LINENO', lineno) self.emit('BUILD_MAP', 0) for k, v in node.items: lineno2 = getattr(node, 'lineno', None) if lineno2 is not None and lineno != lineno2: self.emit('SET_LINENO', lineno2) lineno = lineno2 self.emit('DUP_TOP') self.visit(v) self.emit('ROT_TWO') self.visit(k) self.emit('STORE_SUBSCR') | 41e6b957e33735d3fcfcc9511d3ce9ed55b4dc99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/41e6b957e33735d3fcfcc9511d3ce9ed55b4dc99/pycodegen.py |
while 1: | rv = "(unknown file)", 0, "(unknown function)" while hasattr(f, "f_code"): | def findCaller(self): """ Find the stack frame of the caller so that we can note the source file name, line number and function name. """ f = currentframe().f_back while 1: co = f.f_code filename = os.path.normcase(co.co_filename) if filename == _srcfile: f = f.f_back continue return filename, f.f_lineno, co.co_name | a406b2cb5829da3ac37e700284a734eaa994b623 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a406b2cb5829da3ac37e700284a734eaa994b623/__init__.py |
return filename, f.f_lineno, co.co_name | rv = (filename, f.f_lineno, co.co_name) break return rv | def findCaller(self): """ Find the stack frame of the caller so that we can note the source file name, line number and function name. """ f = currentframe().f_back while 1: co = f.f_code filename = os.path.normcase(co.co_filename) if filename == _srcfile: f = f.f_back continue return filename, f.f_lineno, co.co_name | a406b2cb5829da3ac37e700284a734eaa994b623 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a406b2cb5829da3ac37e700284a734eaa994b623/__init__.py |
except UnboundLocalError: | except NameError: | def inner(): return y | 161c2ab75c91b6de58b00e8876687b3d90096aaf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/161c2ab75c91b6de58b00e8876687b3d90096aaf/test_scope.py |
global DEBUG DEBUG=1 | def main(): global DEBUG DEBUG=1 # Find the template # (there's no point in proceeding if we can't find it) template = findtemplate() if DEBUG: print 'Using template', template # Ask for source text if not specified in sys.argv[1:] if not sys.argv[1:]: srcfss, ok = macfs.PromptGetFile('Select Python source file:', 'TEXT') if not ok: return filename = srcfss.as_pathname() tp, tf = os.path.split(filename) if tf[-3:] == '.py': tf = tf[:-3] else: tf = tf + '.applet' dstfss, ok = macfs.StandardPutFile('Save application as:', tf) if not ok: return process(template, filename, dstfss.as_pathname()) else: # Loop over all files to be processed for filename in sys.argv[1:]: process(template, filename, '') | 20feb27a9206b105a829df5f54866c8310bed40c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20feb27a9206b105a829df5f54866c8310bed40c/BuildApplet.py |
|
vereq(hash(d), id(d)) | orig_hash = hash(d) | def subclasspropagation(): if verbose: print "Testing propagation of slot functions to subclasses..." class A(object): pass class B(A): pass class C(A): pass class D(B, C): pass d = D() vereq(hash(d), id(d)) A.__hash__ = lambda self: 42 vereq(hash(d), 42) C.__hash__ = lambda self: 314 vereq(hash(d), 314) B.__hash__ = lambda self: 144 vereq(hash(d), 144) D.__hash__ = lambda self: 100 vereq(hash(d), 100) del D.__hash__ vereq(hash(d), 144) del B.__hash__ vereq(hash(d), 314) del C.__hash__ vereq(hash(d), 42) del A.__hash__ vereq(hash(d), id(d)) d.foo = 42 d.bar = 42 vereq(d.foo, 42) vereq(d.bar, 42) def __getattribute__(self, name): if name == "foo": return 24 return object.__getattribute__(self, name) A.__getattribute__ = __getattribute__ vereq(d.foo, 24) vereq(d.bar, 42) def __getattr__(self, name): if name in ("spam", "foo", "bar"): return "hello" raise AttributeError, name B.__getattr__ = __getattr__ vereq(d.spam, "hello") vereq(d.foo, 24) vereq(d.bar, 42) del A.__getattribute__ vereq(d.foo, 42) del d.foo vereq(d.foo, "hello") vereq(d.bar, 42) del B.__getattr__ try: d.foo except AttributeError: pass else: raise TestFailed, "d.foo should be undefined now" # Test a nasty bug in recurse_down_subclasses() import gc class A(object): pass class B(A): pass del B gc.collect() A.__setitem__ = lambda *a: None # crash | ca7284141169aadddd3a205dc1b92d4393e64245 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ca7284141169aadddd3a205dc1b92d4393e64245/test_descr.py |
vereq(hash(d), id(d)) | vereq(hash(d), orig_hash) | def subclasspropagation(): if verbose: print "Testing propagation of slot functions to subclasses..." class A(object): pass class B(A): pass class C(A): pass class D(B, C): pass d = D() vereq(hash(d), id(d)) A.__hash__ = lambda self: 42 vereq(hash(d), 42) C.__hash__ = lambda self: 314 vereq(hash(d), 314) B.__hash__ = lambda self: 144 vereq(hash(d), 144) D.__hash__ = lambda self: 100 vereq(hash(d), 100) del D.__hash__ vereq(hash(d), 144) del B.__hash__ vereq(hash(d), 314) del C.__hash__ vereq(hash(d), 42) del A.__hash__ vereq(hash(d), id(d)) d.foo = 42 d.bar = 42 vereq(d.foo, 42) vereq(d.bar, 42) def __getattribute__(self, name): if name == "foo": return 24 return object.__getattribute__(self, name) A.__getattribute__ = __getattribute__ vereq(d.foo, 24) vereq(d.bar, 42) def __getattr__(self, name): if name in ("spam", "foo", "bar"): return "hello" raise AttributeError, name B.__getattr__ = __getattr__ vereq(d.spam, "hello") vereq(d.foo, 24) vereq(d.bar, 42) del A.__getattribute__ vereq(d.foo, 42) del d.foo vereq(d.foo, "hello") vereq(d.bar, 42) del B.__getattr__ try: d.foo except AttributeError: pass else: raise TestFailed, "d.foo should be undefined now" # Test a nasty bug in recurse_down_subclasses() import gc class A(object): pass class B(A): pass del B gc.collect() A.__setitem__ = lambda *a: None # crash | ca7284141169aadddd3a205dc1b92d4393e64245 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ca7284141169aadddd3a205dc1b92d4393e64245/test_descr.py |
if len(segments) >= 2 and segments[-1] == '..': | if len(segments) == 2 and segments[1] == '..' and segments[0] == '': segments[-1] = '' elif len(segments) >= 2 and segments[-1] == '..': | def urljoin(base, url, allow_framents = 1): if not base: return url bscheme, bnetloc, bpath, bparams, bquery, bfragment = \ urlparse(base, '', allow_framents) scheme, netloc, path, params, query, fragment = \ urlparse(url, bscheme, allow_framents) # XXX Unofficial hack: default netloc to bnetloc even if # schemes differ if scheme != bscheme and not netloc and \ scheme in uses_relative and bscheme in uses_relative and \ scheme in uses_netloc and bscheme in uses_netloc: netloc = bnetloc # Strip the port number i = find(netloc, '@') if i < 0: i = 0 i = find(netloc, ':', i) if i >= 0: netloc = netloc[:i] if scheme != bscheme or scheme not in uses_relative: return urlunparse((scheme, netloc, path, params, query, fragment)) if scheme in uses_netloc: if netloc: return urlunparse((scheme, netloc, path, params, query, fragment)) netloc = bnetloc if path[:1] == '/': return urlunparse((scheme, netloc, path, params, query, fragment)) if not path: return urlunparse((scheme, netloc, bpath, params, query or bquery, fragment)) i = rfind(bpath, '/') if i >= 0: path = bpath[:i] + '/' + path segments = splitfields(path, '/') if segments[-1] == '.': segments[-1] = '' while '.' in segments: segments.remove('.') while 1: i = 1 n = len(segments) - 1 while i < n: if segments[i] == '..' and segments[i-1]: del segments[i-1:i+1] break i = i+1 else: break if len(segments) >= 2 and segments[-1] == '..': segments[-2:] = [''] return urlunparse((scheme, netloc, joinfields(segments, '/'), params, query, fragment)) | d3d585f7b6c4b091ee9fc9d580d5b998c07d625f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d3d585f7b6c4b091ee9fc9d580d5b998c07d625f/urlparse.py |
'%define version ' + self.distribution.get_version(), '%define release ' + self.release, | '%define version ' + self.distribution.get_version().replace('-','_'), '%define release ' + self.release.replace('-','_'), | def _make_spec_file(self): """Generate the text of an RPM spec file and return it as a list of strings (one per line). """ # definitions and headers spec_file = [ '%define name ' + self.distribution.get_name(), '%define version ' + self.distribution.get_version(), '%define release ' + self.release, '', 'Summary: ' + self.distribution.get_description(), ] | f1d91665759a1c9578ca0c28a60b6da834c577b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f1d91665759a1c9578ca0c28a60b6da834c577b5/bdist_rpm.py |
val = int(value) self.write("<value><int>%s</int></value>\n" % val) | if value > MAXINT or value < MININT: raise OverflowError, "long int exceeds XML-RPC limits" self.write("<value><int>%s</int></value>\n" % int(value)) | def dump_long(self, value): val = int(value) self.write("<value><int>%s</int></value>\n" % val) | b27a24624a33c4a9b1b7f0490b064ca86434409e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b27a24624a33c4a9b1b7f0490b064ca86434409e/xmlrpclib.py |
if address[0] == '<' and address[-1] == '>' and address != '<>': | if not address: pass elif address[0] == '<' and address[-1] == '>' and address != '<>': | def __getaddr(self, keyword, arg): address = None keylen = len(keyword) if arg[:keylen].upper() == keyword: address = arg[keylen:].strip() if address[0] == '<' and address[-1] == '>' and address != '<>': # Addresses can be in the form <[email protected]> but watch out # for null address, e.g. <> address = address[1:-1] return address | 80fdb76f6150dfe027d00c4c08549090e7a9da4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/80fdb76f6150dfe027d00c4c08549090e7a9da4b/smtpd.py |
print cmd | def _remote(self, action, autoraise): raise_opt = ("-noraise", "-raise")[autoraise] cmd = "%s %s -remote '%s' >/dev/null 2>&1" % (self.name, raise_opt, action) print cmd rc = os.system(cmd) if rc: import time os.system("%s &" % self.name) time.sleep(PROCESS_CREATION_DELAY) rc = os.system(cmd) return not rc | 662a3fd1d8fefc7ae6f387a0179f1c12cdcdc77f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/662a3fd1d8fefc7ae6f387a0179f1c12cdcdc77f/webbrowser.py |
|
_tryorder = ("mozilla","netscape","kfm","grail","links","lynx","w3m") | _tryorder = ["mozilla","netscape","kfm","grail","links","lynx","w3m"] | def open_new(self, url): self.open(url) | 662a3fd1d8fefc7ae6f387a0179f1c12cdcdc77f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/662a3fd1d8fefc7ae6f387a0179f1c12cdcdc77f/webbrowser.py |
_tryorder = ("netscape", "windows-default") | _tryorder = ["netscape", "windows-default"] | def open_new(self, url): self.open(url) | 662a3fd1d8fefc7ae6f387a0179f1c12cdcdc77f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/662a3fd1d8fefc7ae6f387a0179f1c12cdcdc77f/webbrowser.py |
_tryorder = ("internet-config", ) | _tryorder = ["internet-config"] | def open_new(self, url): self.open(url) | 662a3fd1d8fefc7ae6f387a0179f1c12cdcdc77f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/662a3fd1d8fefc7ae6f387a0179f1c12cdcdc77f/webbrowser.py |
_tryorder = ("os2netscape",) | _tryorder = ["os2netscape"] | def open_new(self, url): self.open(url) | 662a3fd1d8fefc7ae6f387a0179f1c12cdcdc77f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/662a3fd1d8fefc7ae6f387a0179f1c12cdcdc77f/webbrowser.py |
- excample: the Example object that failed | - example: the Example object that failed | def output_difference(self, example, got, optionflags): """ Return a string describing the differences between the expected output for a given example (`example`) and the actual output (`got`). `optionflags` is the set of option flags used to compare `want` and `got`. """ want = example.want # If <BLANKLINE>s are being used, then replace blank lines # with <BLANKLINE> in the actual output string. if not (optionflags & DONT_ACCEPT_BLANKLINE): got = re.sub('(?m)^[ ]*(?=\n)', BLANKLINE_MARKER, got) | 73688527519bbd05584e84677ad287c792a9cce8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/73688527519bbd05584e84677ad287c792a9cce8/doctest.py |
- excample: the Example object that failed | - example: the Example object that failed | def __str__(self): return str(self.test) | 73688527519bbd05584e84677ad287c792a9cce8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/73688527519bbd05584e84677ad287c792a9cce8/doctest.py |
filename = "<console | filename = "<pyshell | def runsource(self, source): # Extend base class to stuff the source in the line cache filename = "<console#%d>" % self.gid self.gid = self.gid + 1 lines = string.split(source, "\n") linecache.cache[filename] = len(source)+1, 0, lines, filename self.more = 0 return InteractiveInterpreter.runsource(self, source, filename) | da7b9c92feedbd56478e5ce885bb5ba812478f4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/da7b9c92feedbd56478e5ce885bb5ba812478f4a/PyShell.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.