rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
node = self.document.createElement(tagName) for attr in attrs.keys(): | node = self.document.createElement(name) for (attr, value) in attrs.items(): | def startElement(self, name, tagName, attrs): if not hasattr(self, "curNode"): # FIXME: hack! self.startDocument() | 2000138a82287e905603626bfdaf81af44e0fcd8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2000138a82287e905603626bfdaf81af44e0fcd8/pulldom.py |
def startElement(self, name, tagName, attrs): if not hasattr(self, "curNode"): # FIXME: hack! self.startDocument() | 2000138a82287e905603626bfdaf81af44e0fcd8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2000138a82287e905603626bfdaf81af44e0fcd8/pulldom.py | ||
def endElement(self, name, tagName): | def endElement(self, name): | def endElement(self, name, tagName): node = self.curNode self.lastEvent[1] = [(END_ELEMENT, node), None] self.lastEvent = self.lastEvent[1] #self.events.append((END_ELEMENT, node)) self.curNode = node.parentNode | 2000138a82287e905603626bfdaf81af44e0fcd8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2000138a82287e905603626bfdaf81af44e0fcd8/pulldom.py |
for meth in get_methods(handler): | for meth in dir(handler): | def add_handler(self, handler): added = 0 for meth in get_methods(handler): if meth[-5:] == '_open': protocol = meth[:-5] if self.handle_open.has_key(protocol): self.handle_open[protocol].append(handler) else: self.handle_open[protocol] = [handler] added = 1 continue i = meth.find('_') j = meth[i+1:].find('_') + i + 1 ... | 29c9255ef1aa5548e844d7bb72d92c9eba5f1df2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29c9255ef1aa5548e844d7bb72d92c9eba5f1df2/urllib2.py |
if isinstance(fullurl, types.StringType): | if isinstance(fullurl, (types.StringType, types.UnicodeType)): | def open(self, fullurl, data=None): # accept a URL or a Request object if isinstance(fullurl, types.StringType): req = Request(fullurl, data) else: req = fullurl if data is not None: req.add_data(data) assert isinstance(req, Request) # really only care about interface | 29c9255ef1aa5548e844d7bb72d92c9eba5f1df2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29c9255ef1aa5548e844d7bb72d92c9eba5f1df2/urllib2.py |
def is_callable(obj): if type(obj) in (types.BuiltinFunctionType, types.BuiltinMethodType, types.LambdaType, types.MethodType): return 1 if isinstance(obj, types.InstanceType): return hasattr(obj, '__call__') return 0 def get_methods(inst): methods = {} classes = [] classes.append(inst.__class__) while classes: kl... | def error(self, proto, *args): if proto in ['http', 'https']: # XXX http[s] protocols are special cased dict = self.handle_error['http'] # https is not different then http proto = args[2] # YUCK! meth_name = 'http_error_%d' % proto http_err = 1 orig_args = args else: dict = self.handle_error meth_name = proto + '_erro... | 29c9255ef1aa5548e844d7bb72d92c9eba5f1df2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29c9255ef1aa5548e844d7bb72d92c9eba5f1df2/urllib2.py | |
if isinstance(check, types.ClassType): | if inspect.isclass(check): | def build_opener(*handlers): """Create an opener object from a list of handlers. The opener will use several default handlers, including support for HTTP and FTP. If there is a ProxyHandler, it must be at the front of the list of handlers. (Yuck.) If any of the handlers passed as arguments are subclasses of the def... | 29c9255ef1aa5548e844d7bb72d92c9eba5f1df2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29c9255ef1aa5548e844d7bb72d92c9eba5f1df2/urllib2.py |
elif isinstance(check, types.InstanceType): if isinstance(check, klass): skip.append(klass) | elif isinstance(check, klass): skip.append(klass) | def build_opener(*handlers): """Create an opener object from a list of handlers. The opener will use several default handlers, including support for HTTP and FTP. If there is a ProxyHandler, it must be at the front of the list of handlers. (Yuck.) If any of the handlers passed as arguments are subclasses of the def... | 29c9255ef1aa5548e844d7bb72d92c9eba5f1df2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29c9255ef1aa5548e844d7bb72d92c9eba5f1df2/urllib2.py |
if isinstance(h, types.ClassType): | if inspect.isclass(h): | def build_opener(*handlers): """Create an opener object from a list of handlers. The opener will use several default handlers, including support for HTTP and FTP. If there is a ProxyHandler, it must be at the front of the list of handlers. (Yuck.) If any of the handlers passed as arguments are subclasses of the def... | 29c9255ef1aa5548e844d7bb72d92c9eba5f1df2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29c9255ef1aa5548e844d7bb72d92c9eba5f1df2/urllib2.py |
if isinstance(uri, types.StringType): | if isinstance(uri, (types.StringType, types.UnicodeType)): | def add_password(self, realm, uri, user, passwd): # uri could be a single URI or a sequence if isinstance(uri, types.StringType): uri = [uri] uri = tuple(map(self.reduce_uri, uri)) if not self.passwd.has_key(realm): self.passwd[realm] = {} self.passwd[realm][uri] = (user, passwd) | 29c9255ef1aa5548e844d7bb72d92c9eba5f1df2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29c9255ef1aa5548e844d7bb72d92c9eba5f1df2/urllib2.py |
if isinstance(ph, types.ClassType): | if inspect.isclass(ph): | def build_opener(self): opener = OpenerDirector() for ph in self.proxy_handlers: if isinstance(ph, types.ClassType): ph = ph() opener.add_handler(ph) | 29c9255ef1aa5548e844d7bb72d92c9eba5f1df2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29c9255ef1aa5548e844d7bb72d92c9eba5f1df2/urllib2.py |
'ftp://www.python.org/pub/tmp/httplib.py', 'ftp://www.python.org/pub/tmp/imageop.c', | 'ftp://www.python.org/pub/python/misc/sousa.au', | def build_opener(self): opener = OpenerDirector() for ph in self.proxy_handlers: if isinstance(ph, types.ClassType): ph = ph() opener.add_handler(ph) | 29c9255ef1aa5548e844d7bb72d92c9eba5f1df2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29c9255ef1aa5548e844d7bb72d92c9eba5f1df2/urllib2.py |
('http://grail.cnri.reston.va.us/cgi-bin/faqw.py', | ('http://www.python.org/cgi-bin/faqw.py', | def build_opener(self): opener = OpenerDirector() for ph in self.proxy_handlers: if isinstance(ph, types.ClassType): ph = ph() opener.add_handler(ph) | 29c9255ef1aa5548e844d7bb72d92c9eba5f1df2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29c9255ef1aa5548e844d7bb72d92c9eba5f1df2/urllib2.py |
'ftp://prep.ai.mit.edu/welcome.msg', 'ftp://www.python.org/pub/tmp/figure.prn', 'ftp://www.python.org/pub/tmp/interp.pl', 'http://checkproxy.cnri.reston.va.us/test/test.html', | 'ftp://gatekeeper.research.compaq.com/pub/DEC/SRC/research-reports/00README-Legal-Rules-Regs', | def build_opener(self): opener = OpenerDirector() for ph in self.proxy_handlers: if isinstance(ph, types.ClassType): ph = ph() opener.add_handler(ph) | 29c9255ef1aa5548e844d7bb72d92c9eba5f1df2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29c9255ef1aa5548e844d7bb72d92c9eba5f1df2/urllib2.py |
if localhost is not None: urls = urls + [ 'file://%s/etc/passwd' % localhost, 'http://%s/simple/' % localhost, 'http://%s/digest/' % localhost, 'http://%s/not/found.h' % localhost, ] bauth = HTTPBasicAuthHandler() bauth.add_password('basic_test_realm', localhost, 'jhylton', 'password') dauth = HTTPDigestAuthHandler() ... | def build_opener(self): opener = OpenerDirector() for ph in self.proxy_handlers: if isinstance(ph, types.ClassType): ph = ph() opener.add_handler(ph) | 29c9255ef1aa5548e844d7bb72d92c9eba5f1df2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29c9255ef1aa5548e844d7bb72d92c9eba5f1df2/urllib2.py | |
def at_cnri(req): host = req.get_host() print host if host[-18:] == '.cnri.reston.va.us': return 1 p = CustomProxy('http', at_cnri, 'proxy.cnri.reston.va.us') ph = CustomProxyHandler(p) | install_opener(build_opener(cfh, GopherHandler)) | def build_opener(self): opener = OpenerDirector() for ph in self.proxy_handlers: if isinstance(ph, types.ClassType): ph = ph() opener.add_handler(ph) | 29c9255ef1aa5548e844d7bb72d92c9eba5f1df2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29c9255ef1aa5548e844d7bb72d92c9eba5f1df2/urllib2.py |
self.assertRaises( RuntimeError, winsound.PlaySound, 'SystemQuestion', winsound.SND_ALIAS | winsound.SND_NOSTOP ) | try: winsound.PlaySound( 'SystemQuestion', winsound.SND_ALIAS | winsound.SND_NOSTOP ) except RuntimeError: pass else: pass | def test_stopasync(self): winsound.PlaySound( 'SystemQuestion', winsound.SND_ALIAS | winsound.SND_ASYNC | winsound.SND_LOOP ) time.sleep(0.5) self.assertRaises( RuntimeError, winsound.PlaySound, 'SystemQuestion', winsound.SND_ALIAS | winsound.SND_NOSTOP ) winsound.PlaySound(None, winsound.SND_PURGE) | cfeb7791cb5a5c431a98503ea1149cdd483b1462 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cfeb7791cb5a5c431a98503ea1149cdd483b1462/test_winsound.py |
def TemporaryFile(mode='w+b', bufsize=-1, suffix=""): """Create and return a temporary file (opened read-write by default).""" name = mktemp(suffix) if os.name == 'posix': # Unix -- be very careful fd = os.open(name, os.O_RDWR|os.O_CREAT|os.O_EXCL, 0700) try: os.unlink(name) return os.fdopen(fd, mode, bufsize) except: ... | 8deff29201b1a3b5dd2363794bc76347a5b52a16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8deff29201b1a3b5dd2363794bc76347a5b52a16/tempfile.py | ||
def handler1(): print "handler1" | One public function, register, is defined. """ | def handler1(): print "handler1" | 901b47b8cf3162cb062ae0268da0f00c375b5951 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/901b47b8cf3162cb062ae0268da0f00c375b5951/atexit.py |
def handler2(*args, **kargs): print "handler2", args, kargs | _exithandlers = [] def _run_exitfuncs(): """run any registered exit functions | def handler2(*args, **kargs): print "handler2", args, kargs | 901b47b8cf3162cb062ae0268da0f00c375b5951 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/901b47b8cf3162cb062ae0268da0f00c375b5951/atexit.py |
_exithandlers = atexit._exithandlers atexit._exithandlers = [] | _exithandlers is traversed in reverse order so functions are executed last in, first out. """ while _exithandlers: func, targs, kargs = _exithandlers[-1] apply(func, targs, kargs) _exithandlers.remove(_exithandlers[-1]) | def handler2(*args, **kargs): print "handler2", args, kargs | 901b47b8cf3162cb062ae0268da0f00c375b5951 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/901b47b8cf3162cb062ae0268da0f00c375b5951/atexit.py |
atexit.register(handler1) atexit.register(handler2) atexit.register(handler2, 7, kw="abc") | def register(func, *targs, **kargs): """register a function to be executed upon normal program termination | def handler2(*args, **kargs): print "handler2", args, kargs | 901b47b8cf3162cb062ae0268da0f00c375b5951 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/901b47b8cf3162cb062ae0268da0f00c375b5951/atexit.py |
atexit._run_exitfuncs() | func - function to be called at exit targs - optional arguments to pass to func kargs - optional keyword arguments to pass to func """ _exithandlers.append((func, targs, kargs)) | def handler2(*args, **kargs): print "handler2", args, kargs | 901b47b8cf3162cb062ae0268da0f00c375b5951 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/901b47b8cf3162cb062ae0268da0f00c375b5951/atexit.py |
atexit._exithandlers = _exithandlers | import sys try: x = sys.exitfunc except AttributeError: sys.exitfunc = _run_exitfuncs else: if x != _run_exitfuncs: register(x) del sys if __name__ == "__main__": def x1(): print "running x1" def x2(n): print "running x2(%s)" % `n` def x3(n, kwd=None): print "running x3(%s, kwd=%s)" % (`n`, `kwd`) register(x1) regi... | def handler2(*args, **kargs): print "handler2", args, kargs | 901b47b8cf3162cb062ae0268da0f00c375b5951 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/901b47b8cf3162cb062ae0268da0f00c375b5951/atexit.py |
t0 = time.millitimer() | t0 = time.time() | def record(v, info, filename, audiofilename, mono, grey, greybits, \ monotreshold, fields, preallocspace): import thread format, x, y, qsize, rate = info fps = 59.64 # Fields per second # XXX (Strange: need fps of Indigo monitor, not of PAL or NTSC!) tpf = 1000.0 / fps # Time per field in msec if filename: vout = VFile... | 437fea7f520bb363b8562ec108a3d48494dc61e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/437fea7f520bb363b8562ec108a3d48494dc61e0/Vrec.py |
def record(v, info, filename, audiofilename, mono, grey, greybits, \ monotreshold, fields, preallocspace): import thread format, x, y, qsize, rate = info fps = 59.64 # Fields per second # XXX (Strange: need fps of Indigo monitor, not of PAL or NTSC!) tpf = 1000.0 / fps # Time per field in msec if filename: vout = VFile... | 437fea7f520bb363b8562ec108a3d48494dc61e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/437fea7f520bb363b8562ec108a3d48494dc61e0/Vrec.py | ||
t1 = time.millitimer() | t1 = time.time() | def record(v, info, filename, audiofilename, mono, grey, greybits, \ monotreshold, fields, preallocspace): import thread format, x, y, qsize, rate = info fps = 59.64 # Fields per second # XXX (Strange: need fps of Indigo monitor, not of PAL or NTSC!) tpf = 1000.0 / fps # Time per field in msec if filename: vout = VFile... | 437fea7f520bb363b8562ec108a3d48494dc61e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/437fea7f520bb363b8562ec108a3d48494dc61e0/Vrec.py |
print lastid, 'fields in', t1-t0, 'msec', print '--', 0.1 * int(lastid * 10000.0 / (t1-t0)), 'fields/sec' | print lastid, 'fields in', round(t1-t0, 3), 'sec', print '--', round(lastid/(t1-t0), 1), 'fields/sec' | def record(v, info, filename, audiofilename, mono, grey, greybits, \ monotreshold, fields, preallocspace): import thread format, x, y, qsize, rate = info fps = 59.64 # Fields per second # XXX (Strange: need fps of Indigo monitor, not of PAL or NTSC!) tpf = 1000.0 / fps # Time per field in msec if filename: vout = VFile... | 437fea7f520bb363b8562ec108a3d48494dc61e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/437fea7f520bb363b8562ec108a3d48494dc61e0/Vrec.py |
print 0.1*int(count*20000.0/(t1-t0)), 'f/s', | print round(count*2/(t1-t0), 1), 'f/s', | def record(v, info, filename, audiofilename, mono, grey, greybits, \ monotreshold, fields, preallocspace): import thread format, x, y, qsize, rate = info fps = 59.64 # Fields per second # XXX (Strange: need fps of Indigo monitor, not of PAL or NTSC!) tpf = 1000.0 / fps # Time per field in msec if filename: vout = VFile... | 437fea7f520bb363b8562ec108a3d48494dc61e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/437fea7f520bb363b8562ec108a3d48494dc61e0/Vrec.py |
print count*200.0/lastid, '%,', print count*rate*200.0/lastid, '% of wanted rate', | print '(', print round(count*200.0/lastid), '%, or', print round(count*rate*200.0/lastid), '% of wanted rate )', | def record(v, info, filename, audiofilename, mono, grey, greybits, \ monotreshold, fields, preallocspace): import thread format, x, y, qsize, rate = info fps = 59.64 # Fields per second # XXX (Strange: need fps of Indigo monitor, not of PAL or NTSC!) tpf = 1000.0 / fps # Time per field in msec if filename: vout = VFile... | 437fea7f520bb363b8562ec108a3d48494dc61e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/437fea7f520bb363b8562ec108a3d48494dc61e0/Vrec.py |
byte_increments = [ord(c) for c in co.co_lnotab[0::2]] line_increments = [ord(c) for c in co.co_lnotab[1::2]] table_length = len(byte_increments) lineno = co.co_firstlineno table_index = 0 while (table_index < table_length and byte_increments[table_index] == 0): lineno += line_increments[table_index] table_index += 1... | def disassemble(co, lasti=-1): """Disassemble a code object.""" code = co.co_code byte_increments = [ord(c) for c in co.co_lnotab[0::2]] line_increments = [ord(c) for c in co.co_lnotab[1::2]] table_length = len(byte_increments) # == len(line_increments) lineno = co.co_firstlineno table_index = 0 while (table_index < ... | 093fcd0de00d8a9ac895e2b96a65349d065f1026 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/093fcd0de00d8a9ac895e2b96a65349d065f1026/dis.py | |
if i >= addr: lineno += line_incr while table_index < table_length: addr += byte_increments[table_index] line_incr = line_increments[table_index] table_index += 1 if line_incr: break else: addr = sys.maxint | if i in linestarts: | def disassemble(co, lasti=-1): """Disassemble a code object.""" code = co.co_code byte_increments = [ord(c) for c in co.co_lnotab[0::2]] line_increments = [ord(c) for c in co.co_lnotab[1::2]] table_length = len(byte_increments) # == len(line_increments) lineno = co.co_firstlineno table_index = 0 while (table_index < ... | 093fcd0de00d8a9ac895e2b96a65349d065f1026 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/093fcd0de00d8a9ac895e2b96a65349d065f1026/dis.py |
print "%3d"%lineno, | print "%3d" % linestarts[i], | def disassemble(co, lasti=-1): """Disassemble a code object.""" code = co.co_code byte_increments = [ord(c) for c in co.co_lnotab[0::2]] line_increments = [ord(c) for c in co.co_lnotab[1::2]] table_length = len(byte_increments) # == len(line_increments) lineno = co.co_firstlineno table_index = 0 while (table_index < ... | 093fcd0de00d8a9ac895e2b96a65349d065f1026 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/093fcd0de00d8a9ac895e2b96a65349d065f1026/dis.py |
if op == opmap['SET_LINENO'] and i > 0: print | def disassemble_string(code, lasti=-1, varnames=None, names=None, constants=None): labels = findlabels(code) n = len(code) i = 0 while i < n: c = code[i] op = ord(c) if op == opmap['SET_LINENO'] and i > 0: print # Extra blank line if i == lasti: print '-->', else: print ' ', if i in labels: print '>>', else: print ' ... | 093fcd0de00d8a9ac895e2b96a65349d065f1026 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/093fcd0de00d8a9ac895e2b96a65349d065f1026/dis.py | |
for h in root.handlers: | for h in root.handlers[:]: | def fileConfig(fname, defaults=None): """ Read the logging configuration from a ConfigParser-format file. This can be called several times from an application, allowing an end user the ability to select from various pre-canned configurations (if the developer provides a mechanism to present the choices and load the ch... | 791fc3757aac60ce8bef5cb2c03a4b5964b60a04 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/791fc3757aac60ce8bef5cb2c03a4b5964b60a04/config.py |
for h in logger.handlers: | for h in logger.handlers[:]: | def fileConfig(fname, defaults=None): """ Read the logging configuration from a ConfigParser-format file. This can be called several times from an application, allowing an end user the ability to select from various pre-canned configurations (if the developer provides a mechanism to present the choices and load the ch... | 791fc3757aac60ce8bef5cb2c03a4b5964b60a04 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/791fc3757aac60ce8bef5cb2c03a4b5964b60a04/config.py |
test_support.run_unittest(TestBug1385040) | pass | def test_main(): test_support.run_unittest(TestBug1385040) | 4d9c3952de8baed7587bf774450d5321f55d8ec0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4d9c3952de8baed7587bf774450d5321f55d8ec0/outstanding_bugs.py |
ci.append(-2.5, -3.7, 1.0) ci.append(-1.5, -3.7, 3.0) ci.append(1.5, -3.7, -2.5) ci.append(2.5, -3.7, -0.75) | ci.append((-2.5, -3.7, 1.0)) ci.append((-1.5, -3.7, 3.0)) ci.append((1.5, -3.7, -2.5)) ci.append((2.5, -3.7, -0.75)) | def make_ctlpoints(): c = [] # ci = [] ci.append(-2.5, -3.7, 1.0) ci.append(-1.5, -3.7, 3.0) ci.append(1.5, -3.7, -2.5) ci.append(2.5, -3.7, -0.75) c.append(ci) # ci = [] ci.append(-2.5, -2.0, 3.0) ci.append(-1.5, -2.0, 4.0) ci.append(1.5, -2.0, -3.0) ci.append(2.5, -2.0, 0.0) c.append(ci) # ci = [] ci.a... | 062c870df054eb11558984a420ed98a4052153ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/062c870df054eb11558984a420ed98a4052153ff/nurbs.py |
ci.append(-2.5, -2.0, 3.0) ci.append(-1.5, -2.0, 4.0) ci.append(1.5, -2.0, -3.0) ci.append(2.5, -2.0, 0.0) | ci.append((-2.5, -2.0, 3.0)) ci.append((-1.5, -2.0, 4.0)) ci.append((1.5, -2.0, -3.0)) ci.append((2.5, -2.0, 0.0)) | def make_ctlpoints(): c = [] # ci = [] ci.append(-2.5, -3.7, 1.0) ci.append(-1.5, -3.7, 3.0) ci.append(1.5, -3.7, -2.5) ci.append(2.5, -3.7, -0.75) c.append(ci) # ci = [] ci.append(-2.5, -2.0, 3.0) ci.append(-1.5, -2.0, 4.0) ci.append(1.5, -2.0, -3.0) ci.append(2.5, -2.0, 0.0) c.append(ci) # ci = [] ci.a... | 062c870df054eb11558984a420ed98a4052153ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/062c870df054eb11558984a420ed98a4052153ff/nurbs.py |
ci.append(-2.5, 2.0, 1.0) ci.append(-1.5, 2.0, 0.0) ci.append(1.5, 2.0, -1.0) ci.append(2.5, 2.0, 2.0) | ci.append((-2.5, 2.0, 1.0)) ci.append((-1.5, 2.0, 0.0)) ci.append((1.5, 2.0, -1.0)) ci.append((2.5, 2.0, 2.0)) | def make_ctlpoints(): c = [] # ci = [] ci.append(-2.5, -3.7, 1.0) ci.append(-1.5, -3.7, 3.0) ci.append(1.5, -3.7, -2.5) ci.append(2.5, -3.7, -0.75) c.append(ci) # ci = [] ci.append(-2.5, -2.0, 3.0) ci.append(-1.5, -2.0, 4.0) ci.append(1.5, -2.0, -3.0) ci.append(2.5, -2.0, 0.0) c.append(ci) # ci = [] ci.a... | 062c870df054eb11558984a420ed98a4052153ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/062c870df054eb11558984a420ed98a4052153ff/nurbs.py |
ci.append(-2.5, 2.7, 1.25) ci.append(-1.5, 2.7, 0.1) ci.append(1.5, 2.7, -0.6) ci.append(2.5, 2.7, 0.2) | ci.append((-2.5, 2.7, 1.25)) ci.append((-1.5, 2.7, 0.1)) ci.append((1.5, 2.7, -0.6)) ci.append((2.5, 2.7, 0.2)) | def make_ctlpoints(): c = [] # ci = [] ci.append(-2.5, -3.7, 1.0) ci.append(-1.5, -3.7, 3.0) ci.append(1.5, -3.7, -2.5) ci.append(2.5, -3.7, -0.75) c.append(ci) # ci = [] ci.append(-2.5, -2.0, 3.0) ci.append(-1.5, -2.0, 4.0) ci.append(1.5, -2.0, -3.0) ci.append(2.5, -2.0, 0.0) c.append(ci) # ci = [] ci.a... | 062c870df054eb11558984a420ed98a4052153ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/062c870df054eb11558984a420ed98a4052153ff/nurbs.py |
c.append(1.0, 0.0, 1.0) c.append(1.0, 1.0, 1.0) c.append(0.0, 2.0, 2.0) c.append(-1.0, 1.0, 1.0) c.append(-1.0, 0.0, 1.0) c.append(-1.0, -1.0, 1.0) c.append(0.0, -2.0, 2.0) c.append(1.0, -1.0, 1.0) c.append(1.0, 0.0, 1.0) | c.append((1.0, 0.0, 1.0)) c.append((1.0, 1.0, 1.0)) c.append((0.0, 2.0, 2.0)) c.append((-1.0, 1.0, 1.0)) c.append((-1.0, 0.0, 1.0)) c.append((-1.0, -1.0, 1.0)) c.append((0.0, -2.0, 2.0)) c.append((1.0, -1.0, 1.0) ) c.append((1.0, 0.0, 1.0)) | def make_trimpoints(): c = [] c.append(1.0, 0.0, 1.0) c.append(1.0, 1.0, 1.0) c.append(0.0, 2.0, 2.0) c.append(-1.0, 1.0, 1.0) c.append(-1.0, 0.0, 1.0) c.append(-1.0, -1.0, 1.0) c.append(0.0, -2.0, 2.0) c.append(1.0, -1.0, 1.0) c.append(1.0, 0.0, 1.0) return c | 062c870df054eb11558984a420ed98a4052153ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/062c870df054eb11558984a420ed98a4052153ff/nurbs.py |
writer = _get_StringIO() self.writexml(writer, "", indent, newl) return writer.getvalue() | writer = _get_StringIO() self.writexml(writer, "", indent, newl) return writer.getvalue() | def toprettyxml(self, indent="\t", newl="\n"): # indent = the indentation string to prepend, per level # newl = the newline string to append writer = _get_StringIO() self.writexml(writer, "", indent, newl) return writer.getvalue() | c0b238c24ff0298290d32676bc6fdfb74d04e772 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c0b238c24ff0298290d32676bc6fdfb74d04e772/minidom.py |
from distutils.util import get_platform s = "build/lib.%s-%.3s" % (get_platform(), sys.version) | s = "build/lib.%s-%.3s" % ("linux-i686", sys.version) | def makepath(*paths): dir = os.path.abspath(os.path.join(*paths)) return dir, os.path.normcase(dir) | 3a61bcd99a50e62f3f924a0d66543304993e8ec8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3a61bcd99a50e62f3f924a0d66543304993e8ec8/site.py |
del get_platform, s | def makepath(*paths): dir = os.path.abspath(os.path.join(*paths)) return dir, os.path.normcase(dir) | 3a61bcd99a50e62f3f924a0d66543304993e8ec8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3a61bcd99a50e62f3f924a0d66543304993e8ec8/site.py | |
self.__msg = msg | self._msg = msg | def __init__(self, msg=''): self.__msg = msg | 8203d9b3441c1cba254101518f985ee4667f50ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8203d9b3441c1cba254101518f985ee4667f50ab/ConfigParser.py |
return self.__msg | return self._msg | def __repr__(self): return self.__msg | 8203d9b3441c1cba254101518f985ee4667f50ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8203d9b3441c1cba254101518f985ee4667f50ab/ConfigParser.py |
on the defaults passed into the constructor. | on the defaults passed into the constructor, unless the optional argument `raw' is true. | def get(self, section, option, raw=0): """Get an option value for a given section. | 8203d9b3441c1cba254101518f985ee4667f50ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8203d9b3441c1cba254101518f985ee4667f50ab/ConfigParser.py |
cursect = None | cursect = None | def __read(self, fp): """Parse a sectioned setup file. | 8203d9b3441c1cba254101518f985ee4667f50ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8203d9b3441c1cba254101518f985ee4667f50ab/ConfigParser.py |
if line[0] in ' \t' and cursect <> None and optname: | if line[0] in ' \t' and cursect is not None and optname: | def __read(self, fp): """Parse a sectioned setup file. | 8203d9b3441c1cba254101518f985ee4667f50ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8203d9b3441c1cba254101518f985ee4667f50ab/ConfigParser.py |
cursect = cursect[optname] + '\n ' + value elif secthead_cre.match(line) >= 0: sectname = secthead_cre.group(1) if self.__sections.has_key(sectname): cursect = self.__sections[sectname] elif sectname == DEFAULTSECT: cursect = self.__defaults | cursect[optname] = cursect[optname] + '\n ' + value else: mo = self.__SECTCRE.match(line) if mo: sectname = mo.group('header') if self.__sections.has_key(sectname): cursect = self.__sections[sectname] elif sectname == DEFAULTSECT: cursect = self.__defaults else: cursect = {} self.__sections[sectname] = cursect optna... | def __read(self, fp): """Parse a sectioned setup file. | 8203d9b3441c1cba254101518f985ee4667f50ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8203d9b3441c1cba254101518f985ee4667f50ab/ConfigParser.py |
cursect = {'name': sectname} self.__sections[sectname] = cursect optname = None elif option_cre.match(line) >= 0: optname, optval = option_cre.group(1, 3) optname = string.lower(optname) optval = string.strip(optval) if optval == '""': optval = '' cursect[optname] = optval else: print 'Error in %s at %d: %s', (fp.n... | mo = self.__OPTCRE.match(line) if mo: optname, optval = mo.group('option', 'value') optname = string.lower(optname) optval = string.strip(optval) if optval == '""': optval = '' cursect[optname] = optval else: if not e: e = ParsingError(fp.name) e.append(lineno, `line`) if e: raise e | def __read(self, fp): """Parse a sectioned setup file. | 8203d9b3441c1cba254101518f985ee4667f50ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8203d9b3441c1cba254101518f985ee4667f50ab/ConfigParser.py |
class _MultiCallMethod: def __init__(self, call_list, name): self.__call_list = call_list self.__name = name def __getattr__(self, name): return _MultiCallMethod(self.__call_list, "%s.%s" % (self.__name, name)) def __call__(self, *args): self.__call_list.append((self.__name, args)) def MultiCallIterator(results):... | def end_methodName(self, data): if self._encoding: data = _decode(data, self._encoding) self._methodname = data self._type = "methodName" # no params | da300e34b8a06ebbd0d1e3ca698b8b5aef773766 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/da300e34b8a06ebbd0d1e3ca698b8b5aef773766/xmlrpclib.py | |
def __repr__(self): return ( "<ServerProxy for %s%s>" % (self.__host, self.__handler) ) | da300e34b8a06ebbd0d1e3ca698b8b5aef773766 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/da300e34b8a06ebbd0d1e3ca698b8b5aef773766/xmlrpclib.py | ||
exts.append( Extension('unicodedata', ['unicodedata.c', 'unicodedatabase.c']) ) | exts.append( Extension('unicodedata', ['unicodedata.c']) ) | 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.append('/usr/local/lib') if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.append( '/usr/local/include' ) | 4ee99536e74d360265f36abaa9d2526216fe8f9a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4ee99536e74d360265f36abaa9d2526216fe8f9a/setup.py |
if hasattr(m, "__file__"): | if hasattr(m, "__file__") and m.__file__: | def makepath(*paths): dir = os.path.join(*paths) return os.path.normcase(os.path.abspath(dir)) | 54d9124e8c96c0438ad7a978fa1af8a214a0759c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/54d9124e8c96c0438ad7a978fa1af8a214a0759c/site.py |
[here, os.path.join(here, os.pardir), os.curdir]) | [os.path.join(here, os.pardir), here, os.curdir]) | def __call__(self): self.__setup() prompt = 'Hit Return for more, or q (and Return) to quit: ' lineno = 0 while 1: try: for i in range(lineno, lineno + self.MAXLINES): print self.__lines[i] except IndexError: break else: lineno += self.MAXLINES key = None while key is None: key = raw_input(prompt) if key not in ('', 'q... | 54d9124e8c96c0438ad7a978fa1af8a214a0759c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/54d9124e8c96c0438ad7a978fa1af8a214a0759c/site.py |
if __name__ == "__main__": import glob f = glob.glob("command/*.py") byte_compile(f, optimize=0, prefix="command/", base_dir="/usr/lib/python") | def byte_compile (py_files, optimize=0, force=0, prefix=None, base_dir=None, verbose=1, dry_run=0, direct=None): """Byte-compile a collection of Python source files to either .pyc or .pyo files in the same directory. 'py_files' is a list of files to compile; any files that don't end in ".py" are silently skipped. 'opt... | 301b41de5d1a33736402e12f2fef992defde180f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/301b41de5d1a33736402e12f2fef992defde180f/util.py | |
default_compiler = { 'posix': 'unix', 'nt': 'msvc', 'mac': 'mwerks', } | _default_compilers = ( ('cygwin.*', 'cygwin'), ('posix', 'unix'), ('nt', 'msvc'), ('mac', 'mwerks'), ) def get_default_compiler(osname=None, platform=None): """ Determine the default compiler to use for the given platform. osname should be one of the standard Python OS names (i.e. the ones returned by os.na... | def mkpath (self, name, mode=0777): mkpath (name, mode, self.verbose, self.dry_run) | 4be4be8ede8d2cb760abf6af749f2bd1c0178bc9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4be4be8ede8d2cb760abf6af749f2bd1c0178bc9/ccompiler.py |
compiler = default_compiler[plat] | compiler = get_default_compiler(plat) | def new_compiler (plat=None, compiler=None, verbose=0, dry_run=0, force=0): """Generate an instance of some CCompiler subclass for the supplied platform/compiler combination. 'plat' defaults to 'os.name' (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler for that platform. Currently only 'posix' and... | 4be4be8ede8d2cb760abf6af749f2bd1c0178bc9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4be4be8ede8d2cb760abf6af749f2bd1c0178bc9/ccompiler.py |
coords = self._canvas.bbox(self._TAG) | coords = self._canvas.coords(self._TAG) | def _x(self): coords = self._canvas.bbox(self._TAG) assert coords return coords[2] - 6 # BAW: kludge | b5d3dfa0fc243824fd8097dc3b4950e5aafd4feb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b5d3dfa0fc243824fd8097dc3b4950e5aafd4feb/StripViewer.py |
return coords[2] - 6 | return coords[0] + self._ARROWWIDTH | def _x(self): coords = self._canvas.bbox(self._TAG) assert coords return coords[2] - 6 # BAW: kludge | b5d3dfa0fc243824fd8097dc3b4950e5aafd4feb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b5d3dfa0fc243824fd8097dc3b4950e5aafd4feb/StripViewer.py |
":build.macppc.shared:PythonCore.", | ":build.macppc.shared:PythonCorePPC.", | def buildapplet(top, dummy, list): """Create a PPC python applet""" template = mkapplet.findtemplate() for src in list: if src[-3:] != '.py': raise 'Should end in .py', src base = os.path.basename(src) dst = os.path.join(top, base)[:-3] src = os.path.join(top, src) try: os.unlink(dst) except os.error: pass print 'Build... | 0c28b63263149c7e1a7a07ef92681a509258fd3e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0c28b63263149c7e1a7a07ef92681a509258fd3e/fullbuild.py |
":build.macppc.shared:PythonApplet.", | ":build.macppc.shared:PythonAppletPPC.", | def buildapplet(top, dummy, list): """Create a PPC python applet""" template = mkapplet.findtemplate() for src in list: if src[-3:] != '.py': raise 'Should end in .py', src base = os.path.basename(src) dst = os.path.join(top, base)[:-3] src = os.path.join(top, src) try: os.unlink(dst) except os.error: pass print 'Build... | 0c28b63263149c7e1a7a07ef92681a509258fd3e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0c28b63263149c7e1a7a07ef92681a509258fd3e/fullbuild.py |
":PlugIns:ctbmodule.ppc.", | ":PlugIns:ctb.ppc.", | def buildapplet(top, dummy, list): """Create a PPC python applet""" template = mkapplet.findtemplate() for src in list: if src[-3:] != '.py': raise 'Should end in .py', src base = os.path.basename(src) dst = os.path.join(top, base)[:-3] src = os.path.join(top, src) try: os.unlink(dst) except os.error: pass print 'Build... | 0c28b63263149c7e1a7a07ef92681a509258fd3e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0c28b63263149c7e1a7a07ef92681a509258fd3e/fullbuild.py |
":PlugIns:macspeechmodule.ppc.", | ":PlugIns:macspeech.ppc.", | def buildapplet(top, dummy, list): """Create a PPC python applet""" template = mkapplet.findtemplate() for src in list: if src[-3:] != '.py': raise 'Should end in .py', src base = os.path.basename(src) dst = os.path.join(top, base)[:-3] src = os.path.join(top, src) try: os.unlink(dst) except os.error: pass print 'Build... | 0c28b63263149c7e1a7a07ef92681a509258fd3e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0c28b63263149c7e1a7a07ef92681a509258fd3e/fullbuild.py |
":PlugIns:wastemodule.ppc.", ":PlugIns:_tkintermodule.ppc.", | ":PlugIns:qtmodules.ppc.", ":PlugIns:waste.ppc.", ":PlugIns:_tkinter.ppc.", | def buildapplet(top, dummy, list): """Create a PPC python applet""" template = mkapplet.findtemplate() for src in list: if src[-3:] != '.py': raise 'Should end in .py', src base = os.path.basename(src) dst = os.path.join(top, base)[:-3] src = os.path.join(top, src) try: os.unlink(dst) except os.error: pass print 'Build... | 0c28b63263149c7e1a7a07ef92681a509258fd3e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0c28b63263149c7e1a7a07ef92681a509258fd3e/fullbuild.py |
":PlugIns:ctbmodule.CFM68K.", | ":PlugIns:ctb.CFM68K.", ":PlugIns:imgmodules.ppc.", | def buildapplet(top, dummy, list): """Create a PPC python applet""" template = mkapplet.findtemplate() for src in list: if src[-3:] != '.py': raise 'Should end in .py', src base = os.path.basename(src) dst = os.path.join(top, base)[:-3] src = os.path.join(top, src) try: os.unlink(dst) except os.error: pass print 'Build... | 0c28b63263149c7e1a7a07ef92681a509258fd3e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0c28b63263149c7e1a7a07ef92681a509258fd3e/fullbuild.py |
":PlugIns:wastemodule.CFM68K.", ":PlugIns:_tkintermodule.CFM68K.", | ":PlugIns:qtmodules.CFM68K.", ":PlugIns:waste.CFM68K.", ":PlugIns:_tkinter.CFM68K.", | def buildapplet(top, dummy, list): """Create a PPC python applet""" template = mkapplet.findtemplate() for src in list: if src[-3:] != '.py': raise 'Should end in .py', src base = os.path.basename(src) dst = os.path.join(top, base)[:-3] src = os.path.join(top, src) try: os.unlink(dst) except os.error: pass print 'Build... | 0c28b63263149c7e1a7a07ef92681a509258fd3e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0c28b63263149c7e1a7a07ef92681a509258fd3e/fullbuild.py |
The function prototype can be called in three ways to create a | The function prototype can be called in different ways to create a | def CFUNCTYPE(restype, *argtypes): """CFUNCTYPE(restype, *argtypes) -> function prototype. restype: the result type argtypes: a sequence specifying the argument types The function prototype can be called in three ways to create a callable object: prototype(integer address) -> foreign function prototype(callable) -> ... | 372d22c570ff8cc92b80aa14f932e403a3853c68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/372d22c570ff8cc92b80aa14f932e403a3853c68/__init__.py |
(to an older frame).""" | (to a newer frame).""" | def help_d(self): print """d(own) | 3815c552721a7d8d5b6a7f0aa8788455371968ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3815c552721a7d8d5b6a7f0aa8788455371968ef/pdb.py |
(to a newer frame).""" | (to an older frame).""" | def help_u(self): print """u(p) | 3815c552721a7d8d5b6a7f0aa8788455371968ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3815c552721a7d8d5b6a7f0aa8788455371968ef/pdb.py |
def add_windows_to_menu(menu): registry.add_windows_to_menu(menu) | add_windows_to_menu = registry.add_windows_to_menu register_callback = registry.register_callback unregister_callback = registry.unregister_callback call_callbacks = registry.call_callbacks | def add_windows_to_menu(menu): registry.add_windows_to_menu(menu) | 2f485d659a3e4d1b788b595b7adc4469306d9f8c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2f485d659a3e4d1b788b595b7adc4469306d9f8c/WindowList.py |
client address as self.client_request, and the server (in case it | client address as self.client_address, and the server (in case it | def process_request(self, request, client_address): """Start a new thread to process the request.""" import thread thread.start_new_thread(self.finish_request, (request, client_address)) | fc7db8ca200b82e6726711548ed2e921696e989d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fc7db8ca200b82e6726711548ed2e921696e989d/SocketServer.py |
if not included: self._version = dict.get('Version', '0.1') if self._version != PIMP_VERSION: sys.stderr.write("Warning: database version %s does not match %s\n" | if included: version = dict.get('Version') if version and version > self._version: sys.stderr.write("Warning: included database %s is for pimp version %s\n" % (url, version)) else: self._version = dict.get('Version') if not self._version: sys.stderr.write("Warning: database has no Version information\n") elif self._ver... | def appendURL(self, url, included=0): """Append packages from the database with the given URL. Only the first database should specify included=0, so the global information (maintainer, description) get stored.""" if url in self._urllist: return self._urllist.append(url) fp = urllib2.urlopen(url).fp dict = plistlib.Pli... | 005fe6f20a68475eb007be99622a42047de0bdcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/005fe6f20a68475eb007be99622a42047de0bdcf/pimp.py |
print " -D dir Set destination directory (default: site-packages)" | print " -D dir Set destination directory" print " (default: %s)" % DEFAULT_INSTALLDIR print " -u url URL for database" print " (default: %s)" % DEFAULT_PIMPDATABASE | def _help(): print "Usage: pimp [options] -s [package ...] List installed status" print " pimp [options] -l [package ...] Show package information" print " pimp [options] -i package ... Install packages" print " pimp -d Dump database to stdout" print "Options:" print " ... | 005fe6f20a68475eb007be99622a42047de0bdcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/005fe6f20a68475eb007be99622a42047de0bdcf/pimp.py |
opts, args = getopt.getopt(sys.argv[1:], "slifvdD:") except getopt.Error: | opts, args = getopt.getopt(sys.argv[1:], "slifvdD:Vu:") except getopt.GetoptError: | def _help(): print "Usage: pimp [options] -s [package ...] List installed status" print " pimp [options] -l [package ...] Show package information" print " pimp [options] -i package ... Install packages" print " pimp -d Dump database to stdout" print "Options:" print " ... | 005fe6f20a68475eb007be99622a42047de0bdcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/005fe6f20a68475eb007be99622a42047de0bdcf/pimp.py |
_run(mode, verbose, force, args, prefargs) | if mode == 'version': print 'Pimp version %s; module name is %s' % (PIMP_VERSION, __name__) else: _run(mode, verbose, force, args, prefargs) if __name__ != 'pimp_update': try: import pimp_update except ImportError: pass else: if pimp_update.PIMP_VERSION <= PIMP_VERSION: import warnings warnings.warn("pimp_update i... | def _help(): print "Usage: pimp [options] -s [package ...] List installed status" print " pimp [options] -l [package ...] Show package information" print " pimp [options] -i package ... Install packages" print " pimp -d Dump database to stdout" print "Options:" print " ... | 005fe6f20a68475eb007be99622a42047de0bdcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/005fe6f20a68475eb007be99622a42047de0bdcf/pimp.py |
if os.path.exists (self.build_bdist) | if os.path.exists (self.build_bdist): | def run(self): # remove the build/temp.<plat> directory (unless it's already # gone) if os.path.exists (self.build_temp): remove_tree (self.build_temp, self.verbose, self.dry_run) | b6902b2ec210f44a40642e42909daf771c48b42d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b6902b2ec210f44a40642e42909daf771c48b42d/clean.py |
base = path[len(longest) + 1:].replace("/", ".") | if longest: base = path[len(longest) + 1:] else: base = path base = base.replace("/", ".") | def fullmodname(path): """Return a plausible module name for the path.""" # If the file 'path' is part of a package, then the filename isn't # enough to uniquely identify it. Try to do the right thing by # looking in sys.path for the longest matching prefix. We'll # assume that the rest is the package name. longest... | 6778d9dcbcf5c3a570157b7f4b220230d80b83f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6778d9dcbcf5c3a570157b7f4b220230d80b83f6/trace.py |
from pprint import pprint print "options (after parsing config files):" pprint (self.command_options) | parser.__init__() | def parse_config_files (self, filenames=None): | 83524a79f442571b7411524d49f6f5fa8e189c0d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/83524a79f442571b7411524d49f6f5fa8e189c0d/dist.py |
if opts.help: | if hasattr(opts, 'help') and opts.help: | def _parse_command_opts (self, parser, args): | 83524a79f442571b7411524d49f6f5fa8e189c0d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/83524a79f442571b7411524d49f6f5fa8e189c0d/dist.py |
cmd_opts[command] = ("command line", value) | cmd_opts[name] = ("command line", value) | def _parse_command_opts (self, parser, args): | 83524a79f442571b7411524d49f6f5fa8e189c0d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/83524a79f442571b7411524d49f6f5fa8e189c0d/dist.py |
cmd_obj = self.command_obj[command] = klass() self.command_run[command] = 0 | cmd_obj = self.command_obj[command] = klass(self) self.have_run[command] = 0 options = self.command_options.get(command) if options: print " setting options:" for (option, (source, value)) in options.items(): print " %s = %s (from %s)" % (option, value, source) setattr(cmd_obj, option, value) | def get_command_obj (self, command, create=1): """Return the command object for 'command'. Normally this object is cached on a previous call to 'get_command_obj()'; if no comand object for 'command' is in the cache, then we either create and return it (if 'create' is true) or return None. """ cmd_obj = self.command_ob... | 83524a79f442571b7411524d49f6f5fa8e189c0d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/83524a79f442571b7411524d49f6f5fa8e189c0d/dist.py |
self.default(line) return | return self.default(line) | def onecmd(self, line): line = string.strip(line) if line == '?': line = 'help' elif line == '!': if hasattr(self, 'do_shell'): line = 'shell' else: self.default(line) return elif not line: self.emptyline() return self.lastcmd = line i, n = 0, len(line) while i < n and line[i] in self.identchars: i = i+1 cmd, arg = lin... | ebc50ab318d8f90298757368f4820ef8b3565e41 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ebc50ab318d8f90298757368f4820ef8b3565e41/cmd.py |
self.emptyline() return | return self.emptyline() | def onecmd(self, line): line = string.strip(line) if line == '?': line = 'help' elif line == '!': if hasattr(self, 'do_shell'): line = 'shell' else: self.default(line) return elif not line: self.emptyline() return self.lastcmd = line i, n = 0, len(line) while i < n and line[i] in self.identchars: i = i+1 cmd, arg = lin... | ebc50ab318d8f90298757368f4820ef8b3565e41 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ebc50ab318d8f90298757368f4820ef8b3565e41/cmd.py |
left = resp.find('(') if left < 0: raise error_proto, resp right = resp.find(')', left + 1) if right < 0: raise error_proto, resp numbers = resp[left+1:right].split(',') if len(numbers) != 6: | global _227_re if _227_re is None: import re _227_re = re.compile(r'(\d+),(\d+),(\d+),(\d+),(\d+),(\d+)') m = _227_re.search(resp) if not m: | def parse227(resp): '''Parse the '227' response for a PASV request. Raises error_proto if it does not contain '(h1,h2,h3,h4,p1,p2)' Return ('host.addr.as.numbers', port#) tuple.''' if resp[:3] != '227': raise error_reply, resp left = resp.find('(') if left < 0: raise error_proto, resp right = resp.find(')', left + 1) ... | 5055beaffa50b5e4b08a43a2fe350d9a9e286f3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5055beaffa50b5e4b08a43a2fe350d9a9e286f3d/ftplib.py |
contents = doc and doc + '\n' methods = allmethods(object).items() methods.sort() for key, value in methods: contents = contents + '\n' + self.document(value, key, mod, object) if not contents: return title + '\n' | contents = doc and [doc + '\n'] or [] push = contents.append def spill(msg, attrs, predicate): ok, attrs = _split_class_attrs(attrs, predicate) if ok: push(msg) for name, kind, homecls, value in ok: push(self.document(getattr(object, name), name, mod, object)) return attrs def spillproperties(msg, attrs): ok, attr... | def makename(c, m=object.__module__): return classname(c, m) | 25913a37ae3a843a6d57db9f5e63ed9ca58a7c7a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/25913a37ae3a843a6d57db9f5e63ed9ca58a7c7a/pydoc.py |
def docother(self, object, name=None, mod=None, maxlen=None): | def docother(self, object, name=None, mod=None, maxlen=None, doc=None): | def docother(self, object, name=None, mod=None, maxlen=None): """Produce text documentation for a data object.""" repr = self.repr(object) if maxlen: line = (name and name + ' = ' or '') + repr chop = maxlen - len(line) if chop < 0: repr = repr[:chop] + '...' line = (name and self.bold(name) + ' = ' or '') + repr retur... | 25913a37ae3a843a6d57db9f5e63ed9ca58a7c7a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/25913a37ae3a843a6d57db9f5e63ed9ca58a7c7a/pydoc.py |
return ExpatParser() | return xml.sax.make_parser() | def _getParser(): return ExpatParser() | b9e19d5c827436e5230b569c98578273c3c70bb8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b9e19d5c827436e5230b569c98578273c3c70bb8/pulldom.py |
def pickle_complex(c): return complex, (c.real, c.imag) | try: complex except NameError: pass else: | def pickle_complex(c): return complex, (c.real, c.imag) | 86d5c79b1c47e9a06cb941db0133658083fdcc2f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/86d5c79b1c47e9a06cb941db0133658083fdcc2f/copy_reg.py |
pickle(type(1j), pickle_complex, complex) | def pickle_complex(c): return complex, (c.real, c.imag) pickle(complex, pickle_complex, complex) | def pickle_complex(c): return complex, (c.real, c.imag) | 86d5c79b1c47e9a06cb941db0133658083fdcc2f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/86d5c79b1c47e9a06cb941db0133658083fdcc2f/copy_reg.py |
print "testing complex args" | if verbose: print "testing complex args" | exec 'def f(a): global a; a = 1' | 18bc5c5b6c1936c74baff43f1ef05f794ac69130 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/18bc5c5b6c1936c74baff43f1ef05f794ac69130/test_compile.py |
def __init__(self, name, mode=RTLD_LOCAL, handle=None): | def __init__(self, name, mode=DEFAULT_MODE, handle=None): | def __init__(self, name, mode=RTLD_LOCAL, handle=None): self._name = name if handle is None: self._handle = _dlopen(self._name, mode) else: self._handle = handle | 34572bc258685868d9d1430eb56d0a2e4f11b3e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/34572bc258685868d9d1430eb56d0a2e4f11b3e5/__init__.py |
streamservers = [UnixStreamServer, ThreadingUnixStreamServer, ForkingUnixStreamServer] | streamservers = [UnixStreamServer, ThreadingUnixStreamServer] if hasattr(os, 'fork') and os.name not in ('os2',): streamservers.append(ForkingUnixStreamServer) | def testloop(proto, servers, hdlrcls, testfunc): for svrcls in servers: addr = pickaddr(proto) if verbose: print "ADDR =", addr print "CLASS =", svrcls t = ServerThread(addr, svrcls, hdlrcls) if verbose: print "server created" t.start() if verbose: print "server running" for i in range(NREQ): time.sleep(DELAY) if verbo... | fc404ffca54cf3ad7ff2f378554f4d638e969082 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fc404ffca54cf3ad7ff2f378554f4d638e969082/test_socketserver.py |
dgramservers = [UnixDatagramServer, ThreadingUnixDatagramServer, ForkingUnixDatagramServer] | dgramservers = [UnixDatagramServer, ThreadingUnixDatagramServer] if hasattr(os, 'fork') and os.name not in ('os2',): dgramservers.append(ForkingUnixDatagramServer) | def testloop(proto, servers, hdlrcls, testfunc): for svrcls in servers: addr = pickaddr(proto) if verbose: print "ADDR =", addr print "CLASS =", svrcls t = ServerThread(addr, svrcls, hdlrcls) if verbose: print "server created" t.start() if verbose: print "server running" for i in range(NREQ): time.sleep(DELAY) if verbo... | fc404ffca54cf3ad7ff2f378554f4d638e969082 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fc404ffca54cf3ad7ff2f378554f4d638e969082/test_socketserver.py |
except ImportError: | gzip.GzipFile except (ImportError, AttributeError): | def gzopen(cls, name, mode="r", fileobj=None, compresslevel=9): """Open gzip compressed tar archive name for reading or writing. Appending is not allowed. """ if len(mode) > 1 or mode not in "rw": raise ValueError, "mode must be 'r' or 'w'" | 56924b2f09bddb628749a038a437fbfa33e82349 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/56924b2f09bddb628749a038a437fbfa33e82349/tarfile.py |
db_incs = find_file('db_185.h', inc_dirs, []) if (db_incs is not None and self.compiler.find_library_file(lib_dirs, 'db') ): | dblib = [] if self.compiler.find_library_file(lib_dirs, 'db'): dblib = ['db'] db185_incs = find_file('db_185.h', inc_dirs, ['/usr/include/db3', '/usr/include/db2']) db_inc = find_file('db.h', inc_dirs, ['/usr/include/db1']) if db185_incs is not None: | 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.append('/usr/local/lib') if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.append( '/usr/local/include' ) | ddc84c8bc150a4eec7964962970504dd33674549 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ddc84c8bc150a4eec7964962970504dd33674549/setup.py |
include_dirs = db_incs, libraries = ['db'] ) ) else: db_incs = find_file('db.h', inc_dirs, []) if db_incs is not None: exts.append( Extension('bsddb', ['bsddbmodule.c'], include_dirs = db_incs) ) | include_dirs = db185_incs, define_macros=[('HAVE_DB_185_H',1)], libraries = dblib ) ) elif db_inc is not None: exts.append( Extension('bsddb', ['bsddbmodule.c'], include_dirs = db_inc, libraries = dblib) ) | 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.append('/usr/local/lib') if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.append( '/usr/local/include' ) | ddc84c8bc150a4eec7964962970504dd33674549 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ddc84c8bc150a4eec7964962970504dd33674549/setup.py |
return Carbon.Files.ResolveAliasFile(fss, chain) | return Carbon.File.ResolveAliasFile(fss, chain) | def ResolveAliasFile(fss, chain=1): return Carbon.Files.ResolveAliasFile(fss, chain) | db37ede9b4dffa371b6078c275f8cab39d005885 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/db37ede9b4dffa371b6078c275f8cab39d005885/macfs.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.