rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
genpluginproject("ppc", "_Icn", libraries=["IconServicesLib"], outputdir="::Lib:Carbon") | genpluginproject("ppc", "_Icn", libraries=["IconServicesLib"], libraryflags="Debug, WeakImport", outputdir="::Lib:Carbon") | def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files.... | 150f9fc415d529faf327290ae61f0a86035b25ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/150f9fc415d529faf327290ae61f0a86035b25ed/genpluginprojects.py |
genpluginproject("all", "_Qd", outputdir="::Lib:Carbon") genpluginproject("ppc", "_Qt", libraries=["QuickTimeLib"], outputdir="::Lib:Carbon") genpluginproject("carbon", "_Qt", outputdir="::Lib:Carbon") genpluginproject("all", "_Qdoffs", outputdir="::Lib:Carbon") | genpluginproject("all", "_Qd", stdlibraryflags="Debug, WeakImport", outputdir="::Lib:Carbon") genpluginproject("ppc", "_Qt", libraries=["QuickTimeLib"], libraryflags="Debug, WeakImport", outputdir="::Lib:Carbon") genpluginproject("carbon", "_Qt", libraryflags="Debug, WeakImport", outputdir="::Lib:Carbon") genpluginp... | def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files.... | 150f9fc415d529faf327290ae61f0a86035b25ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/150f9fc415d529faf327290ae61f0a86035b25ed/genpluginprojects.py |
genpluginproject("ppc", "_TE", libraries=["CarbonAccessors.o", "DragLib"], outputdir="::Lib:Carbon") | genpluginproject("ppc", "_TE", libraries=["CarbonAccessors.o", "DragLib"], stdlibraryflags="Debug, WeakImport", libraryflags="Debug, WeakImport", outputdir="::Lib:Carbon") | def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files.... | 150f9fc415d529faf327290ae61f0a86035b25ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/150f9fc415d529faf327290ae61f0a86035b25ed/genpluginprojects.py |
genpluginproject("ppc", "_Mlte", libraries=["Textension"], outputdir="::Lib:Carbon") | genpluginproject("ppc", "_Mlte", libraries=["Textension"], libraryflags="Debug, WeakImport", outputdir="::Lib:Carbon") | def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files.... | 150f9fc415d529faf327290ae61f0a86035b25ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/150f9fc415d529faf327290ae61f0a86035b25ed/genpluginprojects.py |
os.kill(pid, signal.SIGALARM) | os.kill(pid, signal.SIGALRM) print >> sys.__stdout__, " child sent SIGALRM to", pid | def force_test_exit(): # Sigh, both imports seem necessary to avoid errors. import os fork_pid = os.fork() if fork_pid == 0: # In child import os, time try: # Wait 5 seconds longer than the expected alarm to give enough # time for the normal sequence of events to occur. This is # just a stop-gap to prevent the test fr... | da1455c5cc512a58a35962cf8fbb875963e6c2a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/da1455c5cc512a58a35962cf8fbb875963e6c2a3/test_signal.py |
return data[:-3] + '\n' | return data.replace('\r\r\n', '\n') | def normalize_output(data): # Some operating systems do conversions on newline. We could possibly # fix that by doing the appropriate termios.tcsetattr()s. I couldn't # figure out the right combo on Tru64 and I don't have an IRIX box. # So just normalize the output and doc the problem O/Ses by allowing # certain comb... | 3ea84218d1aa617c33b8fa65c3255df0dac77f9c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3ea84218d1aa617c33b8fa65c3255df0dac77f9c/test_pty.py |
return data[:-2] + '\n' | return data.replace('\r\n', '\n') | def normalize_output(data): # Some operating systems do conversions on newline. We could possibly # fix that by doing the appropriate termios.tcsetattr()s. I couldn't # figure out the right combo on Tru64 and I don't have an IRIX box. # So just normalize the output and doc the problem O/Ses by allowing # certain comb... | 3ea84218d1aa617c33b8fa65c3255df0dac77f9c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3ea84218d1aa617c33b8fa65c3255df0dac77f9c/test_pty.py |
def synopsis(filename, cache={}): """Get the one-line summary out of a module file.""" mtime = os.stat(filename)[stat.ST_MTIME] lastupdate, result = cache.get(filename, (0, None)) # XXX what if ext is 'rb' type in imp_getsuffixes? if lastupdate < mtime: file = open(filename) line = file.readline() while line[:1] == '#'... | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py | ||
line = file.readline() while line[:1] == ' | if info and 'b' in info[2]: try: module = imp.load_module(info[0], file, filename, info[1:]) except: return None result = split(module.__doc__ or '', '\n')[0] else: | def synopsis(filename, cache={}): """Get the one-line summary out of a module file.""" mtime = os.stat(filename)[stat.ST_MTIME] lastupdate, result = cache.get(filename, (0, None)) # XXX what if ext is 'rb' type in imp_getsuffixes? if lastupdate < mtime: file = open(filename) line = file.readline() while line[:1] == '#'... | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
if not line: break if line[-2:] == '\\\n': line = line[:-2] + file.readline() line = strip(line) if line[:3] == '"""': line = line[3:] while strip(line) == '': | while line[:1] == ' | def synopsis(filename, cache={}): """Get the one-line summary out of a module file.""" mtime = os.stat(filename)[stat.ST_MTIME] lastupdate, result = cache.get(filename, (0, None)) # XXX what if ext is 'rb' type in imp_getsuffixes? if lastupdate < mtime: file = open(filename) line = file.readline() while line[:1] == '#'... | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
result = strip(split(line, '"""')[0]) else: result = None | line = strip(line) if line[:4] == 'r"""': line = line[1:] if line[:3] == '"""': line = line[3:] if line[-1:] == '\\': line = line[:-1] while not strip(line): line = file.readline() if not line: break result = strip(split(line, '"""')[0]) else: result = None | def synopsis(filename, cache={}): """Get the one-line summary out of a module file.""" mtime = os.stat(filename)[stat.ST_MTIME] lastupdate, result = cache.get(filename, (0, None)) # XXX what if ext is 'rb' type in imp_getsuffixes? if lastupdate < mtime: file = open(filename) line = file.readline() while line[:1] == '#'... | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
def stripid(text): """Remove the hexadecimal id from a Python object representation.""" # The behaviour of %p is implementation-dependent, so we need an example. for pattern in [' at 0x[0-9a-f]{6,}>$', ' at [0-9A-F]{8,}>$']: if re.search(pattern, repr(Exception)): return re.sub(pattern, '>', text) return text | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py | ||
def modulename(path): """Return the Python module name for a given path, or None.""" filename = os.path.basename(path) suffixes = map(lambda (suffix, mode, kind): (len(suffix), suffix), imp.get_suffixes()) suffixes.sort() suffixes.reverse() for length, suffix in suffixes: if len(filename) > length and filename[-length... | def stripid(text): """Remove the hexadecimal id from a Python object representation.""" # The behaviour of %p is implementation-dependent, so we need an example. for pattern in [' at 0x[0-9a-f]{6,}>$', ' at [0-9A-F]{8,}>$']: if re.search(pattern, repr(Exception)): return re.sub(pattern, '>', text) return text | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py | |
return re.sub(r'((\\[\\abfnrtv\'"]|\\x..|\\u....)+)', | return re.sub(r'((\\[\\abfnrtv\'"]|\\[0-9]..|\\x..|\\u....)+)', | def repr_string(self, x, level): test = cram(x, self.maxstring) testrepr = repr(test) if '\\' in test and '\\' not in replace(testrepr, (r'\\', '')): # Backslashes are only literal in the string and are never # needed to make any special characters, so show a raw string. return 'r' + testrepr[0] + self.escape(test) + t... | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
def section(self, title, fgcol, bgcol, contents, width=20, | def section(self, title, fgcol, bgcol, contents, width=10, | def section(self, title, fgcol, bgcol, contents, width=20, prelude='', marginalia=None, gap=' '): """Format a section with a heading.""" if marginalia is None: marginalia = ' ' * width result = ''' | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
marginalia = ' ' * width | marginalia = '<tt>' + ' ' * width + '</tt>' | def section(self, title, fgcol, bgcol, contents, width=20, prelude='', marginalia=None, gap=' '): """Format a section with a heading.""" if marginalia is None: marginalia = ' ' * width result = ''' | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
return result + '<td width="100%%">%s</td></tr></table>' % contents | return result + '\n<td width="100%%">%s</td></tr></table>' % contents | def section(self, title, fgcol, bgcol, contents, width=20, prelude='', marginalia=None, gap=' '): """Format a section with a heading.""" if marginalia is None: marginalia = ' ' * width result = ''' | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
if 0 and hasattr(object, '__all__'): visible = lambda key, all=object.__all__: key in all else: visible = lambda key: key[:1] != '_' | def docmodule(self, object, name=None): """Produce HTML documentation for a module object.""" name = object.__name__ # ignore the passed-in name parts = split(name, '.') links = [] for i in range(len(parts)-1): links.append( '<a href="%s.html"><font color="#ffffff">%s</font></a>' % (join(parts[:i+1], '.'), parts[i])) l... | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py | |
if visible(key) and ( inspect.getmodule(value) or object) is object: | if (inspect.getmodule(value) or object) is object: | def docmodule(self, object, name=None): """Produce HTML documentation for a module object.""" name = object.__name__ # ignore the passed-in name parts = split(name, '.') links = [] for i in range(len(parts)-1): links.append( '<a href="%s.html"><font color="#ffffff">%s</font></a>' % (join(parts[:i+1], '.'), parts[i])) l... | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
if visible(key) and (inspect.isbuiltin(value) or inspect.getmodule(value) is object): | if inspect.isbuiltin(value) or inspect.getmodule(value) is object: | def docmodule(self, object, name=None): """Produce HTML documentation for a module object.""" name = object.__name__ # ignore the passed-in name parts = split(name, '.') links = [] for i in range(len(parts)-1): links.append( '<a href="%s.html"><font color="#ffffff">%s</font></a>' % (join(parts[:i+1], '.'), parts[i])) l... | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
if visible(key): constants.append((key, value)) | constants.append((key, value)) | def docmodule(self, object, name=None): """Produce HTML documentation for a module object.""" name = object.__name__ # ignore the passed-in name parts = split(name, '.') links = [] for i in range(len(parts)-1): links.append( '<a href="%s.html"><font color="#ffffff">%s</font></a>' % (join(parts[:i+1], '.'), parts[i])) l... | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
if file[:1] != '_': path = os.path.join(object.__path__[0], file) modname = modulename(file) if modname and modname not in modnames: modpkgs.append((modname, name, 0, 0)) modnames.append(modname) elif ispackage(path): modpkgs.append((file, name, 1, 0)) | path = os.path.join(object.__path__[0], file) modname = inspect.getmodulename(file) if modname and modname not in modnames: modpkgs.append((modname, name, 0, 0)) modnames.append(modname) elif ispackage(path): modpkgs.append((file, name, 1, 0)) | def docmodule(self, object, name=None): """Produce HTML documentation for a module object.""" name = object.__name__ # ignore the passed-in name parts = split(name, '.') links = [] for i in range(len(parts)-1): links.append( '<a href="%s.html"><font color="#ffffff">%s</font></a>' % (join(parts[:i+1], '.'), parts[i])) l... | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
doc = self.small(doc and '<tt>%s<br> </tt>' % doc or '<tt> </tt>') return self.section(title, ' | doc = self.small(doc and '<tt>%s<br> </tt>' % doc or self.small(' ')) return self.section(title, ' | def docclass(self, object, name=None, funcs={}, classes={}): """Produce HTML documentation for a class object.""" realname = object.__name__ name = name or realname bases = object.__bases__ contents = '' | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
doc = doc and '<tt>%s</tt>' % doc return '<dl><dt>%s<dd>%s</dl>\n' % (decl, self.small(doc)) | doc = doc and '<dd>' + self.small('<tt>%s</tt>' % doc) return '<dl><dt>%s%s</dl>\n' % (decl, doc) | def docroutine(self, object, name=None, funcs={}, classes={}, methods={}, cl=None): """Produce HTML documentation for a function or method object.""" realname = object.__name__ name = name or realname anchor = (cl and cl.__name__ or '') + '-' + name note = '' skipdocs = 0 if inspect.ismethod(object): if cl: if object.i... | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
if file[:1] != '_' and os.path.isfile(path): modname = modulename(file) | if os.path.isfile(path): modname = inspect.getmodulename(file) | def found(name, ispackage, modpkgs=modpkgs, shadowed=shadowed, seen=seen): if not seen.has_key(name): modpkgs.append((name, '', ispackage, shadowed.has_key(name))) seen[name] = 1 shadowed[name] = 1 | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
namesec = name lines = split(strip(getdoc(object)), '\n') if len(lines) == 1: if lines[0]: namesec = namesec + ' - ' + lines[0] lines = [] elif len(lines) >= 2 and not rstrip(lines[1]): if lines[0]: namesec = namesec + ' - ' + lines[0] lines = lines[2:] result = self.section('NAME', namesec) | synop, desc = splitdoc(getdoc(object)) result = self.section('NAME', name + (synop and ' - ' + synop)) | def docmodule(self, object, name=None): """Produce text documentation for a given module object.""" name = object.__name__ # ignore the passed-in name namesec = name lines = split(strip(getdoc(object)), '\n') if len(lines) == 1: if lines[0]: namesec = namesec + ' - ' + lines[0] lines = [] elif len(lines) >= 2 and not r... | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
if lines: result = result + self.section('DESCRIPTION', join(lines, '\n')) | if desc: result = result + self.section('DESCRIPTION', desc) | def docmodule(self, object, name=None): """Produce text documentation for a given module object.""" name = object.__name__ # ignore the passed-in name namesec = name lines = split(strip(getdoc(object)), '\n') if len(lines) == 1: if lines[0]: namesec = namesec + ' - ' + lines[0] lines = [] elif len(lines) >= 2 and not r... | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
if key[:1] != '_': constants.append((key, value)) | constants.append((key, value)) | def docmodule(self, object, name=None): """Produce text documentation for a given module object.""" name = object.__name__ # ignore the passed-in name namesec = name lines = split(strip(getdoc(object)), '\n') if len(lines) == 1: if lines[0]: namesec = namesec + ' - ' + lines[0] lines = [] elif len(lines) >= 2 and not r... | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
if file[:1] != '_': path = os.path.join(object.__path__[0], file) modname = modulename(file) if modname and modname not in modpkgs: modpkgs.append(modname) elif ispackage(path): modpkgs.append(file + ' (package)') | path = os.path.join(object.__path__[0], file) modname = inspect.getmodulename(file) if modname and modname not in modpkgs: modpkgs.append(modname) elif ispackage(path): modpkgs.append(file + ' (package)') | def docmodule(self, object, name=None): """Produce text documentation for a given module object.""" name = object.__name__ # ignore the passed-in name namesec = name lines = split(strip(getdoc(object)), '\n') if len(lines) == 1: if lines[0]: namesec = namesec + ' - ' + lines[0] lines = [] elif len(lines) >= 2 and not r... | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
return lambda a: pipepager(a, os.environ['PAGER']) | if sys.platform == 'win32': return lambda a: tempfilepager(a, os.environ['PAGER']) else: return lambda a: pipepager(a, os.environ['PAGER']) | def getpager(): """Decide what method to use for paging through text.""" if type(sys.stdout) is not types.FileType: return plainpager if not sys.stdin.isatty() or not sys.stdout.isatty(): return plainpager if os.environ.has_key('PAGER'): return lambda a: pipepager(a, os.environ['PAGER']) if sys.platform == 'win32': ret... | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
raise DocImportError(filename, sys.exc_info()) | raise ErrorDuringImport(filename, sys.exc_info()) | def locate(path): """Locate an object by name (or dotted path), importing as necessary.""" if not path: # special case: imp.find_module('') strangely succeeds return None if type(path) is not types.StringType: return path parts = split(path, '.') n = len(parts) while n > 0: path = join(parts[:n], '.') try: module = fre... | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
page = html.page('Python: ' + describe(object), | page = html.page(describe(object), | def writedoc(key): """Write HTML documentation to a file in the current directory.""" try: object = locate(key) except ErrorDuringImport, value: print value else: if object: page = html.page('Python: ' + describe(object), html.document(object, object.__name__)) file = open(key + '.html', 'w') file.write(page) file.clos... | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
modname = modulename(path) | modname = inspect.getmodulename(path) | def writedocs(dir, pkgpath='', done={}): """Write out HTML documentation for all modules in a directory tree.""" for file in os.listdir(dir): path = os.path.join(dir, file) if ispackage(path): writedocs(path, pkgpath + file + '.') elif os.path.isfile(path): modname = modulename(path) if modname: modname = pkgpath + mod... | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
modname = modulename(path) | modname = inspect.getmodulename(path) | def run(self, key, callback, completer=None): self.quit = 0 seen = {} | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
print modname, '-', desc or '(no description)' | print modname, desc and '- ' + desc try: import warnings except ImportError: pass else: warnings.filterwarnings('ignore') | def callback(path, modname, desc): if modname[-9:] == '.__init__': modname = modname[:-9] + ' (package)' print modname, '-', desc or '(no description)' | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
try: import ic ic.launchurl(url) | try: import ic | def open(self, event=None, url=None): url = url or self.server.url try: import webbrowser webbrowser.open(url) except ImportError: # pre-webbrowser.py compatibility if sys.platform == 'win32': os.system('start "%s"' % url) elif sys.platform == 'mac': try: import ic ic.launchurl(url) except ImportError: pass else: rc = ... | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
Pop up a graphical interface for serving and finding documentation. | Pop up a graphical interface for finding and serving documentation. | def ready(server): print 'server ready at %s' % server.url | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
directory. If <name> contains a '%s', it is treated as a filename. | directory. If <name> contains a '%s', it is treated as a filename; if it names a directory, documentation is written for all the contents. | def ready(server): print 'server ready at %s' % server.url | af4215be4e43ddf4f8775f622d9db3233f712894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af4215be4e43ddf4f8775f622d9db3233f712894/pydoc.py |
self.saved_clear() self.hrefstack.append(href) def anchor_end(self): if self.proc: title = cgi.escape(self.saved_get(), True) path = self.path + '/' + self.hrefstack.pop() | def anchor_bgn(self, href, name, type): if self.proc: self.saved_clear() self.hrefstack.append(href) | 7d574e3a453e66a884e6bac844a159c9fca0df26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7d574e3a453e66a884e6bac844a159c9fca0df26/prechm.py | |
def anchor_end(self): if self.proc: title = cgi.escape(self.saved_get(), True) path = self.path + '/' + self.hrefstack.pop() # XXX See SF bug <http://www.python.org/sf/546579>. # XXX index.html for the 2.2 language reference manual contains # XXX nested <a></a> tags in the entry for the section on blank # XXX lines. W... | 7d574e3a453e66a884e6bac844a159c9fca0df26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7d574e3a453e66a884e6bac844a159c9fca0df26/prechm.py | ||
self.checkequal(('http://www.python.org', '', ''), S, 'rpartition', '?') | self.checkequal(('', '', 'http://www.python.org'), S, 'rpartition', '?') | def test_rpartition(self): | 5ef499c037d6aae25158d7222955353c982e7717 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5ef499c037d6aae25158d7222955353c982e7717/string_tests.py |
test_classes = (TestBasicOps, TestVariousIteratorArgs, TestGC) | test_classes = (TestBasicOps, TestVariousIteratorArgs, TestGC, RegressionTests) | def test_main(verbose=None): test_classes = (TestBasicOps, TestVariousIteratorArgs, TestGC) test_support.run_unittest(*test_classes) # verify reference counting if verbose and hasattr(sys, "gettotalrefcount"): import gc counts = [None] * 5 for i in xrange(len(counts)): test_support.run_unittest(*test_classes) gc.colle... | d9f808f3d66789fefbfa99ee0020c8cdcd28a6fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d9f808f3d66789fefbfa99ee0020c8cdcd28a6fb/test_itertools.py |
self.bytecompile(outfiles) | if outfiles is not None: self.bytecompile(outfiles) | def run (self): | 652511cab75ca48fcd1299198ba2fdf3d7ed0536 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/652511cab75ca48fcd1299198ba2fdf3d7ed0536/install_lib.py |
del Popen3, Popen4, _active, _cleanup | del Popen3, Popen4 | def __init__(self, cmd, bufsize=-1): _cleanup() p2cread, p2cwrite = os.pipe() c2pread, c2pwrite = os.pipe() self.pid = os.fork() if self.pid == 0: # Child os.dup2(p2cread, 0) os.dup2(c2pwrite, 1) os.dup2(c2pwrite, 2) self._run_child(cmd) os.close(p2cread) self.tochild = os.fdopen(p2cwrite, 'w', bufsize) os.close(c2pwri... | d6e049ff1a17b7dc5e9c7ed8c13baea3f977d224 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d6e049ff1a17b7dc5e9c7ed8c13baea3f977d224/popen2.py |
dir = os.path.join(*paths) return os.path.normcase(os.path.abspath(dir)) L = sys.modules.values() for m in L: | dir = os.path.abspath(os.path.join(*paths)) return dir, os.path.normcase(dir) for m in sys.modules.values(): | def makepath(*paths): dir = os.path.join(*paths) return os.path.normcase(os.path.abspath(dir)) | 8611ea685d3b98759c521191bcdd35fa431bb9ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8611ea685d3b98759c521191bcdd35fa431bb9ca/site.py |
m.__file__ = makepath(m.__file__) del m, L | m.__file__ = os.path.abspath(m.__file__) del m | def makepath(*paths): dir = os.path.join(*paths) return os.path.normcase(os.path.abspath(dir)) | 8611ea685d3b98759c521191bcdd35fa431bb9ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8611ea685d3b98759c521191bcdd35fa431bb9ca/site.py |
dir = makepath(dir) if dir not in L: | dir, dircase = makepath(dir) if not dirs_in_sys_path.has_key(dircase): | def makepath(*paths): dir = os.path.join(*paths) return os.path.normcase(os.path.abspath(dir)) | 8611ea685d3b98759c521191bcdd35fa431bb9ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8611ea685d3b98759c521191bcdd35fa431bb9ca/site.py |
sitedir = makepath(sitedir) if sitedir not in sys.path: | sitedir, sitedircase = makepath(sitedir) if not dirs_in_sys_path.has_key(sitedircase): | def addsitedir(sitedir): sitedir = makepath(sitedir) if sitedir not in sys.path: sys.path.append(sitedir) # Add path component try: names = os.listdir(sitedir) except os.error: return names = map(os.path.normcase, names) names.sort() for name in names: if name[-4:] == endsep + "pth": addpackage(sitedir, name) | 8611ea685d3b98759c521191bcdd35fa431bb9ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8611ea685d3b98759c521191bcdd35fa431bb9ca/site.py |
names = map(os.path.normcase, names) | def addsitedir(sitedir): sitedir = makepath(sitedir) if sitedir not in sys.path: sys.path.append(sitedir) # Add path component try: names = os.listdir(sitedir) except os.error: return names = map(os.path.normcase, names) names.sort() for name in names: if name[-4:] == endsep + "pth": addpackage(sitedir, name) | 8611ea685d3b98759c521191bcdd35fa431bb9ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8611ea685d3b98759c521191bcdd35fa431bb9ca/site.py | |
dir = makepath(sitedir, dir) if dir not in sys.path and os.path.exists(dir): | dir, dircase = makepath(sitedir, dir) if not dirs_in_sys_path.has_key(dircase) and os.path.exists(dir): | def addpackage(sitedir, name): fullname = os.path.join(sitedir, name) try: f = open(fullname) except IOError: return while 1: dir = f.readline() if not dir: break if dir[0] == '#': continue if dir.startswith("import"): exec dir continue if dir[-1] == '\n': dir = dir[:-1] dir = makepath(sitedir, dir) if dir not in sys.p... | 8611ea685d3b98759c521191bcdd35fa431bb9ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8611ea685d3b98759c521191bcdd35fa431bb9ca/site.py |
sitedirs = [makepath(prefix, "lib", "python" + sys.version[:3], "site-packages"), makepath(prefix, "lib", "site-python")] | sitedirs = [os.path.join(prefix, "lib", "python" + sys.version[:3], "site-packages"), os.path.join(prefix, "lib", "site-python")] | def addpackage(sitedir, name): fullname = os.path.join(sitedir, name) try: f = open(fullname) except IOError: return while 1: dir = f.readline() if not dir: break if dir[0] == '#': continue if dir.startswith("import"): exec dir continue if dir[-1] == '\n': dir = dir[:-1] dir = makepath(sitedir, dir) if dir not in sys.p... | 8611ea685d3b98759c521191bcdd35fa431bb9ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8611ea685d3b98759c521191bcdd35fa431bb9ca/site.py |
sitedirs = [makepath(prefix, "lib", "site-packages")] | sitedirs = [os.path.join(prefix, "lib", "site-packages")] | def addpackage(sitedir, name): fullname = os.path.join(sitedir, name) try: f = open(fullname) except IOError: return while 1: dir = f.readline() if not dir: break if dir[0] == '#': continue if dir.startswith("import"): exec dir continue if dir[-1] == '\n': dir = dir[:-1] dir = makepath(sitedir, dir) if dir not in sys.p... | 8611ea685d3b98759c521191bcdd35fa431bb9ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8611ea685d3b98759c521191bcdd35fa431bb9ca/site.py |
testf.write(data) | if DEBUG: testf.write(data) | def write(self, data): | 0fc14771c0c0be4db25ab4f7abd742618289c23f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0fc14771c0c0be4db25ab4f7abd742618289c23f/binhex.py |
fss, ok = macfs.StandardGetFile() | fss, ok = macfs.PromptGetFile('File to convert:') | def _test(): if os.name == 'mac': fss, ok = macfs.StandardGetFile() if not ok: sys.exit(0) fname = fss.as_pathname() else: fname = sys.argv[1] #binhex(fname, fname+'.hqx') #hexbin(fname+'.hqx', fname+'.viahqx') hexbin(fname, fname+'.unpacked') sys.exit(1) | 0fc14771c0c0be4db25ab4f7abd742618289c23f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0fc14771c0c0be4db25ab4f7abd742618289c23f/binhex.py |
rc = os.system("%s %s" % (self.name, url)) | rc = os.system(cmd) | def _remote(self, url, action, autoraise): autoraise = int(bool(autoraise)) # always 0/1 raise_opt = self.raise_opts and self.raise_opts[autoraise] or '' cmd = "%s %s %s '%s' >/dev/null 2>&1" % (self.name, raise_opt, self.remote_cmd, action) if self.remote_background: cmd += ' &' rc = os.system(cmd) if rc: # bad return... | cfb444dff0197da83f7e7bab75b57f2c7044c0be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cfb444dff0197da83f7e7bab75b57f2c7044c0be/webbrowser.py |
rc = os.system(self.name + " -d '%s'" % url) | rc = os.system(self.name + " -d '%s' &" % url) | def _remote(self, url, action): # kfmclient is the new KDE way of opening URLs. cmd = "kfmclient %s >/dev/null 2>&1" % action rc = os.system(cmd) # Fall back to other variants. if rc: if _iscommand("konqueror"): rc = os.system(self.name + " --silent '%s' &" % url) elif _iscommand("kfm"): rc = os.system(self.name + " -d... | cfb444dff0197da83f7e7bab75b57f2c7044c0be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cfb444dff0197da83f7e7bab75b57f2c7044c0be/webbrowser.py |
script = _safequote('open location "%s"', url) | script = 'open location "%s"' % url.replace('"', '%22') | def open(self, url, new=0, autoraise=1): assert "'" not in url # new must be 0 or 1 new = int(bool(new)) if self.name == "default": # User called open, open_new or get without a browser parameter script = _safequote('open location "%s"', url) # opens in default browser else: # User called get and chose a browser if sel... | cfb444dff0197da83f7e7bab75b57f2c7044c0be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cfb444dff0197da83f7e7bab75b57f2c7044c0be/webbrowser.py |
cmd = _safequote('OpenURL "%s"', url) | cmd = 'OpenURL "%s"' % url.replace('"', '%22') | def open(self, url, new=0, autoraise=1): assert "'" not in url # new must be 0 or 1 new = int(bool(new)) if self.name == "default": # User called open, open_new or get without a browser parameter script = _safequote('open location "%s"', url) # opens in default browser else: # User called get and chose a browser if sel... | cfb444dff0197da83f7e7bab75b57f2c7044c0be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cfb444dff0197da83f7e7bab75b57f2c7044c0be/webbrowser.py |
if r.status in (200, 206): resp = addinfourl(r.fp, r.msg, req.get_full_url()) resp.code = r.status resp.msg = r.reason return resp else: return self.parent.error("http", req, r.fp, r.status, r.msg, r.msg.dict) | resp = addinfourl(r.fp, r.msg, req.get_full_url()) resp.code = r.status resp.msg = r.reason return resp | def do_open(self, http_class, req): """Return an addinfourl object for the request, using http_class. | 297e9c02959d08188d4a797a8f0314e0ea5e94a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/297e9c02959d08188d4a797a8f0314e0ea5e94a8/urllib2.py |
self.__messages.setdefault(msg, []).append(entry) | self.__messages.setdefault(msg, {})[entry] = 1 | def __addentry(self, msg, lineno=None): if lineno is None: lineno = self.__lineno if not msg in self.__options.toexclude: entry = (self.__curfile, lineno) self.__messages.setdefault(msg, []).append(entry) | a9d8d69b67996254705aac34cd306812abf1c8c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a9d8d69b67996254705aac34cd306812abf1c8c6/pygettext.py |
sys.stderr.write(_("Can't read --exclude-file: %s") % options.excludefilename) | print >> sys.stderr, _( "Can't read --exclude-file: %s") % options.excludefilename | def main(): global default_keywords try: opts, args = getopt.getopt( sys.argv[1:], 'ad:DEhk:Kno:p:S:Vvw:x:', ['extract-all', 'default-domain', 'escape', 'help', 'keyword=', 'no-default-keywords', 'add-location', 'no-location', 'output=', 'output-dir=', 'style=', 'verbose', 'version', 'width=', 'exclude-file=', 'docstri... | a9d8d69b67996254705aac34cd306812abf1c8c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a9d8d69b67996254705aac34cd306812abf1c8c6/pygettext.py |
sys.stderr.write('%s: %s, line %d, column %d\n' % (e[0], filename, e[1][0], e[1][1])) | print >> sys.stderr, '%s: %s, line %d, column %d' % ( e[0], filename, e[1][0], e[1][1]) | def main(): global default_keywords try: opts, args = getopt.getopt( sys.argv[1:], 'ad:DEhk:Kno:p:S:Vvw:x:', ['extract-all', 'default-domain', 'escape', 'help', 'keyword=', 'no-default-keywords', 'add-location', 'no-location', 'output=', 'output-dir=', 'style=', 'verbose', 'version', 'width=', 'exclude-file=', 'docstri... | a9d8d69b67996254705aac34cd306812abf1c8c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a9d8d69b67996254705aac34cd306812abf1c8c6/pygettext.py |
def _(s): return s | try: import fintl _ = fintl.gettext except ImportError: def _(s): return s | def _(s): return s | b748a44903fd0395aa03a8c8e6f42748f50d37f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b748a44903fd0395aa03a8c8e6f42748f50d37f5/pygettext.py |
for i in range(256): if i < 32 or i > 127: escapes.append("\\%03o" % i) else: escapes.append(chr(i)) escapes[ord('\\')] = '\\\\' escapes[ord('\t')] = '\\t' escapes[ord('\r')] = '\\r' escapes[ord('\n')] = '\\n' escapes[ord('\"')] = '\\"' | def make_escapes(pass_iso8859): global escapes for i in range(256): if pass_iso8859: i = i % 128 if 32 <= i <= 126: escapes.append(chr(i)) else: escapes.append("\\%03o" % i) escapes[ord('\\')] = '\\\\' escapes[ord('\t')] = '\\t' escapes[ord('\r')] = '\\r' escapes[ord('\n')] = '\\n' escapes[ord('\"')] = '\\"' | def usage(code, msg=''): print __doc__ % globals() if msg: print msg sys.exit(code) | b748a44903fd0395aa03a8c8e6f42748f50d37f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b748a44903fd0395aa03a8c8e6f42748f50d37f5/pygettext.py |
entry = (self.__curfile, self.__lineno) linenos = self.__messages.get(msg) if linenos is None: self.__messages[msg] = [entry] else: linenos.append(entry) | if not msg in self.__options.toexclude: entry = (self.__curfile, self.__lineno) linenos = self.__messages.get(msg) if linenos is None: self.__messages[msg] = [entry] else: linenos.append(entry) | def __openseen(self, ttype, tstring, lineno): if ttype == tokenize.OP and tstring == ')': # We've seen the last of the translatable strings. Record the # line number of the first line of the strings and update the list # of messages seen. Reset state for the next batch. If there # were no strings inside _(), then ju... | b748a44903fd0395aa03a8c8e6f42748f50d37f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b748a44903fd0395aa03a8c8e6f42748f50d37f5/pygettext.py |
print pot_header % {'time': timestamp, 'version':__version__} | print pot_header % {'time': timestamp, 'version': __version__} | def write(self, fp): options = self.__options timestamp = time.ctime(time.time()) # common header try: sys.stdout = fp # The time stamp in the header doesn't have the same format # as that generated by xgettext... print pot_header % {'time': timestamp, 'version':__version__} for k, v in self.__messages.items(): for fil... | b748a44903fd0395aa03a8c8e6f42748f50d37f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b748a44903fd0395aa03a8c8e6f42748f50d37f5/pygettext.py |
for filename, lineno in v: d = {'filename': filename, 'lineno': lineno} if options.location == options.SOLARIS: | if options.location == options.SOLARIS: for filename, lineno in v: d = {'filename': filename, 'lineno': lineno} | def write(self, fp): options = self.__options timestamp = time.ctime(time.time()) # common header try: sys.stdout = fp # The time stamp in the header doesn't have the same format # as that generated by xgettext... print pot_header % {'time': timestamp, 'version':__version__} for k, v in self.__messages.items(): for fil... | b748a44903fd0395aa03a8c8e6f42748f50d37f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b748a44903fd0395aa03a8c8e6f42748f50d37f5/pygettext.py |
elif options.location == options.GNU: print _(' | elif options.location == options.GNU: locline = ' for filename, lineno in v: d = {'filename': filename, 'lineno': lineno} s = _(' %(filename)s:%(lineno)d') % d if len(locline) + len(s) <= options.width: locline = locline + s else: print locline locline = " if len(locline) > 2: print locline | def write(self, fp): options = self.__options timestamp = time.ctime(time.time()) # common header try: sys.stdout = fp # The time stamp in the header doesn't have the same format # as that generated by xgettext... print pot_header % {'time': timestamp, 'version':__version__} for k, v in self.__messages.items(): for fil... | b748a44903fd0395aa03a8c8e6f42748f50d37f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b748a44903fd0395aa03a8c8e6f42748f50d37f5/pygettext.py |
print 'msgstr ""' print | print 'msgstr ""\n' | def write(self, fp): options = self.__options timestamp = time.ctime(time.time()) # common header try: sys.stdout = fp # The time stamp in the header doesn't have the same format # as that generated by xgettext... print pot_header % {'time': timestamp, 'version':__version__} for k, v in self.__messages.items(): for fil... | b748a44903fd0395aa03a8c8e6f42748f50d37f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b748a44903fd0395aa03a8c8e6f42748f50d37f5/pygettext.py |
'k:d:n:hv', ['keyword', 'default-domain', 'help', 'add-location=', 'no-location', 'verbose']) | 'ad:Ehk:n:o:p:Vvw:x:', ['extract-all', 'default-domain', 'escape', 'help', 'keyword', 'add-location', 'no-location', 'output=', 'output-dir=', 'verbose', 'version', 'width=', 'exclude-file=', ]) | def main(): default_keywords = ['_'] try: opts, args = getopt.getopt( sys.argv[1:], 'k:d:n:hv', ['keyword', 'default-domain', 'help', 'add-location=', 'no-location', 'verbose']) except getopt.error, msg: usage(1, msg) # for holding option values class Options: # constants GNU = 1 SOLARIS = 2 # defaults keywords = [] o... | b748a44903fd0395aa03a8c8e6f42748f50d37f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b748a44903fd0395aa03a8c8e6f42748f50d37f5/pygettext.py |
elif opt in ('-d', '--default-domain'): options.outfile = arg + '.pot' | def main(): default_keywords = ['_'] try: opts, args = getopt.getopt( sys.argv[1:], 'k:d:n:hv', ['keyword', 'default-domain', 'help', 'add-location=', 'no-location', 'verbose']) except getopt.error, msg: usage(1, msg) # for holding option values class Options: # constants GNU = 1 SOLARIS = 2 # defaults keywords = [] o... | b748a44903fd0395aa03a8c8e6f42748f50d37f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b748a44903fd0395aa03a8c8e6f42748f50d37f5/pygettext.py | |
def deepcopyrecursive(): if verbose: print "Testing deepcopy of recursive objects..." class Node: pass a = Node() b = Node() a.b = b b.a = a z = deepcopy(a) | def strops(): try: 'a' + 5 except TypeError: pass else: raise TestFailed, "'' + 5 doesn't raise TypeError" try: ''.split('') except ValueError: pass else: raise TestFailed, "''.split('') doesn't raise ValueError" try: ''.join([0]) except TypeError: pass else: raise TestFailed, "''.join([0]) doesn't raise TypeError" ... | 956c39424aee8fac526a33307bb7315425f25817 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/956c39424aee8fac526a33307bb7315425f25817/test_descr.py | |
effective = (effective / tabwidth + 1) * tabwidth | effective = (int(effective / tabwidth) + 1) * tabwidth | def classifyws(s, tabwidth): raw = effective = 0 for ch in s: if ch == ' ': raw = raw + 1 effective = effective + 1 elif ch == '\t': raw = raw + 1 effective = (effective / tabwidth + 1) * tabwidth else: break return raw, effective | abb8bde536623ba9f3caa44026e3dfd812d79c71 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/abb8bde536623ba9f3caa44026e3dfd812d79c71/AutoIndent.py |
"Please save first!") | "The buffer for %s is not saved.\n" % name + "Please save it first!") | def getfilename(self): # Logic to make sure we have a saved filename # XXX Better logic would offer to save! if not self.editwin.get_saved(): self.errorbox("Not saved", "Please save first!") self.editwin.text.focus_set() return filename = self.editwin.io.filename if not filename: self.errorbox("No file name", "This win... | d95cc35059608ccfb8afe130c5870b7a437ca828 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d95cc35059608ccfb8afe130c5870b7a437ca828/ScriptBinding.py |
self.fail("expected TypeError") | def test_union_update(self): try: self.set |= self.other self.fail("expected TypeError") except TypeError: pass | 2521aa2cec6a3f785b321b2d7ad810b04f8aeefd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2521aa2cec6a3f785b321b2d7ad810b04f8aeefd/test_sets.py | |
try: self.other | self.set self.fail("expected TypeError") except TypeError: pass try: self.set | self.other self.fail("expected TypeError") except TypeError: pass | self.assertRaises(TypeError, lambda: self.set | self.other) self.assertRaises(TypeError, lambda: self.other | self.set) | def test_union(self): try: self.other | self.set self.fail("expected TypeError") except TypeError: pass try: self.set | self.other self.fail("expected TypeError") except TypeError: pass | 2521aa2cec6a3f785b321b2d7ad810b04f8aeefd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2521aa2cec6a3f785b321b2d7ad810b04f8aeefd/test_sets.py |
self.fail("expected TypeError") | def test_intersection_update(self): try: self.set &= self.other self.fail("expected TypeError") except TypeError: pass | 2521aa2cec6a3f785b321b2d7ad810b04f8aeefd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2521aa2cec6a3f785b321b2d7ad810b04f8aeefd/test_sets.py | |
try: self.other & self.set self.fail("expected TypeError") except TypeError: pass try: self.set & self.other self.fail("expected TypeError") except TypeError: pass | self.assertRaises(TypeError, lambda: self.set & self.other) self.assertRaises(TypeError, lambda: self.other & self.set) | def test_intersection(self): try: self.other & self.set self.fail("expected TypeError") except TypeError: pass try: self.set & self.other self.fail("expected TypeError") except TypeError: pass | 2521aa2cec6a3f785b321b2d7ad810b04f8aeefd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2521aa2cec6a3f785b321b2d7ad810b04f8aeefd/test_sets.py |
self.fail("expected TypeError") | def test_sym_difference_update(self): try: self.set ^= self.other self.fail("expected TypeError") except TypeError: pass | 2521aa2cec6a3f785b321b2d7ad810b04f8aeefd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2521aa2cec6a3f785b321b2d7ad810b04f8aeefd/test_sets.py | |
try: self.other ^ self.set self.fail("expected TypeError") except TypeError: pass try: self.set ^ self.other self.fail("expected TypeError") except TypeError: pass | self.assertRaises(TypeError, lambda: self.set ^ self.other) self.assertRaises(TypeError, lambda: self.other ^ self.set) | def test_sym_difference(self): try: self.other ^ self.set self.fail("expected TypeError") except TypeError: pass try: self.set ^ self.other self.fail("expected TypeError") except TypeError: pass | 2521aa2cec6a3f785b321b2d7ad810b04f8aeefd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2521aa2cec6a3f785b321b2d7ad810b04f8aeefd/test_sets.py |
self.fail("expected TypeError") | def test_difference_update(self): try: self.set -= self.other self.fail("expected TypeError") except TypeError: pass | 2521aa2cec6a3f785b321b2d7ad810b04f8aeefd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2521aa2cec6a3f785b321b2d7ad810b04f8aeefd/test_sets.py | |
try: self.other - self.set self.fail("expected TypeError") except TypeError: pass try: self.set - self.other self.fail("expected TypeError") except TypeError: pass | self.assertRaises(TypeError, lambda: self.set - self.other) self.assertRaises(TypeError, lambda: self.other - self.set) | def test_difference(self): try: self.other - self.set self.fail("expected TypeError") except TypeError: pass try: self.set - self.other self.fail("expected TypeError") except TypeError: pass | 2521aa2cec6a3f785b321b2d7ad810b04f8aeefd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2521aa2cec6a3f785b321b2d7ad810b04f8aeefd/test_sets.py |
if not args: usage('hostname missing') host = args[0] | def main(): global verbose, interactive, mac, rmok, nologin try: opts, args = getopt.getopt(sys.argv[1:], 'a:bil:mnp:qrs:v') except getopt.error, msg: usage(msg) login = '' passwd = '' account = '' for o, a in opts: if o == '-l': login = a if o == '-p': passwd = a if o == '-a': account = a if o == '-v': verbose = verbo... | 54b871f51c1b9d2d2a9a816b7172b868377b7989 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/54b871f51c1b9d2d2a9a816b7172b868377b7989/ftpmirror.py | |
exts.append( Extension('errno', ['errnomodule.c']) ) | 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') | beadc82f527ea8617c228e6b4cb98592a9514a77 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/beadc82f527ea8617c228e6b4cb98592a9514a77/setup.py | |
print set | def __init__(self, set): | b2202eddd973943cab19b3439da4266d52557ad9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b2202eddd973943cab19b3439da4266d52557ad9/re.py | |
if pattern[index] == 'iI': | if pattern[index] in 'iI': | def compile(pattern, flags=0): stack = [] index = 0 label = 0 register = 1 groupindex = {} callouts = [] while (index < len(pattern)): char = pattern[index] index = index + 1 if char == '\\': if index < len(pattern): next = pattern[index] index = index + 1 if next == 't': stack.append([Exact(chr(9))]) elif next == 'n'... | b2202eddd973943cab19b3439da4266d52557ad9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b2202eddd973943cab19b3439da4266d52557ad9/re.py |
elif pattern[index] == 'mM': | elif pattern[index] in 'mM': | def compile(pattern, flags=0): stack = [] index = 0 label = 0 register = 1 groupindex = {} callouts = [] while (index < len(pattern)): char = pattern[index] index = index + 1 if char == '\\': if index < len(pattern): next = pattern[index] index = index + 1 if next == 't': stack.append([Exact(chr(9))]) elif next == 'n'... | b2202eddd973943cab19b3439da4266d52557ad9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b2202eddd973943cab19b3439da4266d52557ad9/re.py |
elif pattern[index] == 'sS': | elif pattern[index] in 'sS': | def compile(pattern, flags=0): stack = [] index = 0 label = 0 register = 1 groupindex = {} callouts = [] while (index < len(pattern)): char = pattern[index] index = index + 1 if char == '\\': if index < len(pattern): next = pattern[index] index = index + 1 if next == 't': stack.append([Exact(chr(9))]) elif next == 'n'... | b2202eddd973943cab19b3439da4266d52557ad9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b2202eddd973943cab19b3439da4266d52557ad9/re.py |
if err[0] == socket.SSL_ERROR_ZERO_RETURN: | if (err[0] == socket.SSL_ERROR_ZERO_RETURN or err[0] == socket.SSL_ERROR_EOF): | def makefile(self, mode, bufsize=None): """Return a readable file-like object with data from socket. | cd6f7dca2bce97bbaa6dd9d3efd28eb0f4a4399d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cd6f7dca2bce97bbaa6dd9d3efd28eb0f4a4399d/httplib.py |
if sys.platform == 'Darwin1.2': | if platform == 'Darwin1.2': | 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' ) | 1fc6b0d7db91d541a72639988978bef873a18f5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1fc6b0d7db91d541a72639988978bef873a18f5f/setup.py |
if (self.compiler.find_library_file(lib_dirs, 'ndbm')): exts.append( Extension('dbm', ['dbmmodule.c'], libraries = ['ndbm'] ) ) else: exts.append( Extension('dbm', ['dbmmodule.c']) ) | if platform not in ['cygwin']: if (self.compiler.find_library_file(lib_dirs, 'ndbm')): exts.append( Extension('dbm', ['dbmmodule.c'], libraries = ['ndbm'] ) ) else: exts.append( Extension('dbm', ['dbmmodule.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' ) | 1fc6b0d7db91d541a72639988978bef873a18f5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1fc6b0d7db91d541a72639988978bef873a18f5f/setup.py |
if sys.platform not in ['mac', 'win32']: | if platform not in ['mac', 'win32']: | 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' ) | 1fc6b0d7db91d541a72639988978bef873a18f5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1fc6b0d7db91d541a72639988978bef873a18f5f/setup.py |
exts.append( Extension('resource', ['resource.c']) ) | if platform not in ['cygwin']: exts.append( Extension('resource', ['resource.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' ) | 1fc6b0d7db91d541a72639988978bef873a18f5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1fc6b0d7db91d541a72639988978bef873a18f5f/setup.py |
if sys.platform == 'sunos4': | if platform == 'sunos4': | 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' ) | 1fc6b0d7db91d541a72639988978bef873a18f5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1fc6b0d7db91d541a72639988978bef873a18f5f/setup.py |
if sys.platform == 'irix5': | if platform == 'irix5': | 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' ) | 1fc6b0d7db91d541a72639988978bef873a18f5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1fc6b0d7db91d541a72639988978bef873a18f5f/setup.py |
plat = sys.platform if plat == 'linux2': | if platform == 'linux2': | 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' ) | 1fc6b0d7db91d541a72639988978bef873a18f5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1fc6b0d7db91d541a72639988978bef873a18f5f/setup.py |
if plat == 'sunos5': | if platform == 'sunos5': | 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' ) | 1fc6b0d7db91d541a72639988978bef873a18f5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1fc6b0d7db91d541a72639988978bef873a18f5f/setup.py |
if sys.platform == 'sunos5': | platform = self.get_platform() if platform == 'sunos5': | def detect_tkinter(self, inc_dirs, lib_dirs): # The _tkinter module. # # The command for _tkinter is long and site specific. Please # uncomment and/or edit those parts as indicated. If you don't have a # specific extension (e.g. Tix or BLT), leave the corresponding line # commented out. (Leave the trailing backslash... | 1fc6b0d7db91d541a72639988978bef873a18f5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1fc6b0d7db91d541a72639988978bef873a18f5f/setup.py |
if sys.platform in ['aix3', 'aix4']: | if platform in ['aix3', 'aix4']: | def detect_tkinter(self, inc_dirs, lib_dirs): # The _tkinter module. # # The command for _tkinter is long and site specific. Please # uncomment and/or edit those parts as indicated. If you don't have a # specific extension (e.g. Tix or BLT), leave the corresponding line # commented out. (Leave the trailing backslash... | 1fc6b0d7db91d541a72639988978bef873a18f5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1fc6b0d7db91d541a72639988978bef873a18f5f/setup.py |
self.previous_importer = namespace['__import__'] self.namespace = namespace | def install(self, namespace=vars(__builtin__)): "Install this ImportManager into the specified namespace." | 497cbb445621297b48535033c85648fc81d4a16b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/497cbb445621297b48535033c85648fc81d4a16b/imputil.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.