rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
self.emit("static int initialized;", 0) | def visitModule(self, mod): self.emit(""" | ee33a34d4f6d7e33d3b6da7df3701570d9fff33a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ee33a34d4f6d7e33d3b6da7df3701570d9fff33a/asdl_c.py | |
self.emit('if(PyDict_SetItemString(d, "%s", (PyObject*)%s_type) < 0) return;' % (name, name), 1) | self.emit('if (PyDict_SetItemString(d, "%s", (PyObject*)%s_type) < 0) return;' % (name, name), 1) | def addObj(self, name): self.emit('if(PyDict_SetItemString(d, "%s", (PyObject*)%s_type) < 0) return;' % (name, name), 1) | ee33a34d4f6d7e33d3b6da7df3701570d9fff33a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ee33a34d4f6d7e33d3b6da7df3701570d9fff33a/asdl_c.py |
SGI and Linux/BSD version.""" | SGI and generic BSD version, for when openpty() fails.""" | def master_open(): """Open pty master and return (master_fd, tty_name). SGI and Linux/BSD version.""" try: import sgi except ImportError: pass else: try: tty_name, master_fd = sgi._getpty(FCNTL.O_RDWR, 0666, 0) except IOError, msg: raise os.error, msg return master_fd, tty_name for x in 'pqrstuvwxyzPQRST': for y in '01... | 66206c752a864c32589d0cd603b1ba6b5c963680 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66206c752a864c32589d0cd603b1ba6b5c963680/pty.py |
"""Open the pty slave and acquire the controlling terminal. Return the file descriptor. Linux version.""" | """slave_open(tty_name) -> slave_fd Open the pty slave and acquire the controlling terminal, returning opened filedescriptor. Deprecated, use openpty() instead.""" | def slave_open(tty_name): """Open the pty slave and acquire the controlling terminal. Return the file descriptor. Linux version.""" # (Should be universal? --Guido) return os.open(tty_name, FCNTL.O_RDWR) | 66206c752a864c32589d0cd603b1ba6b5c963680 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66206c752a864c32589d0cd603b1ba6b5c963680/pty.py |
"""Fork and make the child a session leader with a controlling terminal. Return (pid, master_fd).""" master_fd, tty_name = master_open() | """fork() -> (pid, master_fd) Fork and make the child a session leader with a controlling terminal.""" try: pid, fd = os.forkpty() except (AttributeError, OSError): pass else: if pid == CHILD: try: os.setsid() except OSError: pass return pid, fd master_fd, slave_fd = openpty() | def fork(): """Fork and make the child a session leader with a controlling terminal. Return (pid, master_fd).""" master_fd, tty_name = master_open() pid = os.fork() if pid == CHILD: # Establish a new session. os.setsid() # Acquire controlling terminal. slave_fd = slave_open(tty_name) os.close(master_fd) # Slave becom... | 66206c752a864c32589d0cd603b1ba6b5c963680 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66206c752a864c32589d0cd603b1ba6b5c963680/pty.py |
slave_fd = slave_open(tty_name) | def fork(): """Fork and make the child a session leader with a controlling terminal. Return (pid, master_fd).""" master_fd, tty_name = master_open() pid = os.fork() if pid == CHILD: # Establish a new session. os.setsid() # Acquire controlling terminal. slave_fd = slave_open(tty_name) os.close(master_fd) # Slave becom... | 66206c752a864c32589d0cd603b1ba6b5c963680 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66206c752a864c32589d0cd603b1ba6b5c963680/pty.py | |
def writen(fd, data): | def _writen(fd, data): | def writen(fd, data): """Write all the data to a descriptor.""" while data != '': n = os.write(fd, data) data = data[n:] | 66206c752a864c32589d0cd603b1ba6b5c963680 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66206c752a864c32589d0cd603b1ba6b5c963680/pty.py |
def read(fd): | def _read(fd): | def read(fd): """Default read function.""" return os.read(fd, 1024) | 66206c752a864c32589d0cd603b1ba6b5c963680 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66206c752a864c32589d0cd603b1ba6b5c963680/pty.py |
def copy(master_fd, master_read=read, stdin_read=read): | def _copy(master_fd, master_read=_read, stdin_read=_read): | def copy(master_fd, master_read=read, stdin_read=read): """Parent copy loop. Copies pty master -> standard output (master_read) standard input -> pty master (stdin_read)""" while 1: rfds, wfds, xfds = select( [master_fd, STDIN_FILENO], [], []) if master_fd in rfds: data = master_read(master_fd) os.write(STDOUT_FILENO, ... | 66206c752a864c32589d0cd603b1ba6b5c963680 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66206c752a864c32589d0cd603b1ba6b5c963680/pty.py |
writen(master_fd, data) | _writen(master_fd, data) | def copy(master_fd, master_read=read, stdin_read=read): """Parent copy loop. Copies pty master -> standard output (master_read) standard input -> pty master (stdin_read)""" while 1: rfds, wfds, xfds = select( [master_fd, STDIN_FILENO], [], []) if master_fd in rfds: data = master_read(master_fd) os.write(STDOUT_FILENO, ... | 66206c752a864c32589d0cd603b1ba6b5c963680 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66206c752a864c32589d0cd603b1ba6b5c963680/pty.py |
"could not extract parameter group: " + `line`) | "could not extract parameter %s for %s: %s" % (attrname, macroname, `line[:100]`)) | def subconvert(line, ofp, table, discards, autoclosing, knownempty, endchar=None): stack = [] while line: if line[0] == endchar and not stack: return line[1:] m = _comment_rx.match(line) if m: text = m.group(1) if text: ofp.write("(COMMENT\n") ofp.write("- %s \n" % encode(text)) ofp.write(")COMMENT\n") ofp.write("-\\n\... | 65ea149cb4a732c574c7391d20fb325a666bdf9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/65ea149cb4a732c574c7391d20fb325a666bdf9b/latex2esis.py |
co.co_firstlineno, co.co_lnotab) | co.co_firstlineno, co.co_lnotab, co.co_freevars, co.co_cellvars) | def replace_paths_in_code(self, co): new_filename = original_filename = os.path.normpath(co.co_filename) for f,r in self.replace_paths: if original_filename.startswith(f): new_filename = r+original_filename[len(f):] break | 0682e7c7301b8c25ddfb2a25513a222a6d4c59d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0682e7c7301b8c25ddfb2a25513a222a6d4c59d4/modulefinder.py |
pass | def __str__(self): return repr(self) | def _stringify(string): return string | 227f132b3134b8f29cc39b2982d71e159b3f8fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/227f132b3134b8f29cc39b2982d71e159b3f8fcf/xmlrpclib.py |
(repr(self.faultCode), repr(self.faultString)) | (self.faultCode, repr(self.faultString)) | def __repr__(self): return ( "<Fault %s: %s>" % (repr(self.faultCode), repr(self.faultString)) ) | 227f132b3134b8f29cc39b2982d71e159b3f8fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/227f132b3134b8f29cc39b2982d71e159b3f8fcf/xmlrpclib.py |
xmllib.XMLParser.__init__(self) | try: xmllib.XMLParser.__init__(self, accept_utf8=1) except TypeError: xmllib.XMLParser.__init__(self) | def __init__(self, target): import xmllib # lazy subclassing (!) if xmllib.XMLParser not in SlowParser.__bases__: SlowParser.__bases__ = (xmllib.XMLParser,) self.handle_xml = target.xml self.unknown_starttag = target.start self.handle_data = target.data self.unknown_endtag = target.end xmllib.XMLParser.__init__(self) | 227f132b3134b8f29cc39b2982d71e159b3f8fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/227f132b3134b8f29cc39b2982d71e159b3f8fcf/xmlrpclib.py |
messages (start, data, end). Call close to get the resulting | messages (start, data, end). Call close() to get the resulting | def dump_instance(self, value): # check for special wrappers if value.__class__ in WRAPPERS: value.encode(self) else: # store instance attributes as a struct (really?) self.dump_struct(value.__dict__) | 227f132b3134b8f29cc39b2982d71e159b3f8fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/227f132b3134b8f29cc39b2982d71e159b3f8fcf/xmlrpclib.py |
Note that this reader is fairly tolerant, and gladly accepts bogus XML-RPC data without complaining (but not bogus XML). | Note that this reader is fairly tolerant, and gladly accepts bogus XML-RPC data without complaining (but not bogus XML). | def dump_instance(self, value): # check for special wrappers if value.__class__ in WRAPPERS: value.encode(self) else: # store instance attributes as a struct (really?) self.dump_struct(value.__dict__) | 227f132b3134b8f29cc39b2982d71e159b3f8fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/227f132b3134b8f29cc39b2982d71e159b3f8fcf/xmlrpclib.py |
Create an instance of the fastest available parser, and attach it to an unmarshalling object. Return both objects. | Create an instance of the fastest available parser, and attach it to an unmarshalling object. Return both objects. | def getparser(): """getparser() -> parser, unmarshaller Create an instance of the fastest available parser, and attach it to an unmarshalling object. Return both objects. """ if FastParser and FastUnmarshaller: target = FastUnmarshaller(True, False, binary, datetime) parser = FastParser(target) else: target = Unmarsh... | 227f132b3134b8f29cc39b2982d71e159b3f8fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/227f132b3134b8f29cc39b2982d71e159b3f8fcf/xmlrpclib.py |
In addition to the data object, the following options can be given as keyword arguments: | In addition to the data object, the following options can be given as keyword arguments: | def dumps(params, methodname=None, methodresponse=None, encoding=None): """data [,options] -> marshalled data Convert an argument tuple or a Fault instance to an XML-RPC request (or response, if the methodresponse option is used). In addition to the data object, the following options can be given as keyword arguments... | 227f132b3134b8f29cc39b2982d71e159b3f8fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/227f132b3134b8f29cc39b2982d71e159b3f8fcf/xmlrpclib.py |
as necessary. | where necessary. | def dumps(params, methodname=None, methodresponse=None, encoding=None): """data [,options] -> marshalled data Convert an argument tuple or a Fault instance to an XML-RPC request (or response, if the methodresponse option is used). In addition to the data object, the following options can be given as keyword arguments... | 227f132b3134b8f29cc39b2982d71e159b3f8fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/227f132b3134b8f29cc39b2982d71e159b3f8fcf/xmlrpclib.py |
self.text.insert(mark, str(s), tags) | self.text.insert(mark, s, tags) | def write(self, s, tags=(), mark="insert"): self.text.insert(mark, str(s), tags) self.text.see(mark) self.text.update() | 7f4d1fe69940ee2edc0aa012cf68ab325ba8f4d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7f4d1fe69940ee2edc0aa012cf68ab325ba8f4d6/OutputWindow.py |
self.emit('PyObject_SetAttrString(result, "%s", value);' % a.name, 1) | self.emit('if (PyObject_SetAttrString(result, "%s", value) < 0)' % a.name, 1) self.emit('goto failed;', 2) self.emit('Py_DECREF(value);', 1) | def visitSum(self, sum, name): if is_simple(sum): self.simpleSum(sum, name) return self.func_begin(name) self.emit("switch (o->kind) {", 1) for i in range(len(sum.types)): t = sum.types[i] self.visitConstructor(t, i + 1, name) self.emit("}", 1) for a in sum.attributes: self.emit("value = ast2obj_%s(o->%s);" % (a.type, ... | 2e905019a009852d60233288979178362e312772 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2e905019a009852d60233288979178362e312772/asdl_c.py |
('cygwin.*', 'cygwin'), | ('cygwin.*', 'unix'), | def mkpath (self, name, mode=0777): mkpath (name, mode, self.verbose, self.dry_run) | a5ac73a95396a72f262233c976d284173886603d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a5ac73a95396a72f262233c976d284173886603d/ccompiler.py |
tests = [Signed_TestCase, Unsigned_TestCase] | tests = [Signed_TestCase, Unsigned_TestCase, Tuple_TestCase] | def test_main(): tests = [Signed_TestCase, Unsigned_TestCase] try: from _testcapi import getargs_L, getargs_K except ImportError: pass # PY_LONG_LONG not available else: tests.append(LongLong_TestCase) test_support.run_unittest(*tests) | 64fba5c8e58850bb4dbcb478fc7ca09491a6c5fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/64fba5c8e58850bb4dbcb478fc7ca09491a6c5fc/test_getargs2.py |
except (Carbon.File.error, ValueError): | except (Carbon.File.Error, ValueError): | def findtemplate(template=None): """Locate the applet template along sys.path""" if MacOS.runtimemodel == 'macho': if template: return template return findtemplate_macho() if not template: template=TEMPLATE for p in sys.path: file = os.path.join(p, template) try: file, d1, d2 = Carbon.File.FSResolveAliasFile(file, 1) b... | 6c9a3600dec166bdd0bccd5930e96b8620bea823 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6c9a3600dec166bdd0bccd5930e96b8620bea823/buildtools.py |
Res.FSCreateResourceFile(destdir, destfile, RESOURCE_FORK_NAME) | Res.FSCreateResourceFile(destdir, unicode(destfile), RESOURCE_FORK_NAME) | def process_common(template, progress, code, rsrcname, destname, is_update, copy_codefragment, raw=0, others=[]): if MacOS.runtimemodel == 'macho': return process_common_macho(template, progress, code, rsrcname, destname, is_update, raw, others) if others: raise BuildError, "Extra files only allowed for MachoPython app... | 6c9a3600dec166bdd0bccd5930e96b8620bea823 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6c9a3600dec166bdd0bccd5930e96b8620bea823/buildtools.py |
dset_fss = Carbon.File.FSSpec(destname) | dest_fss = Carbon.File.FSSpec(destname) | def process_common(template, progress, code, rsrcname, destname, is_update, copy_codefragment, raw=0, others=[]): if MacOS.runtimemodel == 'macho': return process_common_macho(template, progress, code, rsrcname, destname, is_update, raw, others) if others: raise BuildError, "Extra files only allowed for MachoPython app... | 6c9a3600dec166bdd0bccd5930e96b8620bea823 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6c9a3600dec166bdd0bccd5930e96b8620bea823/buildtools.py |
limit = sqrt(n+1) | limit = sqrt(float(n+1)) | def fact(n): if n < 1: raise error # fact() argument should be >= 1 if n == 1: return [] # special case res = [] # Treat even factors special, so we can use i = i+2 later while n%2 == 0: res.append(2) n = n/2 # Try odd numbers up to sqrt(n) limit = sqrt(n+1) i = 3 while i <= limit: if n%i == 0: res.append(i) n = n/i li... | 8d9a4634a08e030e231002276778ab4b68e95a4d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8d9a4634a08e030e231002276778ab4b68e95a4d/fact.py |
res.append(n) | if n != 1: res.append(n) | def fact(n): if n < 1: raise error # fact() argument should be >= 1 if n == 1: return [] # special case res = [] # Treat even factors special, so we can use i = i+2 later while n%2 == 0: res.append(2) n = n/2 # Try odd numbers up to sqrt(n) limit = sqrt(n+1) i = 3 while i <= limit: if n%i == 0: res.append(i) n = n/i li... | 8d9a4634a08e030e231002276778ab4b68e95a4d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8d9a4634a08e030e231002276778ab4b68e95a4d/fact.py |
exts.append( Extension('MacOS', ['macosmodule.c']) ) exts.append( Extension('icglue', ['icgluemodule.c']) ) exts.append( Extension('macfs', ['macfsmodule.c', '../Python/getapplbycreator.c']) ) exts.append( Extension('_CF', ['cf/_CFmodule.c'], extra_link_args=['-framework', 'CoreFoundation']) ) exts.append( Extension('_... | exts.append( Extension('MacOS', ['macosmodule.c'], extra_link_args=['-framework', 'Carbon']) ) exts.append( Extension('icglue', ['icgluemodule.c'], extra_link_args=['-framework', 'Carbon']) ) exts.append( Extension('macfs', ['macfsmodule.c', '../Python/getapplbycreator.c'], extra_link_args=['-framework', 'Carbon']) ) e... | def detect_modules(self): # Ensure that /usr/local is always used if '/usr/local/lib' not in self.compiler.library_dirs: self.compiler.library_dirs.insert(0, '/usr/local/lib') if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.insert(0, '/usr/local/include' ) | 5d17da08d106d09e9e5babe3488bc842be1d1f52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5d17da08d106d09e9e5babe3488bc842be1d1f52/setup.py |
exts.append( Extension('Nav', ['Nav.c']) ) exts.append( Extension('_AE', ['ae/_AEmodule.c']) ) exts.append( Extension('_App', ['app/_Appmodule.c']) ) exts.append( Extension('_Cm', ['cm/_Cmmodule.c']) ) exts.append( Extension('_Ctl', ['ctl/_Ctlmodule.c']) ) exts.append( Extension('_Dlg', ['dlg/_Dlgmodule.c']) ) exts.app... | exts.append( Extension('Nav', ['Nav.c'], extra_link_args=['-framework', 'Carbon']) ) exts.append( Extension('_AE', ['ae/_AEmodule.c'], extra_link_args=['-framework', 'Carbon']) ) exts.append( Extension('_App', ['app/_Appmodule.c'], extra_link_args=['-framework', 'Carbon']) ) exts.append( Extension('_Cm', ['cm/_Cmmodule... | def detect_modules(self): # Ensure that /usr/local is always used if '/usr/local/lib' not in self.compiler.library_dirs: self.compiler.library_dirs.insert(0, '/usr/local/lib') if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.insert(0, '/usr/local/include' ) | 5d17da08d106d09e9e5babe3488bc842be1d1f52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5d17da08d106d09e9e5babe3488bc842be1d1f52/setup.py |
extra_link_args=['-framework', 'QuickTime']) ) | extra_link_args=['-framework', 'QuickTime', '-framework', 'Carbon']) ) | def detect_modules(self): # Ensure that /usr/local is always used if '/usr/local/lib' not in self.compiler.library_dirs: self.compiler.library_dirs.insert(0, '/usr/local/lib') if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.insert(0, '/usr/local/include' ) | 5d17da08d106d09e9e5babe3488bc842be1d1f52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5d17da08d106d09e9e5babe3488bc842be1d1f52/setup.py |
exts.append( Extension('_TE', ['te/_TEmodule.c']) ) | exts.append( Extension('_TE', ['te/_TEmodule.c'], extra_link_args=['-framework', 'Carbon']) ) | def detect_modules(self): # Ensure that /usr/local is always used if '/usr/local/lib' not in self.compiler.library_dirs: self.compiler.library_dirs.insert(0, '/usr/local/lib') if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.insert(0, '/usr/local/include' ) | 5d17da08d106d09e9e5babe3488bc842be1d1f52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5d17da08d106d09e9e5babe3488bc842be1d1f52/setup.py |
exts.append( Extension('_Win', ['win/_Winmodule.c']) ) | exts.append( Extension('_Win', ['win/_Winmodule.c'], extra_link_args=['-framework', 'Carbon']) ) | def detect_modules(self): # Ensure that /usr/local is always used if '/usr/local/lib' not in self.compiler.library_dirs: self.compiler.library_dirs.insert(0, '/usr/local/lib') if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.insert(0, '/usr/local/include' ) | 5d17da08d106d09e9e5babe3488bc842be1d1f52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5d17da08d106d09e9e5babe3488bc842be1d1f52/setup.py |
class M2(object, D): | class M2(D, object): | def all_method(self): return "D b" | 8a1c43101e27f2143eb7d69d9e8d9c114f08f93a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8a1c43101e27f2143eb7d69d9e8d9c114f08f93a/test_descr.py |
vereq(M2.__mro__, (M2, object, D, C)) | vereq(M2.__mro__, (M2, D, C, object)) | def all_method(self): return "M2 b" | 8a1c43101e27f2143eb7d69d9e8d9c114f08f93a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8a1c43101e27f2143eb7d69d9e8d9c114f08f93a/test_descr.py |
class M3(M1, object, M2): | class M3(M1, M2, object): | def all_method(self): return "M2 b" | 8a1c43101e27f2143eb7d69d9e8d9c114f08f93a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8a1c43101e27f2143eb7d69d9e8d9c114f08f93a/test_descr.py |
vereq(M3.__mro__, (M3, M1, M2, D, C, object)) | vereq(M3.__mro__, (M3, M1, M2, D, C, object)) | def all_method(self): return "M3 b" | 8a1c43101e27f2143eb7d69d9e8d9c114f08f93a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8a1c43101e27f2143eb7d69d9e8d9c114f08f93a/test_descr.py |
class F(D, E): pass vereq(F().spam(), "B") vereq(F().boo(), "B") vereq(F.__mro__, (F, D, E, B, C, A, object)) class G(E, D): pass vereq(G().spam(), "B") vereq(G().boo(), "C") vereq(G.__mro__, (G, E, D, C, B, A, object)) | try: class F(D, E): pass except TypeError: pass else: raise TestFailed, "expected MRO order disagreement (F)" try: class G(E, D): pass except TypeError: pass else: raise TestFailed, "expected MRO order disagreement (G)" def ex5(): if verbose: print "Testing ex5 from C3 switch discussion..." class A(object): pass cl... | def boo(self): return "C" | 8a1c43101e27f2143eb7d69d9e8d9c114f08f93a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8a1c43101e27f2143eb7d69d9e8d9c114f08f93a/test_descr.py |
class C3(C1, C2): __slots__ = [] class C4(C2, C1): __slots__ = [] | def slotspecials(): if verbose: print "Testing __dict__ and __weakref__ in __slots__..." class D(object): __slots__ = ["__dict__"] a = D() verify(hasattr(a, "__dict__")) verify(not hasattr(a, "__weakref__")) a.foo = 42 vereq(a.__dict__, {"foo": 42}) class W(object): __slots__ = ["__weakref__"] a = W() verify(hasattr(... | 8a1c43101e27f2143eb7d69d9e8d9c114f08f93a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8a1c43101e27f2143eb7d69d9e8d9c114f08f93a/test_descr.py | |
class X(A,B,C,D): | class X(D,B,C,A): | def mro(cls): L = type.mro(cls) L.reverse() return L | 8a1c43101e27f2143eb7d69d9e8d9c114f08f93a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8a1c43101e27f2143eb7d69d9e8d9c114f08f93a/test_descr.py |
testboth("% testboth("% testboth("% testboth("% | testboth("% testboth("% testboth("% testboth("% | def testboth(formatstr, *args): testformat(formatstr, *args) testformat(unicode(formatstr), *args) | 20bda83d8d7716b108e744d79ccf0a25dacd2f93 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20bda83d8d7716b108e744d79ccf0a25dacd2f93/test_format.py |
pathlist = os.environ['PATH'].split(':') | pathlist = os.environ['PATH'].split(os.pathsep) | def msg(str): sys.stderr.write(str + '\n') | f71e2452330a06ea25597c7f311f025267f0f427 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f71e2452330a06ea25597c7f311f025267f0f427/which.py |
except: | except OSError: | def _run_child(self, cmd): if isinstance(cmd, types.StringTypes): cmd = ['/bin/sh', '-c', cmd] for i in range(3, MAXFD): try: os.close(i) except: pass try: os.execvp(cmd[0], cmd) finally: os._exit(1) | f12293d4900c00e13801bdd5929310d1fe199507 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f12293d4900c00e13801bdd5929310d1fe199507/popen2.py |
"conjoin": conjoin_tests} | "conjoin": conjoin_tests, "weakref": weakref_tests, } | >>> def gencopy(iterator): | 9e320652307a4ce9f7e498c438abfdbd5d85bfb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9e320652307a4ce9f7e498c438abfdbd5d85bfb1/test_generators.py |
"contact_email", "licence", "classifiers", | "contact_email", "license", "classifiers", | def is_pure (self): return (self.has_pure_modules() and not self.has_ext_modules() and not self.has_c_libraries()) | 06271ef5b8372972f1a04b114a1ee1b9edbf92fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/06271ef5b8372972f1a04b114a1ee1b9edbf92fd/dist.py |
flags = 0x57 | flags = 0x07 | def _StandardPutFile(prompt, default=None): args = {} flags = 0x57 if prompt: args['message'] = prompt args['preferenceKey'] = 'PyMC' if _movablemodal: args['eventProc'] = None try: rr = Nav.NavPutFile(args) good = 1 except Nav.error, arg: good = 0 fss = macfs.FSSpec(':cancelled') else: fss = rr.selection[0] return fss... | 40a1d8435290b90239f2641431e137f041a0853e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/40a1d8435290b90239f2641431e137f041a0853e/macfsn.py |
_curfolder = macfs.FSSpec(":") | rv = None | def _SetFolder(folder): global _curfolder if _curfolder: rv = _curfolder else: _curfolder = macfs.FSSpec(":") _curfolder = macfs.FSSpec(folder) return rv | 40a1d8435290b90239f2641431e137f041a0853e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/40a1d8435290b90239f2641431e137f041a0853e/macfsn.py |
flags = 0x57 | flags = 0x17 | def _GetDirectory(prompt=None): args = {} flags = 0x57 if prompt: args['message'] = prompt args['preferenceKey'] = 'PyMC' if _movablemodal: args['eventProc'] = None try: rr = Nav.NavChooseFolder(args) good = 1 except Nav.error, arg: good = 0 fss = macfs.FSSpec(':cancelled') else: fss = rr.selection[0] return fss, good | 40a1d8435290b90239f2641431e137f041a0853e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/40a1d8435290b90239f2641431e137f041a0853e/macfsn.py |
if h[0] == 'P' and h[1] in '123456' and h[2] in ' \t\n\r': | if len(h) >= 3 and \ h[0] == 'P' and h[1] in '123456' and h[2] in ' \t\n\r': | def test_pnm(h, f): # PBM, PGM, PPM (portable {bit,gray,pix}map; together portable anymap) if h[0] == 'P' and h[1] in '123456' and h[2] in ' \t\n\r': return 'pnm' | cc073e5007dadddaee1978b2c6edcaa129979402 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cc073e5007dadddaee1978b2c6edcaa129979402/imghdr.py |
moddir = os.path.join(os.getcwd(), 'Modules', srcdir) | moddir = os.path.join(os.getcwd(), srcdir, 'Modules') | def build_extensions(self): | 552057ba9ea7144f714d257d5e64b7f2b094732a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/552057ba9ea7144f714d257d5e64b7f2b094732a/setup.py |
input_charset = input_charset.lower() | input_charset = unicode(input_charset, 'ascii').lower() | def __init__(self, input_charset=DEFAULT_CHARSET): # RFC 2046, $4.1.2 says charsets are not case sensitive input_charset = input_charset.lower() # Set the input charset after filtering through the aliases self.input_charset = ALIASES.get(input_charset, input_charset) # We can try to guess which encoding and conversion ... | c1ec83c8f92b656930c2f385198bd58d3a9715c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c1ec83c8f92b656930c2f385198bd58d3a9715c8/Charset.py |
danger = [ x for x in tokens if x[0] == token.NAME and x[1] != 'n' ] if danger: raise ValueError, 'dangerous expression' | try: danger = [ x for x in tokens if x[0] == token.NAME and x[1] != 'n' ] except tokenize.TokenError: raise ValueError, \ 'plural forms expression error, maybe unbalanced parenthesis' else: if danger: raise ValueError, 'plural forms expression could be dangerous' | def c2py(plural): """ Gets a C expression as used in PO files for plural forms and returns a Python lambda function that implements an equivalent expression. """ # Security check, allow only the "n" identifier from StringIO import StringIO import token, tokenize tokens = tokenize.generate_tokens(StringIO(plural).readli... | 62e7abf73dc740553db9adaf8c23a6d0cc9f1a19 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/62e7abf73dc740553db9adaf8c23a6d0cc9f1a19/gettext.py |
expr = re.compile(r'\![^=]') plural = expr.sub(' not ', plural) | expr = re.compile(r'\!([^=])') plural = expr.sub(' not \\1', plural) | def c2py(plural): """ Gets a C expression as used in PO files for plural forms and returns a Python lambda function that implements an equivalent expression. """ # Security check, allow only the "n" identifier from StringIO import StringIO import token, tokenize tokens = tokenize.generate_tokens(StringIO(plural).readli... | 62e7abf73dc740553db9adaf8c23a6d0cc9f1a19 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/62e7abf73dc740553db9adaf8c23a6d0cc9f1a19/gettext.py |
if len(stack) == 0: | if len(stack) == 1: | def repl(x): return "test(%s, %s, %s)" % (x.group(1), x.group(2), expr.sub(repl, x.group(3))) | 62e7abf73dc740553db9adaf8c23a6d0cc9f1a19 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/62e7abf73dc740553db9adaf8c23a6d0cc9f1a19/gettext.py |
if mlen == 0 and tmsg.lower().startswith('project-id-version:'): | if mlen == 0: | def _parse(self, fp): """Override this method to support alternative .mo formats.""" unpack = struct.unpack filename = getattr(fp, 'name', '') # Parse the .mo file header, which consists of 5 little endian 32 # bit words. self._catalog = catalog = {} buf = fp.read() buflen = len(buf) # Are we big endian or little endia... | 62e7abf73dc740553db9adaf8c23a6d0cc9f1a19 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/62e7abf73dc740553db9adaf8c23a6d0cc9f1a19/gettext.py |
if len(sys.argv) != 2: sys.stderr.write('usage: telnet hostname\n') | if len(sys.argv) < 2: sys.stderr.write('usage: telnet hostname [port]\n') | def main(): if len(sys.argv) != 2: sys.stderr.write('usage: telnet hostname\n') sys.exit(2) host = sys.argv[1] try: hostaddr = gethostbyname(host) except error: sys.stderr.write(sys.argv[1] + ': bad host name\n') sys.exit(2) # if len(sys.argv) > 2: servname = sys.argv[2] else: servname = 'telnet' # if '0' <= servname[:... | 1b67980566dfa209f2040d77d7150769c065796e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1b67980566dfa209f2040d77d7150769c065796e/telnet.py |
s.connect(host, port) | s.connect((host, port)) | def main(): if len(sys.argv) != 2: sys.stderr.write('usage: telnet hostname\n') sys.exit(2) host = sys.argv[1] try: hostaddr = gethostbyname(host) except error: sys.stderr.write(sys.argv[1] + ': bad host name\n') sys.exit(2) # if len(sys.argv) > 2: servname = sys.argv[2] else: servname = 'telnet' # if '0' <= servname[:... | 1b67980566dfa209f2040d77d7150769c065796e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1b67980566dfa209f2040d77d7150769c065796e/telnet.py |
import os,sys | import os,sys,copy | # dlltool --dllname python15.dll --def python15.def \ | 9bfab1517b3821676f4155b7b1770b23625039f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9bfab1517b3821676f4155b7b1770b23625039f0/cygwinccompiler.py |
gcc_version = None dllwrap_version = None ld_version = None | obj_extension = ".o" static_lib_extension = ".a" shared_lib_extension = ".dll" static_lib_format = "lib%s%s" shared_lib_format = "%s%s" exe_extension = ".exe" | # dlltool --dllname python15.dll --def python15.def \ | 9bfab1517b3821676f4155b7b1770b23625039f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9bfab1517b3821676f4155b7b1770b23625039f0/cygwinccompiler.py |
if check_config_h()<=0: | check_result = check_config_h() self.debug_print("Python's GCC status: %s" % check_result) if check_result[:2] <> "OK": | def __init__ (self, verbose=0, dry_run=0, force=0): | 9bfab1517b3821676f4155b7b1770b23625039f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9bfab1517b3821676f4155b7b1770b23625039f0/cygwinccompiler.py |
sys.stderr.write(self.compiler_type + ": gcc %s, ld %s, dllwrap %s\n" % | self.debug_print(self.compiler_type + ": gcc %s, ld %s, dllwrap %s\n" % | def __init__ (self, verbose=0, dry_run=0, force=0): | 9bfab1517b3821676f4155b7b1770b23625039f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9bfab1517b3821676f4155b7b1770b23625039f0/cygwinccompiler.py |
extra_preargs = list(extra_preargs or []) libraries = list(libraries or []) | extra_preargs = copy.copy(extra_preargs or []) libraries = copy.copy(libraries or []) | def link_shared_object (self, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None): # use separate copies, so can modify the lists extra_preargs = list(extra_preargs or []) librar... | 9bfab1517b3821676f4155b7b1770b23625039f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9bfab1517b3821676f4155b7b1770b23625039f0/cygwinccompiler.py |
def check_config_h(): """Checks if the GCC compiler is mentioned in config.h. If it is not, compiling probably doesn't work. """ # return values # 2: OK, python was compiled with GCC # 1: OK, python's config.h mentions __GCC__ # 0: uncertain, because we couldn't check it # -1: probably not OK, because we didn't fou... | 9bfab1517b3821676f4155b7b1770b23625039f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9bfab1517b3821676f4155b7b1770b23625039f0/cygwinccompiler.py | ||
return 2 | return "OK, python was compiled with GCC" | def check_config_h(): """Checks if the GCC compiler is mentioned in config.h. If it is not, compiling probably doesn't work. """ # return values # 2: OK, python was compiled with GCC # 1: OK, python's config.h mentions __GCC__ # 0: uncertain, because we couldn't check it # -1: probably not OK, because we didn't fou... | 9bfab1517b3821676f4155b7b1770b23625039f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9bfab1517b3821676f4155b7b1770b23625039f0/cygwinccompiler.py |
return -1 else: return 1 | return "not OK, because we didn't found __GCC__ in config.h" else: return "OK, python's config.h mentions __GCC__" | # is somewhere a #ifdef __GNUC__ or something similar | 9bfab1517b3821676f4155b7b1770b23625039f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9bfab1517b3821676f4155b7b1770b23625039f0/cygwinccompiler.py |
return 0 | return "uncertain, because we couldn't check it" | # is somewhere a #ifdef __GNUC__ or something similar | 9bfab1517b3821676f4155b7b1770b23625039f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9bfab1517b3821676f4155b7b1770b23625039f0/cygwinccompiler.py |
Valid resource names: activebackground, activeforeground, anchor, background, bd, bg, bitmap, borderwidth, command, cursor, default, disabledforeground, fg, font, foreground, height, highlightbackground, highlightcolor, highlightthickness, image, justify, padx, pady, relief, state, takefocus, text, textvariable, under... | STANDARD OPTIONS activebackground, activeforeground, anchor, background, bitmap, borderwidth, cursor, disabledforeground, font, foreground highlightbackground, highlightcolor, highlightthickness, image, justify, padx, pady, relief, repeatdelay, repeatinterval, takefocus, text, textvariable, underline, wraplength WID... | def __init__(self, master=None, cnf={}, **kw): """Construct a button widget with the parent MASTER. | 31b32ff18fd4b57a7b74b24601b7c710274941f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/31b32ff18fd4b57a7b74b24601b7c710274941f0/Tkinter.py |
Valid resource names: anchor, background, bd, bg, bitmap, borderwidth, cursor, fg, font, foreground, height, highlightbackground, highlightcolor, highlightthickness, image, justify, padx, pady, relief, takefocus, text, textvariable, underline, width, wraplength.""" | STANDARD OPTIONS activebackground, activeforeground, anchor, background, bitmap, borderwidth, cursor, disabledforeground, font, foreground, highlightbackground, highlightcolor, highlightthickness, image, justify, padx, pady, relief, takefocus, text, textvariable, underline, wraplength WIDGET-SPECIFIC OPTIONS height... | def __init__(self, master=None, cnf={}, **kw): """Construct a label widget with the parent MASTER. | 31b32ff18fd4b57a7b74b24601b7c710274941f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/31b32ff18fd4b57a7b74b24601b7c710274941f0/Tkinter.py |
def set(self, *args): """Set the fractional values of the slider position (upper and lower ends as value between 0 and 1).""" self.tk.call((self._w, 'set') + args) | 31b32ff18fd4b57a7b74b24601b7c710274941f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/31b32ff18fd4b57a7b74b24601b7c710274941f0/Tkinter.py | ||
Valid resource names: background, bd, bg, borderwidth, cursor, exportselection, fg, font, foreground, height, highlightbackground, highlightcolor, highlightthickness, insertbackground, insertborderwidth, insertofftime, insertontime, insertwidth, padx, pady, relief, selectbackground, selectborderwidth, selectforeground... | STANDARD OPTIONS background, borderwidth, cursor, exportselection, font, foreground, highlightbackground, highlightcolor, highlightthickness, insertbackground, insertborderwidth, insertofftime, insertontime, insertwidth, padx, pady, relief, selectbackground, selectborderwidth, selectforeground, setgrid, takefocus, xs... | def __init__(self, master=None, cnf={}, **kw): """Construct a text widget with the parent MASTER. | 31b32ff18fd4b57a7b74b24601b7c710274941f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/31b32ff18fd4b57a7b74b24601b7c710274941f0/Tkinter.py |
def printsum(filename, out = sys.stdout): | def printsum(filename, out=sys.stdout): | def printsum(filename, out = sys.stdout): try: fp = open(filename, rmode) except IOError, msg: sys.stderr.write('%s: Can\'t open: %s\n' % (filename, msg)) return 1 if fnfilter: filename = fnfilter(filename) sts = printsumfp(fp, filename, out) fp.close() return sts | dd36145497fd05a02f76793386f5bf4a3d0247d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dd36145497fd05a02f76793386f5bf4a3d0247d9/md5sum.py |
def printsumfp(fp, filename, out = sys.stdout): | def printsumfp(fp, filename, out=sys.stdout): | def printsumfp(fp, filename, out = sys.stdout): m = md5.new() try: while 1: data = fp.read(bufsize) if not data: break m.update(data) except IOError, msg: sys.stderr.write('%s: I/O error: %s\n' % (filename, msg)) return 1 out.write('%s %s\n' % (m.hexdigest(), filename)) return 0 | dd36145497fd05a02f76793386f5bf4a3d0247d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dd36145497fd05a02f76793386f5bf4a3d0247d9/md5sum.py |
if not data: break | if not data: break | def printsumfp(fp, filename, out = sys.stdout): m = md5.new() try: while 1: data = fp.read(bufsize) if not data: break m.update(data) except IOError, msg: sys.stderr.write('%s: I/O error: %s\n' % (filename, msg)) return 1 out.write('%s %s\n' % (m.hexdigest(), filename)) return 0 | dd36145497fd05a02f76793386f5bf4a3d0247d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dd36145497fd05a02f76793386f5bf4a3d0247d9/md5sum.py |
def main(args = sys.argv[1:], out = sys.stdout): | def main(args = sys.argv[1:], out=sys.stdout): | def main(args = sys.argv[1:], out = sys.stdout): global fnfilter, rmode, bufsize try: opts, args = getopt.getopt(args, 'blts:') except getopt.error, msg: sys.stderr.write('%s: %s\n%s' % (sys.argv[0], msg, usage)) return 2 for o, a in opts: if o == '-l': fnfilter = os.path.basename if o == '-b': rmode = 'rb' if o == '-t... | dd36145497fd05a02f76793386f5bf4a3d0247d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dd36145497fd05a02f76793386f5bf4a3d0247d9/md5sum.py |
if o == '-b': | elif o == '-b': | def main(args = sys.argv[1:], out = sys.stdout): global fnfilter, rmode, bufsize try: opts, args = getopt.getopt(args, 'blts:') except getopt.error, msg: sys.stderr.write('%s: %s\n%s' % (sys.argv[0], msg, usage)) return 2 for o, a in opts: if o == '-l': fnfilter = os.path.basename if o == '-b': rmode = 'rb' if o == '-t... | dd36145497fd05a02f76793386f5bf4a3d0247d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dd36145497fd05a02f76793386f5bf4a3d0247d9/md5sum.py |
if o == '-t': | elif o == '-t': | def main(args = sys.argv[1:], out = sys.stdout): global fnfilter, rmode, bufsize try: opts, args = getopt.getopt(args, 'blts:') except getopt.error, msg: sys.stderr.write('%s: %s\n%s' % (sys.argv[0], msg, usage)) return 2 for o, a in opts: if o == '-l': fnfilter = os.path.basename if o == '-b': rmode = 'rb' if o == '-t... | dd36145497fd05a02f76793386f5bf4a3d0247d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dd36145497fd05a02f76793386f5bf4a3d0247d9/md5sum.py |
if o == '-s': | elif o == '-s': | def main(args = sys.argv[1:], out = sys.stdout): global fnfilter, rmode, bufsize try: opts, args = getopt.getopt(args, 'blts:') except getopt.error, msg: sys.stderr.write('%s: %s\n%s' % (sys.argv[0], msg, usage)) return 2 for o, a in opts: if o == '-l': fnfilter = os.path.basename if o == '-b': rmode = 'rb' if o == '-t... | dd36145497fd05a02f76793386f5bf4a3d0247d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dd36145497fd05a02f76793386f5bf4a3d0247d9/md5sum.py |
[3:] intact. [0] = Time that needs to be charged to the parent frame's function. It is used so that a function call will not have to access the timing data for the parent frame. [1] = Total time spent in this frame's function, excluding time in subfunctions [2] = Cumulative time spent in this frame's function, includi... | [-2:] intact (frame and previous tuple). In case an internal error is detected, the -3 element is used as the function name. [ 0] = Time that needs to be charged to the parent frame's function. It is used so that a function call will not have to access the timing data for the parent frame. [ 1] = Total time spent in ... | def _get_time_times(timer=os.times): t = timer() return t[0] + t[1] | 9ebcb42f5913b3bc74aa94442c2ef4852fc24231 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9ebcb42f5913b3bc74aa94442c2ef4852fc24231/profile.py |
self.timings[]. The index is always the name stored in self.cur[4]. | self.timings[]. The index is always the name stored in self.cur[-3]. | def _get_time_times(timer=os.times): t = timer() return t[0] + t[1] | 9ebcb42f5913b3bc74aa94442c2ef4852fc24231 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9ebcb42f5913b3bc74aa94442c2ef4852fc24231/profile.py |
if self.cur and frame.f_back is not self.cur[4]: | if self.cur and frame.f_back is not self.cur[-2]: | def trace_dispatch_call(self, frame, t): if self.cur and frame.f_back is not self.cur[4]: rt, rtt, rct, rfn, rframe, rcur = self.cur if not isinstance(rframe, Profile.fake_frame): if rframe.f_back is not frame.f_back: print rframe, rframe.f_back print frame, frame.f_back raise "Bad call", self.cur[3] self.trace_dispatc... | 9ebcb42f5913b3bc74aa94442c2ef4852fc24231 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9ebcb42f5913b3bc74aa94442c2ef4852fc24231/profile.py |
raise "Bad call", self.cur[3] | raise "Bad call", self.cur[-3] | def trace_dispatch_call(self, frame, t): if self.cur and frame.f_back is not self.cur[4]: rt, rtt, rct, rfn, rframe, rcur = self.cur if not isinstance(rframe, Profile.fake_frame): if rframe.f_back is not frame.f_back: print rframe, rframe.f_back print frame, frame.f_back raise "Bad call", self.cur[3] self.trace_dispatc... | 9ebcb42f5913b3bc74aa94442c2ef4852fc24231 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9ebcb42f5913b3bc74aa94442c2ef4852fc24231/profile.py |
if self.cur and frame.f_back is not self.cur[4]: raise "Bad call[2]", self.cur[3] | if self.cur and frame.f_back is not self.cur[-2]: raise "Bad call[2]", self.cur[-3] | def trace_dispatch_call(self, frame, t): if self.cur and frame.f_back is not self.cur[4]: rt, rtt, rct, rfn, rframe, rcur = self.cur if not isinstance(rframe, Profile.fake_frame): if rframe.f_back is not frame.f_back: print rframe, rframe.f_back print frame, frame.f_back raise "Bad call", self.cur[3] self.trace_dispatc... | 9ebcb42f5913b3bc74aa94442c2ef4852fc24231 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9ebcb42f5913b3bc74aa94442c2ef4852fc24231/profile.py |
if frame is not self.cur[4]: if frame is self.cur[4].f_back: self.trace_dispatch_return(self.cur[4], 0) | if frame is not self.cur[-2]: if frame is self.cur[-2].f_back: self.trace_dispatch_return(self.cur[-2], 0) | def trace_dispatch_return(self, frame, t): if frame is not self.cur[4]: if frame is self.cur[4].f_back: self.trace_dispatch_return(self.cur[4], 0) else: raise "Bad return", self.cur[3] | 9ebcb42f5913b3bc74aa94442c2ef4852fc24231 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9ebcb42f5913b3bc74aa94442c2ef4852fc24231/profile.py |
raise "Bad return", self.cur[3] | raise "Bad return", self.cur[-3] | def trace_dispatch_return(self, frame, t): if frame is not self.cur[4]: if frame is self.cur[4].f_back: self.trace_dispatch_return(self.cur[4], 0) else: raise "Bad return", self.cur[3] | 9ebcb42f5913b3bc74aa94442c2ef4852fc24231 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9ebcb42f5913b3bc74aa94442c2ef4852fc24231/profile.py |
if self.cur[5]: return | if self.cur[-1]: return | def set_cmd(self, cmd): if self.cur[5]: return # already set self.cmd = cmd self.simulate_call(cmd) | 9ebcb42f5913b3bc74aa94442c2ef4852fc24231 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9ebcb42f5913b3bc74aa94442c2ef4852fc24231/profile.py |
pframe = self.cur[4] | pframe = self.cur[-2] | def simulate_call(self, name): code = self.fake_code('profile', 0, name) if self.cur: pframe = self.cur[4] else: pframe = None frame = self.fake_frame(code, pframe) a = self.dispatch['call'](self, frame, 0) return | 9ebcb42f5913b3bc74aa94442c2ef4852fc24231 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9ebcb42f5913b3bc74aa94442c2ef4852fc24231/profile.py |
while self.cur[5]: | while self.cur[-1]: | def simulate_cmd_complete(self): get_time = self.get_time t = get_time() - self.t while self.cur[5]: # We *can* cause assertion errors here if # dispatch_trace_return checks for a frame match! a = self.dispatch['return'](self, self.cur[4], t) t = 0 self.t = get_time() - t | 9ebcb42f5913b3bc74aa94442c2ef4852fc24231 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9ebcb42f5913b3bc74aa94442c2ef4852fc24231/profile.py |
a = self.dispatch['return'](self, self.cur[4], t) | a = self.dispatch['return'](self, self.cur[-2], t) | def simulate_cmd_complete(self): get_time = self.get_time t = get_time() - self.t while self.cur[5]: # We *can* cause assertion errors here if # dispatch_trace_return checks for a frame match! a = self.dispatch['return'](self, self.cur[4], t) t = 0 self.t = get_time() - t | 9ebcb42f5913b3bc74aa94442c2ef4852fc24231 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9ebcb42f5913b3bc74aa94442c2ef4852fc24231/profile.py |
cmdline = "%s %s" % (interp, cmdline) | cmdline = "%s -u %s" % (interp, 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... | c986ee95e131eb69a846533e12ceeb6047662084 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c986ee95e131eb69a846533e12ceeb6047662084/CGIHTTPServer.py |
fi, fo = os.popen2(cmdline) | fi, fo = os.popen2(cmdline, 'b') | 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... | c986ee95e131eb69a846533e12ceeb6047662084 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c986ee95e131eb69a846533e12ceeb6047662084/CGIHTTPServer.py |
def compile_dir(dir, maxlevels=10, ddir=None, force=0): | def compile_dir(dir, maxlevels=10, ddir=None, force=0, rx=None): | def compile_dir(dir, maxlevels=10, ddir=None, force=0): """Byte-compile all modules in the given directory tree. Arguments (only dir is required): dir: the directory to byte-compile maxlevels: maximum recursion level (default 10) ddir: if given, purported directory name (this is the directory name that wil... | c8123ba8709fb01b32659d2d930ad099c5e995e2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c8123ba8709fb01b32659d2d930ad099c5e995e2/compileall.py |
py_compile.compile(fullname, None, dfile) | ok = py_compile.compile(fullname, None, dfile) | def compile_dir(dir, maxlevels=10, ddir=None, force=0): """Byte-compile all modules in the given directory tree. Arguments (only dir is required): dir: the directory to byte-compile maxlevels: maximum recursion level (default 10) ddir: if given, purported directory name (this is the directory name that wil... | c8123ba8709fb01b32659d2d930ad099c5e995e2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c8123ba8709fb01b32659d2d930ad099c5e995e2/compileall.py |
compile_dir(fullname, maxlevels - 1, dfile, force) | if not compile_dir(fullname, maxlevels - 1, dfile, force, rx): success = 0 | def compile_dir(dir, maxlevels=10, ddir=None, force=0): """Byte-compile all modules in the given directory tree. Arguments (only dir is required): dir: the directory to byte-compile maxlevels: maximum recursion level (default 10) ddir: if given, purported directory name (this is the directory name that wil... | c8123ba8709fb01b32659d2d930ad099c5e995e2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c8123ba8709fb01b32659d2d930ad099c5e995e2/compileall.py |
opts, args = getopt.getopt(sys.argv[1:], 'lfd:') | opts, args = getopt.getopt(sys.argv[1:], 'lfd:x:') | def main(): """Script main program.""" import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'lfd:') except getopt.error, msg: print msg print "usage: compileall [-l] [-f] [-d destdir] [directory ...]" print "-l: don't recurse down" print "-f: force rebuild even if timestamps are up-to-date" print "-d destdir: pu... | c8123ba8709fb01b32659d2d930ad099c5e995e2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c8123ba8709fb01b32659d2d930ad099c5e995e2/compileall.py |
print "usage: compileall [-l] [-f] [-d destdir] [directory ...]" | print "usage: python compileall.py [-l] [-f] [-d destdir] " \ "[-s regexp] [directory ...]" | def main(): """Script main program.""" import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'lfd:') except getopt.error, msg: print msg print "usage: compileall [-l] [-f] [-d destdir] [directory ...]" print "-l: don't recurse down" print "-f: force rebuild even if timestamps are up-to-date" print "-d destdir: pu... | c8123ba8709fb01b32659d2d930ad099c5e995e2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c8123ba8709fb01b32659d2d930ad099c5e995e2/compileall.py |
print "if no directory arguments, -l sys.path is assumed" | print " if no directory arguments, -l sys.path is assumed" print "-x regexp: skip files matching the regular expression regexp" print " the regexp is search for in the full path of the file" | def main(): """Script main program.""" import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'lfd:') except getopt.error, msg: print msg print "usage: compileall [-l] [-f] [-d destdir] [directory ...]" print "-l: don't recurse down" print "-f: force rebuild even if timestamps are up-to-date" print "-d destdir: pu... | c8123ba8709fb01b32659d2d930ad099c5e995e2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c8123ba8709fb01b32659d2d930ad099c5e995e2/compileall.py |
success = success and compile_dir(dir, maxlevels, ddir, force) | if not compile_dir(dir, maxlevels, ddir, force, rx): success = 0 | def main(): """Script main program.""" import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'lfd:') except getopt.error, msg: print msg print "usage: compileall [-l] [-f] [-d destdir] [directory ...]" print "-l: don't recurse down" print "-f: force rebuild even if timestamps are up-to-date" print "-d destdir: pu... | c8123ba8709fb01b32659d2d930ad099c5e995e2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c8123ba8709fb01b32659d2d930ad099c5e995e2/compileall.py |
sys.exit(not main()) | exit_status = not main() sys.exit(exit_status) | def main(): """Script main program.""" import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'lfd:') except getopt.error, msg: print msg print "usage: compileall [-l] [-f] [-d destdir] [directory ...]" print "-l: don't recurse down" print "-f: force rebuild even if timestamps are up-to-date" print "-d destdir: pu... | c8123ba8709fb01b32659d2d930ad099c5e995e2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c8123ba8709fb01b32659d2d930ad099c5e995e2/compileall.py |
('file://nonsensename/etc/passwd', None, (OSError, socket.error)) | ('file://nonsensename/etc/passwd', None, (EnvironmentError, socket.error)) | def test_file(self): TESTFN = test_support.TESTFN f = open(TESTFN, 'w') try: f.write('hi there\n') f.close() urls = [ 'file:'+sanepathname2url(os.path.abspath(TESTFN)), | 14d7ed74baf89cf5c59264b12a0486818c61fc69 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/14d7ed74baf89cf5c59264b12a0486818c61fc69/test_urllib2net.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.