rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
e.keysym_num = getint(N) | e.keysym_num = getint_event(N) | def _substitute(self, *args): """Internal function.""" if len(args) != len(self._subst_format): return args getboolean = self.tk.getboolean getint = int nsign, b, f, h, k, s, t, w, x, y, A, E, K, N, W, T, X, Y, D = args # Missing: (a, c, d, m, o, v, B, R) e = Event() e.serial = getint(nsign) e.num = getint(b) try: e.fo... | 851b1c8d466c86af5052fb03f636288f91058f32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/851b1c8d466c86af5052fb03f636288f91058f32/Tkinter.py |
e.x_root = getint(X) e.y_root = getint(Y) | e.x_root = getint_event(X) e.y_root = getint_event(Y) | def _substitute(self, *args): """Internal function.""" if len(args) != len(self._subst_format): return args getboolean = self.tk.getboolean getint = int nsign, b, f, h, k, s, t, w, x, y, A, E, K, N, W, T, X, Y, D = args # Missing: (a, c, d, m, o, v, B, R) e = Event() e.serial = getint(nsign) e.num = getint(b) try: e.fo... | 851b1c8d466c86af5052fb03f636288f91058f32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/851b1c8d466c86af5052fb03f636288f91058f32/Tkinter.py |
def run_tests(): for input, output, kind in ((exec_tests, exec_results, "exec"), (single_tests, single_results, "single"), (eval_tests, eval_results, "eval")): for i, o in itertools.izip(input, output): ast_tree = compile(i, "?", kind, 0x400) # XXX(nnorwitz): these prints seem to be only for debugging. # If they are r... | 15eff951248a10e158420736ec6e2cbd1729af71 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/15eff951248a10e158420736ec6e2cbd1729af71/test_ast.py | ||
initialcolor = (128, 128, 128) | initialcolor = 'grey50' | def main(): global app initialcolor = (128, 128, 128) try: opts, args = getopt.getopt(sys.argv[1:], 'hc:', ['color=', 'help']) except getopt.error, msg: usage(1, msg) if args: usage(1) for opt, arg in opts: if opt in ('-h', '--help'): usage(0) elif opt in ('-c', '--color'): initialcolor = arg # create the windows a... | 9f4768877f66d59d523b4b857fd4dfb43c9234b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9f4768877f66d59d523b4b857fd4dfb43c9234b5/Main.py |
funcs = (None, lambda x: True) | funcs = (None, bool, lambda x: True) | def test_filter_subclasses(self): # test, that filter() never returns tuple, str or unicode subclasses # and that the result always go's through __getitem__ funcs = (None, lambda x: True) class tuple2(tuple): def __getitem__(self, index): return 2*tuple.__getitem__(self, index) class str2(str): def __getitem__(self, in... | 5a12c18d5d51ffb63297c823a8713039ee36cad4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5a12c18d5d51ffb63297c823a8713039ee36cad4/test_builtin.py |
L2 = L | L2 = L[:] | def test_long(self): self.assertEqual(long(314), 314L) self.assertEqual(long(3.14), 3L) self.assertEqual(long(314L), 314L) # Check that conversion from float truncates towards zero self.assertEqual(long(-3.14), -3L) self.assertEqual(long(3.9), 3L) self.assertEqual(long(-3.9), -3L) self.assertEqual(long(3.5), 3L) self.a... | 5a12c18d5d51ffb63297c823a8713039ee36cad4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5a12c18d5d51ffb63297c823a8713039ee36cad4/test_builtin.py |
return browser | return GenericBrowser(browser) | def get(using=None): """Return a browser launcher instance appropriate for the environment.""" if using: alternatives = [using] else: alternatives = _tryorder for browser in alternatives: if browser.find('%s') > -1: # User gave us a command line, don't mess with it. return browser else: # User gave us a browser name. c... | 797cf038610cd8a38786e542c2bcfe0768e1f6b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/797cf038610cd8a38786e542c2bcfe0768e1f6b9/webbrowser.py |
cmdclass = {'build_ext':PyBuildExt, 'install':PyBuildInstall}, | cmdclass = {'build_ext':PyBuildExt, 'install':PyBuildInstall, 'install_lib':PyBuildInstallLib}, | def main(): # turn off warnings when deprecated modules are imported import warnings warnings.filterwarnings("ignore",category=DeprecationWarning) setup(name = 'Python standard library', version = '%d.%d' % sys.version_info[:2], cmdclass = {'build_ext':PyBuildExt, 'install':PyBuildInstall}, # The struct module is defin... | 0b55fe4de63c89c5ebc47ffe99b5b2af3ae0a7f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0b55fe4de63c89c5ebc47ffe99b5b2af3ae0a7f0/setup.py |
modulesbyfile[getabsfile(module)] = module.__name__ | modulesbyfile[ os.path.realpath( getabsfile(module))] = module.__name__ | def getmodule(object): """Return the module an object was defined in, or None if not found.""" if ismodule(object): return object if isclass(object): return sys.modules.get(object.__module__) try: file = getabsfile(object) except TypeError: return None if file in modulesbyfile: return sys.modules.get(modulesbyfile[file... | 2ef91adc08b227f7cdbadf85129739a65de4420d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2ef91adc08b227f7cdbadf85129739a65de4420d/inspect.py |
def resolve_dotted_attribute(obj, attr): | def resolve_dotted_attribute(obj, attr, allow_dotted_names=True): | def resolve_dotted_attribute(obj, attr): """resolve_dotted_attribute(a, 'b.c.d') => a.b.c.d Resolves a dotted attribute name to an object. Raises an AttributeError if any attribute in the chain starts with a '_'. """ for i in attr.split('.'): if i.startswith('_'): raise AttributeError( 'attempt to access private att... | a00715b80921e89699473804647f7d3d0cd9ce7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a00715b80921e89699473804647f7d3d0cd9ce7c/SimpleXMLRPCServer.py |
for i in attr.split('.'): | if allow_dotted_names: attrs = attr.split('.') else: attrs = [attr] for i in attrs: | def resolve_dotted_attribute(obj, attr): """resolve_dotted_attribute(a, 'b.c.d') => a.b.c.d Resolves a dotted attribute name to an object. Raises an AttributeError if any attribute in the chain starts with a '_'. """ for i in attr.split('.'): if i.startswith('_'): raise AttributeError( 'attempt to access private att... | a00715b80921e89699473804647f7d3d0cd9ce7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a00715b80921e89699473804647f7d3d0cd9ce7c/SimpleXMLRPCServer.py |
def register_instance(self, instance): | def register_instance(self, instance, allow_dotted_names=False): | def register_instance(self, instance): """Registers an instance to respond to XML-RPC requests. | a00715b80921e89699473804647f7d3d0cd9ce7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a00715b80921e89699473804647f7d3d0cd9ce7c/SimpleXMLRPCServer.py |
method_name | method_name, self.allow_dotted_names | def system_methodHelp(self, method_name): """system.methodHelp('add') => "Adds two integers together" | a00715b80921e89699473804647f7d3d0cd9ce7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a00715b80921e89699473804647f7d3d0cd9ce7c/SimpleXMLRPCServer.py |
method | method, self.allow_dotted_names | def _dispatch(self, method, params): """Dispatches the XML-RPC method. | a00715b80921e89699473804647f7d3d0cd9ce7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a00715b80921e89699473804647f7d3d0cd9ce7c/SimpleXMLRPCServer.py |
vereq(x.a, None) | verify(not hasattr(x, "a")) | def slots(): if verbose: print "Testing __slots__..." class C0(object): __slots__ = [] x = C0() verify(not hasattr(x, "__dict__")) verify(not hasattr(x, "foo")) class C1(object): __slots__ = ['a'] x = C1() verify(not hasattr(x, "__dict__")) vereq(x.a, None) x.a = 1 vereq(x.a, 1) del x.a vereq(x.a, None) class C3(obje... | 7c088072c50f278ae64398c9b1dc2250b2975992 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7c088072c50f278ae64398c9b1dc2250b2975992/test_descr.py |
vereq(x.a, None) | verify(not hasattr(x, "a")) | def slots(): if verbose: print "Testing __slots__..." class C0(object): __slots__ = [] x = C0() verify(not hasattr(x, "__dict__")) verify(not hasattr(x, "foo")) class C1(object): __slots__ = ['a'] x = C1() verify(not hasattr(x, "__dict__")) vereq(x.a, None) x.a = 1 vereq(x.a, 1) del x.a vereq(x.a, None) class C3(obje... | 7c088072c50f278ae64398c9b1dc2250b2975992 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7c088072c50f278ae64398c9b1dc2250b2975992/test_descr.py |
verify(x.a is None) verify(x.b is None) verify(x.c is None) | verify(not hasattr(x, 'a')) verify(not hasattr(x, 'b')) verify(not hasattr(x, 'c')) | def slots(): if verbose: print "Testing __slots__..." class C0(object): __slots__ = [] x = C0() verify(not hasattr(x, "__dict__")) verify(not hasattr(x, "foo")) class C1(object): __slots__ = ['a'] x = C1() verify(not hasattr(x, "__dict__")) vereq(x.a, None) x.a = 1 vereq(x.a, 1) del x.a vereq(x.a, None) class C3(obje... | 7c088072c50f278ae64398c9b1dc2250b2975992 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7c088072c50f278ae64398c9b1dc2250b2975992/test_descr.py |
and socket.gethostbyname(host) in (localhost(), thishost()): | and socket.gethostbyname(host) in (localhost(), thishost()): | def open_local_file(self, url): """Use local file.""" import mimetypes, mimetools, StringIO mtype = mimetypes.guess_type(url)[0] headers = mimetools.Message(StringIO.StringIO( 'Content-Type: %s\n' % (mtype or 'text/plain'))) host, file = splithost(url) if not host: urlfile = file if file[:1] == '/': urlfile = 'file://'... | 29172830e643eeb95ca32bcea860dd53f9815f25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29172830e643eeb95ca32bcea860dd53f9815f25/urllib.py |
def http_error_302(self, url, fp, errcode, errmsg, headers, data=None): | def http_error_302(self, url, fp, errcode, errmsg, headers, data=None): | def http_error_302(self, url, fp, errcode, errmsg, headers, data=None): """Error 302 -- relocated (temporarily).""" # XXX The server can force infinite recursion here! if headers.has_key('location'): newurl = headers['location'] elif headers.has_key('uri'): newurl = headers['uri'] else: return void = fp.read() fp.close... | 29172830e643eeb95ca32bcea860dd53f9815f25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29172830e643eeb95ca32bcea860dd53f9815f25/urllib.py |
def http_error_301(self, url, fp, errcode, errmsg, headers, data=None): | def http_error_301(self, url, fp, errcode, errmsg, headers, data=None): | def http_error_301(self, url, fp, errcode, errmsg, headers, data=None): """Error 301 -- also relocated (permanently).""" return self.http_error_302(url, fp, errcode, errmsg, headers, data) | 29172830e643eeb95ca32bcea860dd53f9815f25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29172830e643eeb95ca32bcea860dd53f9815f25/urllib.py |
def http_error_401(self, url, fp, errcode, errmsg, headers, data=None): | def http_error_401(self, url, fp, errcode, errmsg, headers, data=None): | def http_error_401(self, url, fp, errcode, errmsg, headers, data=None): """Error 401 -- authentication required. See this URL for a description of the basic authentication scheme: http://www.ics.uci.edu/pub/ietf/http/draft-ietf-http-v10-spec-00.txt""" if headers.has_key('www-authenticate'): stuff = headers['www-authent... | 29172830e643eeb95ca32bcea860dd53f9815f25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29172830e643eeb95ca32bcea860dd53f9815f25/urllib.py |
def retry_http_basic_auth(self, url, realm, data=None): host, selector = splithost(url) i = string.find(host, '@') + 1 host = host[i:] user, passwd = self.get_user_passwd(host, realm, i) if not (user or passwd): return None host = user + ':' + passwd + '@' + host newurl = 'http://' + host + selector if data is None: re... | 29172830e643eeb95ca32bcea860dd53f9815f25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29172830e643eeb95ca32bcea860dd53f9815f25/urllib.py | ||
host)) | host)) | def prompt_user_passwd(self, host, realm): """Override this in a GUI environment!""" import getpass try: user = raw_input("Enter username for %s at %s: " % (realm, host)) passwd = getpass.getpass("Enter password for %s in %s at %s: " % (user, realm, host)) return user, passwd except KeyboardInterrupt: print return None... | 29172830e643eeb95ca32bcea860dd53f9815f25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29172830e643eeb95ca32bcea860dd53f9815f25/urllib.py |
self.endtransfer), conn[1]) | self.endtransfer), conn[1]) | def retrfile(self, file, type): import ftplib self.endtransfer() if type in ('d', 'D'): cmd = 'TYPE A'; isdir = 1 else: cmd = 'TYPE ' + type; isdir = 0 try: self.ftp.voidcmd(cmd) except ftplib.all_errors: self.init() self.ftp.voidcmd(cmd) conn = None if file and not isdir: # Use nlst to see if the file exists at all tr... | 29172830e643eeb95ca32bcea860dd53f9815f25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29172830e643eeb95ca32bcea860dd53f9815f25/urllib.py |
`id(self)`, `self.fp`) | `id(self)`, `self.fp`) | def __repr__(self): return '<%s at %s whose fp = %s>' % (self.__class__.__name__, `id(self)`, `self.fp`) | 29172830e643eeb95ca32bcea860dd53f9815f25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29172830e643eeb95ca32bcea860dd53f9815f25/urllib.py |
def basejoin(base, url): """Utility to combine a URL with a base URL to form a new URL.""" type, path = splittype(url) if type: # if url is complete (i.e., it contains a type), return it return url host, path = splithost(path) type, basepath = splittype(base) # inherit type from base if host: # if url contains host, ju... | 29172830e643eeb95ca32bcea860dd53f9815f25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29172830e643eeb95ca32bcea860dd53f9815f25/urllib.py | ||
match = _hostprog.match(url) | match = _hostprog.match(url) | def splithost(url): """splithost('//host[:port]/path') --> 'host[:port]', '/path'.""" global _hostprog if _hostprog is None: import re _hostprog = re.compile('^//([^/]*)(.*)$') match = _hostprog.match(url) if match: return match.group(1, 2) return None, url | 29172830e643eeb95ca32bcea860dd53f9815f25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29172830e643eeb95ca32bcea860dd53f9815f25/urllib.py |
always_safe = ('ABCDEFGHIJKLMNOPQRSTUVWXYZ' | always_safe = ('ABCDEFGHIJKLMNOPQRSTUVWXYZ' | def unquote_plus(s): """unquote('%7e/abc+def') -> '~/abc def'""" if '+' in s: # replace '+' with ' ' s = string.join(string.split(s, '+'), ' ') return unquote(s) | 29172830e643eeb95ca32bcea860dd53f9815f25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29172830e643eeb95ca32bcea860dd53f9815f25/urllib.py |
def quote(s, safe = '/'): """quote('abc def') -> 'abc%20def' Each part of a URL, e.g. the path info, the query, etc., has a different set of reserved characters that must be quoted. RFC 2396 Uniform Resource Identifiers (URI): Generic Syntax lists the following reserved characters. reserved = ";" | "/" | "?" | ":... | 29172830e643eeb95ca32bcea860dd53f9815f25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29172830e643eeb95ca32bcea860dd53f9815f25/urllib.py | ||
def getproxies(): """Return a dictionary of scheme -> proxy server URL mappings. | 29172830e643eeb95ca32bcea860dd53f9815f25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29172830e643eeb95ca32bcea860dd53f9815f25/urllib.py | ||
internetSettings = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, 'Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings') | internetSettings = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, r'Software\Microsoft\Windows\CurrentVersion\Internet Settings') | def getproxies_registry(): """Return a dictionary of scheme -> proxy server URL mappings. | 29172830e643eeb95ca32bcea860dd53f9815f25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29172830e643eeb95ca32bcea860dd53f9815f25/urllib.py |
if ';' in proxyServer: | if '=' in proxyServer: | def getproxies_registry(): """Return a dictionary of scheme -> proxy server URL mappings. | 29172830e643eeb95ca32bcea860dd53f9815f25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29172830e643eeb95ca32bcea860dd53f9815f25/urllib.py |
protocol, address = p.split('=') | protocol, address = p.split('=', 1) | def getproxies_registry(): """Return a dictionary of scheme -> proxy server URL mappings. | 29172830e643eeb95ca32bcea860dd53f9815f25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29172830e643eeb95ca32bcea860dd53f9815f25/urllib.py |
else: proxies['http'] = 'http://%s' % proxyServer proxies['ftp'] = 'ftp://%s' % proxyServer | else: if proxyServer[:5] == 'http:': proxies['http'] = proxyServer else: proxies['http'] = 'http://%s' % proxyServer proxies['ftp'] = 'ftp://%s' % proxyServer | def getproxies_registry(): """Return a dictionary of scheme -> proxy server URL mappings. | 29172830e643eeb95ca32bcea860dd53f9815f25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29172830e643eeb95ca32bcea860dd53f9815f25/urllib.py |
def parseitem(x, self=self): return x[:1] + tuple(map(getint, x[1:])) return map(parseitem, data) | return map(self.__winfo_parseitem, data) def __winfo_parseitem(self, t): return t[:1] + tuple(map(self.__winfo_getint, t[1:])) def __winfo_getint(self, x): return _string.atoi(x, 0) | def parseitem(x, self=self): return x[:1] + tuple(map(getint, x[1:])) | bc3ff5809358add377438c702e50d729abc11047 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bc3ff5809358add377438c702e50d729abc11047/Tkinter.py |
self.assertEqual(lines, ['Test']) | self.assertEqual(xlines, ['Test']) | def testBug1191043(self): # readlines() for files containing no newline data = 'BZh91AY&SY\xd9b\x89]\x00\x00\x00\x03\x80\x04\x00\x02\x00\x0c\x00 \x00!\x9ah3M\x13<]\xc9\x14\xe1BCe\x8a%t' f = open(self.filename, "wb") f.write(data) f.close() bz2f = BZ2File(self.filename) lines = bz2f.readlines() bz2f.close() self.assertE... | 2b6ce4008f422ac43b57eda847e2c56e0f7aecf1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2b6ce4008f422ac43b57eda847e2c56e0f7aecf1/test_bz2.py |
if sys.maxint > 0x7fffffff: self.assertRaises(ValueError, len, r) else: self.assertEqual(len(r), sys.maxint) | self.assertEqual(len(r), sys.maxint) | def test_xrange(self): self.assertEqual(list(xrange(3)), [0, 1, 2]) self.assertEqual(list(xrange(1, 5)), [1, 2, 3, 4]) self.assertEqual(list(xrange(0)), []) self.assertEqual(list(xrange(-3)), []) self.assertEqual(list(xrange(1, 10, 3)), [1, 4, 7]) self.assertEqual(list(xrange(5, -5, -3)), [5, 2, -1, -4]) | fe9dc6239b7d0b33e0f5ff9b17a0db6b5af6d0fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fe9dc6239b7d0b33e0f5ff9b17a0db6b5af6d0fd/test_xrange.py |
print '--Call--' self.interaction(frame, None) | if self.stop_here(frame): print '--Call--' self.interaction(frame, None) | def user_call(self, frame, argument_list): """This method is called when there is the remote possibility that we ever need to stop in this function.""" print '--Call--' self.interaction(frame, None) | a5bf9c50c16918c12a5ba81fc0bfd008d9750563 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a5bf9c50c16918c12a5ba81fc0bfd008d9750563/pdb.py |
BasicStrTest | BasicStrTest, CharmapTest | def test_main(): test_support.run_unittest( UTF16Test, UTF16LETest, UTF16BETest, UTF8Test, EscapeDecodeTest, RecodingTest, PunycodeTest, UnicodeInternalTest, NameprepTest, CodecTest, CodecsModuleTest, StreamReaderTest, Str2StrTest, BasicUnicodeTest, BasicStrTest ) | a4cc7a987d27b75b8fdd6fabb965ee62224f349c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a4cc7a987d27b75b8fdd6fabb965ee62224f349c/test_codecs.py |
y = self.expovariate(alpha) z = self.expovariate(1.0/beta) return z/(y+z) | y = self.gammavariate(alpha, 1.) if y == 0: return 0.0 else: return y / (y + self.gammavariate(beta, 1.)) | def betavariate(self, alpha, beta): | 5874be52240bcaea28b4f560ae0b568b094fdeb5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5874be52240bcaea28b4f560ae0b568b094fdeb5/random.py |
self.tempcache[url] = result = tfn, headers | self.tempcache[url] = result | def retrieve(self, url): if self.tempcache and self.tempcache.has_key(url): return self.tempcache[url] url1 = unwrap(url) if self.tempcache and self.tempcache.has_key(url1): self.tempcache[url] = self.tempcache[url1] return self.tempcache[url1] type, url1 = splittype(url1) if not type or type == 'file': try: fp = self.... | 757c6c4879c713dbc63a0f8f7dd9dee6f672429a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/757c6c4879c713dbc63a0f8f7dd9dee6f672429a/urllib.py |
def test_filter_subclasses(self): # test, that filter() never returns tuple, str or unicode subclasses # and that the result always go's through __getitem__ # FIXME: For tuple currently it doesn't go through __getitem__ funcs = (None, lambda x: True) class tuple2(tuple): def __getitem__(self, index): return 2*tuple.__g... | 092ed02874c00362f0c0eecaa81c0c7a6d297ae1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/092ed02874c00362f0c0eecaa81c0c7a6d297ae1/test_builtin.py | ||
tuple2: {(): (), (1, 2, 3): (1, 2, 3)}, | tuple2: {(): (), (1, 2, 3): (2, 4, 6)}, | def __getitem__(self, index): return 2*str.__getitem__(self, index) | 092ed02874c00362f0c0eecaa81c0c7a6d297ae1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/092ed02874c00362f0c0eecaa81c0c7a6d297ae1/test_builtin.py |
self.__delete() | try: self.__delete() except: pass | def __bootstrap(self): try: self.__started = 1 _active_limbo_lock.acquire() _active[_get_ident()] = self del _limbo[self] _active_limbo_lock.release() if __debug__: self._note("%s.__bootstrap(): thread started", self) try: self.run() except SystemExit: if __debug__: self._note("%s.__bootstrap(): raised SystemExit", sel... | e10732d0a2c70e9fca952552c69e5336bba50985 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e10732d0a2c70e9fca952552c69e5336bba50985/threading.py |
basename, ext = os.path.splitext (output_filename) output_filename = basename + '_d' + ext | def link_shared_object (self, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, debug=0, extra_preargs=None, extra_postargs=None): | eb3066ab5706021a5e3633458218840e8fc110d3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/eb3066ab5706021a5e3633458218840e8fc110d3/msvccompiler.py | |
try: unicode(u'decoding unicode is not supported', 'utf-8', 'strict') except TypeError: pass else: raise TestFailed, "decoding unicode should NOT be supported" | if not sys.platform.startswith('java'): try: unicode(u'decoding unicode is not supported', 'utf-8', 'strict') except TypeError: pass else: raise TestFailed, "decoding unicode should NOT be supported" | def __str__(self): return self.x | 428412131e097a21b3646f7ecd6f25b1fbb2b340 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/428412131e097a21b3646f7ecd6f25b1fbb2b340/test_unicode.py |
verify(unicode(buffer('character buffers are decoded to unicode'), 'utf-8', 'strict') == u'character buffers are decoded to unicode') | if not sys.platform.startswith('java'): verify(unicode(buffer('character buffers are decoded to unicode'), 'utf-8', 'strict') == u'character buffers are decoded to unicode') | def __str__(self): return self.x | 428412131e097a21b3646f7ecd6f25b1fbb2b340 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/428412131e097a21b3646f7ecd6f25b1fbb2b340/test_unicode.py |
if (sysconfig.get_config_var('HAVE_GETSPNAM') or sysconfig.get_config_var('HAVE_GETSPENT')): | if (config_h_vars.get('HAVE_GETSPNAM', False) or config_h_vars.get('HAVE_GETSPENT', False)): | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 28e343dcc31a94491ad4dfde40e0b40200d9f92b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/28e343dcc31a94491ad4dfde40e0b40200d9f92b/setup.py |
config_h = sysconfig.get_config_h_filename() config_h_vars = sysconfig.parse_config_h(open(config_h)) | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 28e343dcc31a94491ad4dfde40e0b40200d9f92b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/28e343dcc31a94491ad4dfde40e0b40200d9f92b/setup.py | |
return 1 | def test_expat_entityresolver(): return 1 # disabling this until pyexpat.c has been fixed parser = create_parser() parser.setEntityResolver(TestEntityResolver()) result = StringIO() parser.setContentHandler(XMLGenerator(result)) parser.feed('<!DOCTYPE doc [\n') parser.feed(' <!ENTITY test SYSTEM "whatever">\n') parse... | 155d8443cdd4884e9d98f833995b56033dd28d99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/155d8443cdd4884e9d98f833995b56033dd28d99/test_sax.py | |
if not self.__ensure_WMAvailable(): raise RuntimeError, "No window manager access, cannot send AppleEvent" | def sendevent(self, event): """Send a pre-created appleevent, await the reply and unpack it""" reply = event.AESend(self.send_flags, self.send_priority, self.send_timeout) parameters, attributes = unpackevent(reply, self._moduleName) return reply, parameters, attributes | 92b9c4c4107980df96a9343d643f99a8ddfc2deb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/92b9c4c4107980df96a9343d643f99a8ddfc2deb/aetools.py | |
text = self._split_header(text) | text = self._split_header(h, text) | def _write_headers(self, msg): for h, v in msg.items(): # We only write the MIME-Version: header for the outermost # container message. Unfortunately, we can't use same technique # as for the Unix-From above because we don't know when # MIME-Version: will occur. if h.lower() == 'mime-version' and not self.__first: con... | 9c54d8a782b36e843b35e10a09a65914f90f8757 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9c54d8a782b36e843b35e10a09a65914f90f8757/Generator.py |
def _split_header(self, text): | def _split_header(self, name, text): | def _split_header(self, text): maxheaderlen = self.__maxheaderlen # Find out whether any lines in the header are really longer than # maxheaderlen characters wide. There could be continuation lines # that actually shorten it. Also, replace hard tabs with 8 spaces. lines = [s.replace('\t', SPACE8) for s in text.split(... | 9c54d8a782b36e843b35e10a09a65914f90f8757 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9c54d8a782b36e843b35e10a09a65914f90f8757/Generator.py |
lines = [s.replace('\t', SPACE8) for s in text.split('\n')] | lines = [s.replace('\t', SPACE8) for s in text.splitlines()] | def _split_header(self, text): maxheaderlen = self.__maxheaderlen # Find out whether any lines in the header are really longer than # maxheaderlen characters wide. There could be continuation lines # that actually shorten it. Also, replace hard tabs with 8 spaces. lines = [s.replace('\t', SPACE8) for s in text.split(... | 9c54d8a782b36e843b35e10a09a65914f90f8757 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9c54d8a782b36e843b35e10a09a65914f90f8757/Generator.py |
rtn = [] for line in text.split('\n'): splitline = [] if len(line.replace('\t', SPACE8)) <= maxheaderlen: splitline.append(line) rtn.append(SEMINLTAB.join(splitline)) else: oldlen = len(line) while len(line) > maxheaderlen: i = line.rfind(';', 0, maxheaderlen) if i < 0: break splitline.append(line[:i]) line = line[i... | h = Header(text, maxlinelen=maxheaderlen, continuation_ws='\t') return h.encode() | def _split_header(self, text): maxheaderlen = self.__maxheaderlen # Find out whether any lines in the header are really longer than # maxheaderlen characters wide. There could be continuation lines # that actually shorten it. Also, replace hard tabs with 8 spaces. lines = [s.replace('\t', SPACE8) for s in text.split(... | 9c54d8a782b36e843b35e10a09a65914f90f8757 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9c54d8a782b36e843b35e10a09a65914f90f8757/Generator.py |
"""Check the LaTex formatting in a sequence of lines. | """Check the LaTeX formatting in a sequence of lines. | def checkit(source, opts, morecmds=[]): """Check the LaTex formatting in a sequence of lines. Opts is a mapping of options to option values if any: -m munge parenthesis and brackets -f forward slash warnings to be skipped -d delimiters only checking -v verbose listing on delimiters ... | 55b90d0e44a443ac52b870ca5d4405d432ce54ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/55b90d0e44a443ac52b870ca5d4405d432ce54ee/texcheck.py |
Morecmds is a sequence of LaTex commands (without backslashes) that | Morecmds is a sequence of LaTeX commands (without backslashes) that | def checkit(source, opts, morecmds=[]): """Check the LaTex formatting in a sequence of lines. Opts is a mapping of options to option values if any: -m munge parenthesis and brackets -f forward slash warnings to be skipped -d delimiters only checking -v verbose listing on delimiters ... | 55b90d0e44a443ac52b870ca5d4405d432ce54ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/55b90d0e44a443ac52b870ca5d4405d432ce54ee/texcheck.py |
print "Unmatched open delimiter '%s' on line %d", (symbol, lineno) | print "Unmatched open delimiter '%s' on line %d" % (symbol, lineno) | def checkit(source, opts, morecmds=[]): """Check the LaTex formatting in a sequence of lines. Opts is a mapping of options to option values if any: -m munge parenthesis and brackets -f forward slash warnings to be skipped -d delimiters only checking -v verbose listing on delimiters ... | 55b90d0e44a443ac52b870ca5d4405d432ce54ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/55b90d0e44a443ac52b870ca5d4405d432ce54ee/texcheck.py |
def open(self, url, new=0): | def open(self, url, new=0, autoraise=1): | def open(self, url, new=0): os.system(self.command % url) | d382d208fa8ad8b286a3ae5cc4e222216fdd3cfe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d382d208fa8ad8b286a3ae5cc4e222216fdd3cfe/webbrowser.py |
def open(self, url, new=1): | def open(self, url, new=1, autoraise=1): | def open(self, url, new=1): # XXX Currently I know no way to prevent KFM from opening a new win. self._remote("openURL %s" % url) | d382d208fa8ad8b286a3ae5cc4e222216fdd3cfe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d382d208fa8ad8b286a3ae5cc4e222216fdd3cfe/webbrowser.py |
def open(self, url, new=0): | def open(self, url, new=0, autoraise=1): | def open(self, url, new=0): if new: self._remote("LOADNEW " + url) else: self._remote("LOAD " + url) | d382d208fa8ad8b286a3ae5cc4e222216fdd3cfe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d382d208fa8ad8b286a3ae5cc4e222216fdd3cfe/webbrowser.py |
def open(self, url, new=0): | def open(self, url, new=0, autoraise=1): | def open(self, url, new=0): os.startfile(url) | d382d208fa8ad8b286a3ae5cc4e222216fdd3cfe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d382d208fa8ad8b286a3ae5cc4e222216fdd3cfe/webbrowser.py |
def open(self, url, new=0): | def open(self, url, new=0, autoraise=1): | def open(self, url, new=0): ic.launchurl(url) | d382d208fa8ad8b286a3ae5cc4e222216fdd3cfe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d382d208fa8ad8b286a3ae5cc4e222216fdd3cfe/webbrowser.py |
mo = AbstractBasicAuthHandler.rx.match(authreq) | mo = AbstractBasicAuthHandler.rx.search(authreq) | def http_error_auth_reqed(self, authreq, host, req, headers): # XXX could be multiple headers authreq = headers.get(authreq, None) if authreq: mo = AbstractBasicAuthHandler.rx.match(authreq) if mo: scheme, realm = mo.groups() if scheme.lower() == 'basic': return self.retry_http_basic_auth(host, req, realm) | 36b04f864a2efb2f02212c9e4f9e4111834619ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/36b04f864a2efb2f02212c9e4f9e4111834619ad/urllib2.py |
Form.form({key: value}) | Form.form(self, {key: value}) | def __setitem__(self, key, value): Form.form({key: value}) | 648433547532ba92666e9ff79202cc76954e1c68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/648433547532ba92666e9ff79202cc76954e1c68/Tix.py |
return self.tk.call(self.stylename, 'cget', '-%s'%key, value) | return self.tk.call(self.stylename, 'cget', '-%s'%key) | def __getitem__(self,key): return self.tk.call(self.stylename, 'cget', '-%s'%key, value) | 648433547532ba92666e9ff79202cc76954e1c68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/648433547532ba92666e9ff79202cc76954e1c68/Tix.py |
('a = 1,2,3', '((1, 2, 3))',), ('("a","b","c")', "(('a', 'b', 'c'))",), ('a,b,c = 1,2,3', '((1, 2, 3))',), | ('a = 1,2,3', '((1, 2, 3))'), ('("a","b","c")', "(('a', 'b', 'c'))"), ('a,b,c = 1,2,3', '((1, 2, 3))'), ('(None, 1, None)', '((None, 1, None))'), ('((1, 2), 3, 4)', '(((1, 2), 3, 4))'), | def test_folding_of_tuples_of_constants(self): for line, elem in ( ('a = 1,2,3', '((1, 2, 3))',), ('("a","b","c")', "(('a', 'b', 'c'))",), ('a,b,c = 1,2,3', '((1, 2, 3))',), ): asm = dis_single(line) self.assert_(elem in asm) self.assert_('BUILD_TUPLE' not in asm) | 9ee80a1538ab5578b4b8f3b450fc2ea4a6fa9add /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9ee80a1538ab5578b4b8f3b450fc2ea4a6fa9add/test_peepholer.py |
filename = os.path.join(dir, testfile) fp = open(filename, 'w') fp.write('blat') fp.close() os.unlink(filename) tempdir = dir break | filename = os.path.join(dir, testfile) if os.name == 'posix': try: fd = os.open(filename, os.O_RDWR|os.O_CREAT|os.O_EXCL, 0700) except OSError: pass else: fp = os.fdopen(fd, 'w') fp.write('blat') fp.close() os.unlink(filename) del fp, fd tempdir = dir break else: fp = open(filename, 'w') fp.write('blat') fp.close() os.... | def gettempdir(): """Function to calculate the directory to use.""" global tempdir if tempdir is not None: return tempdir try: pwd = os.getcwd() except (AttributeError, os.error): pwd = os.curdir attempdirs = ['/usr/tmp', '/tmp', pwd] if os.name == 'nt': attempdirs.insert(0, 'C:\\TEMP') attempdirs.insert(0, '\\TEMP') e... | fca1c6c6c841e31d796097842d050d6661670b2d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fca1c6c6c841e31d796097842d050d6661670b2d/tempfile.py |
if not callable(callback): callback = print_line | if callback is None: callback = print_line | def retrlines(self, cmd, callback = None): '''Retrieve data in line mode. The argument is a RETR or LIST command. The callback function (2nd argument) is called for each line, with trailing CRLF stripped. This creates a new port for you. print_line() is the default callback.''' if not callable(callback): callback = pr... | 91d380720a5893ef85153ac37656fec62a36aba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/91d380720a5893ef85153ac37656fec62a36aba7/ftplib.py |
verify(int(a) == 12345) | def __add__(self, other): return hexint(int.__add__(self, other)) | 2f8d4e50c3424a0ed8443faa379e65ebf1ba8981 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2f8d4e50c3424a0ed8443faa379e65ebf1ba8981/test_descr.py | |
verify(long(a) == 12345L) | def __add__(self, other): return self.__class__(super(octlong, self).__add__(other)) | 2f8d4e50c3424a0ed8443faa379e65ebf1ba8981 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2f8d4e50c3424a0ed8443faa379e65ebf1ba8981/test_descr.py | |
verify(float(a) == 12345.0) | def __repr__(self): return "%.*g" % (self.prec, self) | 2f8d4e50c3424a0ed8443faa379e65ebf1ba8981 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2f8d4e50c3424a0ed8443faa379e65ebf1ba8981/test_descr.py | |
verify(tuple(a).__class__ is tuple) | def rev(self): if self._rev is not None: return self._rev L = list(self) L.reverse() self._rev = self.__class__(L) return self._rev | 2f8d4e50c3424a0ed8443faa379e65ebf1ba8981 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2f8d4e50c3424a0ed8443faa379e65ebf1ba8981/test_descr.py | |
verify(str(s) == "12345") | def rev(self): if self._rev is not None: return self._rev L = list(self) L.reverse() self._rev = self.__class__("".join(L)) return self._rev | 2f8d4e50c3424a0ed8443faa379e65ebf1ba8981 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2f8d4e50c3424a0ed8443faa379e65ebf1ba8981/test_descr.py | |
verify(str(s) == "\x00" * 5) | def rev(self): if self._rev is not None: return self._rev L = list(self) L.reverse() self._rev = self.__class__("".join(L)) return self._rev | 2f8d4e50c3424a0ed8443faa379e65ebf1ba8981 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2f8d4e50c3424a0ed8443faa379e65ebf1ba8981/test_descr.py | |
if modargs: mf.import_hook(scriptfile) else: mf.load_file(scriptfile) | mf.load_file(scriptfile) | def main(): # overridable context prefix = None # settable with -p option exec_prefix = None # settable with -P option extensions = [] exclude = [] # settable with -x option addn_link = [] # settable with -l, but only honored under Windows. path = sys.p... | 3fc7386837d250c1041ecaceffa890c18e422283 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3fc7386837d250c1041ecaceffa890c18e422283/freeze.py |
if wid: | if KILLUNKNOWNWINDOWS and wid: | def do_updateEvt(self, event): (what, message, when, where, modifiers) = event wid = Win.WhichWindow(message) if wid and self._windows.has_key(wid): window = self._windows[wid] window.do_rawupdate(wid, event) else: if wid: wid.HideWindow() import sys sys.stderr.write("XXX killed unknown (crashed?) Python window.\n") el... | 3c8223171f480f081f5718acc3d6edf3b516752c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3c8223171f480f081f5718acc3d6edf3b516752c/Wapplication.py |
newurl = '//' + host + selector return self.open_http(newurl) | newurl = 'http://' + host + selector return self.open(newurl) | def retry_http_basic_auth(self, url, realm): host, selector = splithost(url) i = string.find(host, '@') + 1 host = host[i:] user, passwd = self.get_user_passwd(host, realm, i) if not (user or passwd): return None host = user + ':' + passwd + '@' + host newurl = '//' + host + selector return self.open_http(newurl) | b190a5208e2b5ee828006dd7ef715b631134fd46 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b190a5208e2b5ee828006dd7ef715b631134fd46/urllib.py |
parts = msg.split(" ", 2) | parts = msg.split(" ", 1) | def _decode_msg(self, msg): seqno = self.decode_seqno(msg[:self.SEQNO_ENC_LEN]) msg = msg[self.SEQNO_ENC_LEN:] parts = msg.split(" ", 2) if len(parts) == 1: cmd = msg arg = '' else: cmd = parts[0] arg = parts[1] return cmd, arg, seqno | 87a8ccca4b193d2165888a8dd1da20a01bd1b100 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/87a8ccca4b193d2165888a8dd1da20a01bd1b100/RemoteInterp.py |
if type(cmd) == type(''): cmd = ['/bin/sh', '-c', cmd] | _cleanup() | def __init__(self, cmd, capturestderr=0, bufsize=-1): """The parameter 'cmd' is the shell command to execute in a sub-process. The 'capturestderr' flag, if true, specifies that the object should capture standard error output of the child process. The default is false. If the 'bufsize' parameter is specified, it speci... | 1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1/popen2.py |
os.close(0) os.close(1) if os.dup(p2cread) <> 0: sys.stderr.write('popen2: bad read dup\n') if os.dup(c2pwrite) <> 1: sys.stderr.write('popen2: bad write dup\n') | os.dup2(p2cread, 0) os.dup2(c2pwrite, 1) | def __init__(self, cmd, capturestderr=0, bufsize=-1): """The parameter 'cmd' is the shell command to execute in a sub-process. The 'capturestderr' flag, if true, specifies that the object should capture standard error output of the child process. The default is false. If the 'bufsize' parameter is specified, it speci... | 1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1/popen2.py |
os.close(2) if os.dup(errin) <> 2: pass for i in range(3, MAXFD): try: os.close(i) except: pass try: os.execvp(cmd[0], cmd) finally: os._exit(1) os._exit(1) | os.dup2(errin, 2) self._run_child(cmd) | def __init__(self, cmd, capturestderr=0, bufsize=-1): """The parameter 'cmd' is the shell command to execute in a sub-process. The 'capturestderr' flag, if true, specifies that the object should capture standard error output of the child process. The default is false. If the 'bufsize' parameter is specified, it speci... | 1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1/popen2.py |
self.sts = -1 | def __init__(self, cmd, capturestderr=0, bufsize=-1): """The parameter 'cmd' is the shell command to execute in a sub-process. The 'capturestderr' flag, if true, specifies that the object should capture standard error output of the child process. The default is false. If the 'bufsize' parameter is specified, it speci... | 1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1/popen2.py | |
def popen2(cmd, mode='t', bufsize=-1): | del Popen3, Popen4, _active, _cleanup def popen2(cmd, bufsize=-1, mode='t'): | def popen2(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin) are returned.""" w, r = os.popen2(cmd, mode, bufsize) return r, w | 1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1/popen2.py |
else: def popen2(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin) are returned.""" if type(mode) is type(0) and bufsize == -1: bufsize = mode mode = 't' assert mode in ('t... | def popen2(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin) are returned.""" w, r = os.popen2(cmd, mode, bufsize) return r, w | 1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1/popen2.py | |
if sys.platform[:3] == "win": def popen3(cmd, mode='t', bufsize=-1): | def popen3(cmd, bufsize=-1, mode='t'): | def popen2(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin) are returned.""" if type(mode) is type(0) and bufsize == -1: bufsize = mode mode = 't' assert mode in ('t', 'b'... | 1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1/popen2.py |
else: def popen3(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin, child_stderr) are returned.""" if type(mode) is type(0) and bufsize == -1: bufsize = mode mode = 't' asse... | def popen3(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin, child_stderr) are returned.""" w, r, e = os.popen3(cmd, mode, bufsize) return r, w, e | 1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1/popen2.py | |
if sys.platform[:3] == "win": def popen4(cmd, mode='t', bufsize=-1): | def popen4(cmd, bufsize=-1, mode='t'): | def popen3(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin, child_stderr) are returned.""" if type(mode) is type(0) and bufsize == -1: bufsize = mode mode = 't' assert mod... | 1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1/popen2.py |
pass | def popen2(cmd, bufsize=-1, mode='t'): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin) are returned.""" inst = Popen3(cmd, 0, bufsize) return inst.fromchild, inst.tochild def popen3(cmd, bufsize=-1... | def popen4(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout_stderr, child_stdin) are returned.""" w, r = os.popen4(cmd, mode, bufsize) return r, w | 1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1/popen2.py |
dir = f[0] | dir = convert_path(f[0]) | def run (self): self.mkpath(self.install_dir) for f in self.data_files: if type(f) == StringType: # it's a simple file, so copy it if self.warn_dir: self.warn("setup script did not provide a directory for " "'%s' -- installing right in '%s'" % (f, self.install_dir)) (out, _) = self.copy_file(f, self.install_dir) self.o... | 2b139545cd18112179ad2a6eabba24585cf22b44 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2b139545cd18112179ad2a6eabba24585cf22b44/install_data.py |
if _os.name != 'posix': | if _os.name != 'posix' or _os.sys.platform == 'cygwin': | def NamedTemporaryFile(mode='w+b', bufsize=-1, suffix="", prefix=template, dir=gettempdir()): """Create and return a temporary file. Arguments: 'prefix', 'suffix', 'dir' -- as for mkstemp. 'mode' -- the mode argument to os.fdopen (default "w+b"). 'bufsize' -- the buffer size argument to os.fdopen (default -1). The file... | 5bde1d360e98f2c77a038c7a309c80c56f739c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5bde1d360e98f2c77a038c7a309c80c56f739c0a/tempfile.py |
login = account = password = None | login = '' account = password = None | # Look for a machine, default, or macdef top-level keyword | 4df0a28c234a582f1a6f22e95e1efd195ea4fdec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4df0a28c234a582f1a6f22e95e1efd195ea4fdec/netrc.py |
if login and password: | if password: | # Look for a machine, default, or macdef top-level keyword | 4df0a28c234a582f1a6f22e95e1efd195ea4fdec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4df0a28c234a582f1a6f22e95e1efd195ea4fdec/netrc.py |
self.add_library ( "python" + sys.version[0] + sys.version[2] ) | def __init__ (self, verbose=0, dry_run=0, force=0): | c9db91300cada056e565e829810030a89aaff9b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c9db91300cada056e565e829810030a89aaff9b4/msvccompiler.py | |
cc_args = self.compile_options + \ | cc_args = compile_options + \ | def compile (self, sources, output_dir=None, macros=None, include_dirs=None, debug=0, extra_preargs=None, extra_postargs=None): | c9db91300cada056e565e829810030a89aaff9b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c9db91300cada056e565e829810030a89aaff9b4/msvccompiler.py |
if debug: pass | def compile (self, sources, output_dir=None, macros=None, include_dirs=None, debug=0, extra_preargs=None, extra_postargs=None): | c9db91300cada056e565e829810030a89aaff9b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c9db91300cada056e565e829810030a89aaff9b4/msvccompiler.py | |
self.shared_library_name(output_libname)) | self.shared_library_name(output_libname), output_dir=output_dir, libraries=libraries, library_dirs=library_dirs, debug=debug, extra_preargs=extra_preargs, extra_postargs=extra_postargs) | def link_shared_lib (self, objects, output_libname, output_dir=None, libraries=None, library_dirs=None, debug=0, extra_preargs=None, extra_postargs=None): | c9db91300cada056e565e829810030a89aaff9b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c9db91300cada056e565e829810030a89aaff9b4/msvccompiler.py |
ld_args = self.ldflags_shared + lib_opts + \ | if debug: ldflags = self.ldflags_shared_debug basename, ext = os.path.splitext (output_filename) output_filename = basename + '_d' + ext else: ldflags = self.ldflags_shared ld_args = ldflags + lib_opts + \ | def link_shared_object (self, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, extra_preargs=None, extra_postargs=None): """Link a bunch of stuff together to create a shared object file. Much like 'link_shared_lib()', except the output filename is explicitly supplied as 'output_filename'."... | c9db91300cada056e565e829810030a89aaff9b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c9db91300cada056e565e829810030a89aaff9b4/msvccompiler.py |
if debug: pass | def link_shared_object (self, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, extra_preargs=None, extra_postargs=None): """Link a bunch of stuff together to create a shared object file. Much like 'link_shared_lib()', except the output filename is explicitly supplied as 'output_filename'."... | c9db91300cada056e565e829810030a89aaff9b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c9db91300cada056e565e829810030a89aaff9b4/msvccompiler.py | |
self.todo[url].append(origin) | if origin not in self.todo[url]: self.todo[url].append(origin) | def newtodolink(self, url, origin): if self.todo.has_key(url): self.todo[url].append(origin) self.note(3, " Seen todo link %s", url) else: self.todo[url] = [origin] self.note(3, " New todo link %s", url) | 7b3839a3326f2197f0eac34f33effd5244765ee0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7b3839a3326f2197f0eac34f33effd5244765ee0/webchecker.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.