rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
result.addError(self, self.__exc_info()) | result.addError(self, self._exc_info()) | def run(self, result=None): if result is None: result = self.defaultTestResult() result.startTest(self) testMethod = getattr(self, self.__testMethodName) try: try: self.setUp() except KeyboardInterrupt: raise except: result.addError(self, self.__exc_info()) return | b66ad788444c7f79115e9d6749906c4511b216dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b66ad788444c7f79115e9d6749906c4511b216dd/unittest.py |
result.addFailure(self, self.__exc_info()) | result.addFailure(self, self._exc_info()) | def run(self, result=None): if result is None: result = self.defaultTestResult() result.startTest(self) testMethod = getattr(self, self.__testMethodName) try: try: self.setUp() except KeyboardInterrupt: raise except: result.addError(self, self.__exc_info()) return | b66ad788444c7f79115e9d6749906c4511b216dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b66ad788444c7f79115e9d6749906c4511b216dd/unittest.py |
result.addError(self, self.__exc_info()) | result.addError(self, self._exc_info()) | def run(self, result=None): if result is None: result = self.defaultTestResult() result.startTest(self) testMethod = getattr(self, self.__testMethodName) try: try: self.setUp() except KeyboardInterrupt: raise except: result.addError(self, self.__exc_info()) return | b66ad788444c7f79115e9d6749906c4511b216dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b66ad788444c7f79115e9d6749906c4511b216dd/unittest.py |
result.addError(self, self.__exc_info()) | result.addError(self, self._exc_info()) | def run(self, result=None): if result is None: result = self.defaultTestResult() result.startTest(self) testMethod = getattr(self, self.__testMethodName) try: try: self.setUp() except KeyboardInterrupt: raise except: result.addError(self, self.__exc_info()) return | b66ad788444c7f79115e9d6749906c4511b216dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b66ad788444c7f79115e9d6749906c4511b216dd/unittest.py |
getattr(self, self.__testMethodName)() | getattr(self, self._testMethodName)() | def debug(self): """Run the test without collecting errors in a TestResult""" self.setUp() getattr(self, self.__testMethodName)() self.tearDown() | b66ad788444c7f79115e9d6749906c4511b216dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b66ad788444c7f79115e9d6749906c4511b216dd/unittest.py |
def __exc_info(self): | def _exc_info(self): | def __exc_info(self): """Return a version of sys.exc_info() with the traceback frame minimised; usually the top level of the traceback frame is not needed. """ exctype, excvalue, tb = sys.exc_info() if sys.platform[:4] == 'java': ## tracebacks look different in Jython return (exctype, excvalue, tb) return (exctype, exc... | b66ad788444c7f79115e9d6749906c4511b216dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b66ad788444c7f79115e9d6749906c4511b216dd/unittest.py |
raise ValueError, "CRC check failed" | raise IOError, "CRC check failed" | def _read_eof(self): # We've read to the end of the file, so we have to rewind in order # to reread the 8 bytes containing the CRC and the file size. # We check the that the computed CRC and size of the # uncompressed data matches the stored values. Note that the size # stored is the true file size mod 2**32. self.fil... | 04ea4fbe05eaed009801243ce743503068de45af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/04ea4fbe05eaed009801243ce743503068de45af/gzip.py |
raise ValueError, "Incorrect length of data produced" | raise IOError, "Incorrect length of data produced" | def _read_eof(self): # We've read to the end of the file, so we have to rewind in order # to reread the 8 bytes containing the CRC and the file size. # We check the that the computed CRC and size of the # uncompressed data matches the stored values. Note that the size # stored is the true file size mod 2**32. self.fil... | 04ea4fbe05eaed009801243ce743503068de45af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/04ea4fbe05eaed009801243ce743503068de45af/gzip.py |
state = ' ' | self.state = ' ' | def get_token(self): "Get a token from the input stream (or from stack if it's monempty)" if self.pushback: tok = self.pushback[0] self.pushback = self.pushback[1:] if (self.debug >= 1): print "Popping " + tok return tok tok = '' while 1: nextchar = self.instream.read(1); if nextchar == '\n': self.lineno = self.lineno ... | 04a1725e62e248a6287c2299dfe6504a8c7874bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/04a1725e62e248a6287c2299dfe6504a8c7874bf/shlex.py |
if 'Host' in (headers or [k for k in headers.iterkeys() if k.lower() == "host"]): | if 'host' in [k.lower() for k in headers]: | def _send_request(self, method, url, body, headers): # If headers already contains a host header, then define the # optional skip_host argument to putrequest(). The check is # harder because field names are case insensitive. if 'Host' in (headers or [k for k in headers.iterkeys() if k.lower() == "host"]): self.putrequ... | 922ed41d8c276ae7638ed40408ca775221b8a0a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/922ed41d8c276ae7638ed40408ca775221b8a0a7/httplib.py |
return | return True | def scriptswalk(self, top, menu, done=None): if done is None: done = {} if done.has_key(top): return done[top] = 1 import os, string try: names = os.listdir(top) except os.error: FrameWork.MenuItem(menu, '(Scripts Folder not found)', None, None) return savedir = os.getcwd() os.chdir(top) for name in names: if name == "... | a93e9074645ebb767545f234bf3e49f5cc7b85db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a93e9074645ebb767545f234bf3e49f5cc7b85db/Wapplication.py |
return | return True | def scriptswalk(self, top, menu, done=None): if done is None: done = {} if done.has_key(top): return done[top] = 1 import os, string try: names = os.listdir(top) except os.error: FrameWork.MenuItem(menu, '(Scripts Folder not found)', None, None) return savedir = os.getcwd() os.chdir(top) for name in names: if name == "... | a93e9074645ebb767545f234bf3e49f5cc7b85db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a93e9074645ebb767545f234bf3e49f5cc7b85db/Wapplication.py |
self.scriptswalk(path, submenu, done) | if not self.scriptswalk(path, submenu, done): return False | def scriptswalk(self, top, menu, done=None): if done is None: done = {} if done.has_key(top): return done[top] = 1 import os, string try: names = os.listdir(top) except os.error: FrameWork.MenuItem(menu, '(Scripts Folder not found)', None, None) return savedir = os.getcwd() os.chdir(top) for name in names: if name == "... | a93e9074645ebb767545f234bf3e49f5cc7b85db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a93e9074645ebb767545f234bf3e49f5cc7b85db/Wapplication.py |
return if address.lower().startswith('stimpy'): self.push('503 You suck %s' % address) | def smtp_RCPT(self, arg): print >> DEBUGSTREAM, '===> RCPT', arg if not self.__mailfrom: self.push('503 Error: need MAIL command') return address = self.__getaddr('TO:', arg) if not address: self.push('501 Syntax: RCPT TO: <address>') return if address.lower().startswith('stimpy'): self.push('503 You suck %s' % address... | f4bf8a72bf65c6b7d62acfda63b1d06815431183 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f4bf8a72bf65c6b7d62acfda63b1d06815431183/smtpd.py | |
return getattr(self, self.err) | return getattr(self.err, attr) | def __getattr__(self, attr): return getattr(self, self.err) | 040a322c4d58967e6ea03dbba5364afb473948b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/040a322c4d58967e6ea03dbba5364afb473948b7/test_cgi.py |
'UNICODE': ('ref/strings', 'encodings unicode TYPES STRING'), | 'UNICODE': ('ref/strings', 'encodings unicode SEQUENCES STRINGMETHODS FORMATTING TYPES'), | def writedocs(dir, pkgpath='', done=None): """Write out HTML documentation for all modules in a directory tree.""" if done is None: done = {} for file in os.listdir(dir): path = os.path.join(dir, file) if ispackage(path): writedocs(path, pkgpath + file + '.', done) elif os.path.isfile(path): modname = inspect.getmodule... | 608e36211ec60e3709b8dc3cca74f40cedae1bae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/608e36211ec60e3709b8dc3cca74f40cedae1bae/pydoc.py |
'EXECUTION': ('ref/naming', ''), 'NAMESPACES': ('ref/naming', 'global ASSIGNMENT DELETION'), | 'EXECUTION': ('ref/execmodel', 'NAMESPACES DYNAMICFEATURES EXCEPTIONS'), 'NAMESPACES': ('ref/naming', 'global ASSIGNMENT DELETION DYNAMICFEATURES'), 'DYNAMICFEATURES': ('ref/dynamic-features', ''), | 'METHODS': ('lib/typesmethods', 'class def CLASSES TYPES'), | 608e36211ec60e3709b8dc3cca74f40cedae1bae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/608e36211ec60e3709b8dc3cca74f40cedae1bae/pydoc.py |
'COERCIONS': 'CONVERSIONS', 'CONVERSIONS': ('ref/conversions', ''), | 'COERCIONS': ('ref/coercion-rules','CONVERSIONS'), 'CONVERSIONS': ('ref/conversions', 'COERCIONS'), | 'METHODS': ('lib/typesmethods', 'class def CLASSES TYPES'), | 608e36211ec60e3709b8dc3cca74f40cedae1bae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/608e36211ec60e3709b8dc3cca74f40cedae1bae/pydoc.py |
print "Can't copy %s to %s: %s" % (`srcname`, `dstname`, str(why)) | errors.append((srcname, dstname, why)) if errors: raise Error, errors | def copytree(src, dst, symlinks=0): """Recursively copy a directory tree using copy2(). The destination directory must not already exist. Error are reported to standard output. If the optional symlinks flag is true, symbolic links in the source tree result in symbolic links in the destination tree; if it is false, th... | d44b264ef8d5cad1380874bc2c55dd4363dba02f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d44b264ef8d5cad1380874bc2c55dd4363dba02f/shutil.py |
macros=macros, | def build_extensions (self): | 75fa37e86845ccd392ab434c37132e95456e3104 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/75fa37e86845ccd392ab434c37132e95456e3104/build_ext.py | |
opts, args = getopt.getopt(sys.argv[1:], 'm:qv') | opts, args = getopt.getopt(sys.argv[1:], 't:m:qva') | def main(): try: opts, args = getopt.getopt(sys.argv[1:], 'm:qv') except getopt.error, msg: sys.stdout = sys.stderr print msg print __doc__%vars(webchecker) sys.exit(2) for o, a in opts: if o == '-m': webchecker.maxpage = string.atoi(a) if o == '-q': webchecker.verbose = 0 if o == '-v': webchecker.verbose = webchecker.... | 2ebde6d1fb628c2812a1c10ff496f785bfd5d202 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2ebde6d1fb628c2812a1c10ff496f785bfd5d202/wcgui.py |
self.__todo = ListPanel(mp, "To check", self.showinfo) self.__done = ListPanel(mp, "Checked", self.showinfo) self.__bad = ListPanel(mp, "Bad links", self.showinfo) self.__errors = ListPanel(mp, "Pages w/ bad links", self.showinfo) | self.__todo = ListPanel(mp, "To check", self, self.showinfo) self.__done = ListPanel(mp, "Checked", self, self.showinfo) self.__bad = ListPanel(mp, "Bad links", self, self.showinfo) self.__errors = ListPanel(mp, "Pages w/ bad links", self, self.showinfo) | def __init__(self, parent, root=webchecker.DEFROOT): self.__parent = parent | 2ebde6d1fb628c2812a1c10ff496f785bfd5d202 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2ebde6d1fb628c2812a1c10ff496f785bfd5d202/wcgui.py |
self.__checking.config(text="Checking "+url) | self.__checking.config(text="Checking "+self.format_url(url)) | def dosomething(self): if self.__busy: return self.__busy = 1 if self.todo: l = self.__todo.selectedindices() if l: i = l[0] else: i = 0 self.__todo.list.select_set(i) self.__todo.list.yview(i) url = self.__todo.items[i] self.__checking.config(text="Checking "+url) self.__parent.update() self.dopage(url) else: self.sto... | 2ebde6d1fb628c2812a1c10ff496f785bfd5d202 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2ebde6d1fb628c2812a1c10ff496f785bfd5d202/wcgui.py |
d.put("URL: %s\n" % url) | d.put("URL: %s\n" % self.format_url(url)) | def showinfo(self, url): d = self.__details d.clear() d.put("URL: %s\n" % url) if self.bad.has_key(url): d.put("Error: %s\n" % str(self.bad[url])) if url in self.roots: d.put("Note: This is a root URL\n") if self.done.has_key(url): d.put("Status: checked\n") o = self.done[url] elif self.todo.has_key(url): d.put("... | 2ebde6d1fb628c2812a1c10ff496f785bfd5d202 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2ebde6d1fb628c2812a1c10ff496f785bfd5d202/wcgui.py |
if self.errors.has_key(url): | if (not url[1]) and self.errors.has_key(url[0]): | def showinfo(self, url): d = self.__details d.clear() d.put("URL: %s\n" % url) if self.bad.has_key(url): d.put("Error: %s\n" % str(self.bad[url])) if url in self.roots: d.put("Note: This is a root URL\n") if self.done.has_key(url): d.put("Status: checked\n") o = self.done[url] elif self.todo.has_key(url): d.put("... | 2ebde6d1fb628c2812a1c10ff496f785bfd5d202 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2ebde6d1fb628c2812a1c10ff496f785bfd5d202/wcgui.py |
for triple in self.errors[url]: | for triple in self.errors[url[0]]: | def showinfo(self, url): d = self.__details d.clear() d.put("URL: %s\n" % url) if self.bad.has_key(url): d.put("Error: %s\n" % str(self.bad[url])) if url in self.roots: d.put("Note: This is a root URL\n") if self.done.has_key(url): d.put("Status: checked\n") o = self.done[url] elif self.todo.has_key(url): d.put("... | 2ebde6d1fb628c2812a1c10ff496f785bfd5d202 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2ebde6d1fb628c2812a1c10ff496f785bfd5d202/wcgui.py |
d.put(" HREF %s" % link) if link != rawlink: d.put(" (%s)" %rawlink) | d.put(" HREF %s" % self.format_url(link)) if self.format_url(link) != rawlink: d.put(" (%s)" %rawlink) | def showinfo(self, url): d = self.__details d.clear() d.put("URL: %s\n" % url) if self.bad.has_key(url): d.put("Error: %s\n" % str(self.bad[url])) if url in self.roots: d.put("Note: This is a root URL\n") if self.done.has_key(url): d.put("Status: checked\n") o = self.done[url] elif self.todo.has_key(url): d.put("... | 2ebde6d1fb628c2812a1c10ff496f785bfd5d202 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2ebde6d1fb628c2812a1c10ff496f785bfd5d202/wcgui.py |
if rawlink != url: | if rawlink != self.format_url(url): | def showinfo(self, url): d = self.__details d.clear() d.put("URL: %s\n" % url) if self.bad.has_key(url): d.put("Error: %s\n" % str(self.bad[url])) if url in self.roots: d.put("Note: This is a root URL\n") if self.done.has_key(url): d.put("Status: checked\n") o = self.done[url] elif self.todo.has_key(url): d.put("... | 2ebde6d1fb628c2812a1c10ff496f785bfd5d202 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2ebde6d1fb628c2812a1c10ff496f785bfd5d202/wcgui.py |
self.__errors.insert(url) | self.__errors.insert((url, '')) | def seterror(self, url, triple): webchecker.Checker.seterror(self, url, triple) self.__errors.insert(url) self.newstatus() | 2ebde6d1fb628c2812a1c10ff496f785bfd5d202 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2ebde6d1fb628c2812a1c10ff496f785bfd5d202/wcgui.py |
def __init__(self, mp, name, showinfo=None): | def __init__(self, mp, name, checker, showinfo=None): | def __init__(self, mp, name, showinfo=None): self.mp = mp self.name = name self.showinfo = showinfo self.panel = mp.addpanel(name) self.list, self.frame = tktools.make_list_box( self.panel, width=60, height=5) self.list.config(exportselection=0) if showinfo: self.list.bind('<Double-Button-1>', self.doubleclick) self.it... | 2ebde6d1fb628c2812a1c10ff496f785bfd5d202 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2ebde6d1fb628c2812a1c10ff496f785bfd5d202/wcgui.py |
self.showinfo(self.list.get(l[0])) | self.showinfo(self.items[l[0]]) | def doubleclick(self, event): l = self.selectedindices() if l: self.showinfo(self.list.get(l[0])) | 2ebde6d1fb628c2812a1c10ff496f785bfd5d202 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2ebde6d1fb628c2812a1c10ff496f785bfd5d202/wcgui.py |
self.list.insert(i, url) | self.list.insert(i, self.checker.format_url(url)) | def insert(self, url): if url not in self.items: if not self.items: self.mp.showpanel(self.name) # (I tried sorting alphabetically, but the display is too jumpy) i = len(self.items) self.list.insert(i, url) self.list.yview(i) self.items.insert(i, url) | 2ebde6d1fb628c2812a1c10ff496f785bfd5d202 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2ebde6d1fb628c2812a1c10ff496f785bfd5d202/wcgui.py |
Checks wether this line is typed in the normal prompt or in a breakpoint command list definition | Checks whether this line is typed at the normal prompt or in a breakpoint command list definition. | def onecmd(self, line): """Interpret the argument as though it had been typed in response to the prompt. | b0fcf117295f2e29b1174d7a1c44e4d9e1571ab2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b0fcf117295f2e29b1174d7a1c44e4d9e1571ab2/pdb.py |
if platform == 'cygwin': lib_prefix = 'cyg' else: lib_prefix = '' | def detect_tkinter(self, inc_dirs, lib_dirs): # The _tkinter module. | b421b52918ef842ee58204947aa81df2ab8f47f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b421b52918ef842ee58204947aa81df2ab8f47f2/setup.py | |
tklib = self.compiler.find_library_file(lib_dirs, lib_prefix + 'tk' + version) tcllib = self.compiler.find_library_file(lib_dirs, lib_prefix + 'tcl' + version) | tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version) tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version) | def detect_tkinter(self, inc_dirs, lib_dirs): # The _tkinter module. | b421b52918ef842ee58204947aa81df2ab8f47f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b421b52918ef842ee58204947aa81df2ab8f47f2/setup.py |
libs.append(lib_prefix + 'tk'+ version) libs.append(lib_prefix + 'tcl'+ version) | libs.append('tk'+ version) libs.append('tcl'+ version) | def detect_tkinter(self, inc_dirs, lib_dirs): # The _tkinter module. | b421b52918ef842ee58204947aa81df2ab8f47f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b421b52918ef842ee58204947aa81df2ab8f47f2/setup.py |
if os.environ.has_key("MSSdk") and self.find_exe("cl.exe"): | if os.environ.has_key("DISTUTILS_USE_SDK") and os.environ.has_key("MSSdk") and self.find_exe("cl.exe"): | def initialize(self): self.__paths = [] if os.environ.has_key("MSSdk") and self.find_exe("cl.exe"): # Assume that the SDK set up everything alright; don't try to be # smarter self.cc = "cl.exe" self.linker = "link.exe" self.lib = "lib.exe" self.rc = "rc.exe" self.mc = "mc.exe" else: self.__paths = self.get_msvc_paths("... | 2cd1457d691919a9d1b7be0742e1cd3a7007f680 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2cd1457d691919a9d1b7be0742e1cd3a7007f680/msvccompiler.py |
library_dirs=None): | library_dirs=None, build_info=None): | def link_shared_lib (self, objects, output_libname, libraries=None, library_dirs=None): # XXX should we sanity check the library name? (eg. no # slashes) self.link_shared_object (objects, "lib%s%s" % (output_libname, SO)) | 8c4f097a5c637a4673608d1db14fe675c1b4ea3b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8c4f097a5c637a4673608d1db14fe675c1b4ea3b/unixccompiler.py |
self.link_shared_object (objects, "lib%s%s" % (output_libname, SO)) | self.link_shared_object (objects, "lib%s%s" % \ (output_libname, self._shared_lib_ext), build_info=build_info) | def link_shared_lib (self, objects, output_libname, libraries=None, library_dirs=None): # XXX should we sanity check the library name? (eg. no # slashes) self.link_shared_object (objects, "lib%s%s" % (output_libname, SO)) | 8c4f097a5c637a4673608d1db14fe675c1b4ea3b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8c4f097a5c637a4673608d1db14fe675c1b4ea3b/unixccompiler.py |
library_dirs=None): | library_dirs=None, build_info=None): | def link_shared_object (self, objects, output_filename, libraries=None, library_dirs=None): | 8c4f097a5c637a4673608d1db14fe675c1b4ea3b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8c4f097a5c637a4673608d1db14fe675c1b4ea3b/unixccompiler.py |
if build_info is None: build_info = {} | def link_shared_object (self, objects, output_filename, libraries=None, library_dirs=None): | 8c4f097a5c637a4673608d1db14fe675c1b4ea3b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8c4f097a5c637a4673608d1db14fe675c1b4ea3b/unixccompiler.py | |
outnames.append (re.sub (r'\.(c|C|cc|cxx)$', '.o', inname)) | outnames.append ( re.sub (r'\.(c|C|cc|cxx|cpp)$', self._obj_ext, inname)) | def object_filenames (self, source_filenames): outnames = [] for inname in source_filenames: outnames.append (re.sub (r'\.(c|C|cc|cxx)$', '.o', inname)) return outnames | 8c4f097a5c637a4673608d1db14fe675c1b4ea3b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8c4f097a5c637a4673608d1db14fe675c1b4ea3b/unixccompiler.py |
return re.sub (r'\.(c|C|cc|cxx)$', SO) | return re.sub (r'\.(c|C|cc|cxx|cpp)$', self._shared_lib_ext) | def shared_object_filename (self, source_filename): return re.sub (r'\.(c|C|cc|cxx)$', SO) | 8c4f097a5c637a4673608d1db14fe675c1b4ea3b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8c4f097a5c637a4673608d1db14fe675c1b4ea3b/unixccompiler.py |
return "lib%s.a" % libname | return "lib%s%s" % (libname, self._static_lib_ext ) | def library_filename (self, libname): return "lib%s.a" % libname | 8c4f097a5c637a4673608d1db14fe675c1b4ea3b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8c4f097a5c637a4673608d1db14fe675c1b4ea3b/unixccompiler.py |
return "lib%s.so" % libname | return "lib%s%s" % (libname, self._shared_lib_ext ) | def shared_library_filename (self, libname): return "lib%s.so" % libname | 8c4f097a5c637a4673608d1db14fe675c1b4ea3b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8c4f097a5c637a4673608d1db14fe675c1b4ea3b/unixccompiler.py |
p = subprocess.Popen(cmdline, close_fds=True) | if sys.platform[:3] == 'win': p = subprocess.Popen(cmdline) else: p = subprocess.Popen(cmdline, close_fds=True) | def open(self, url, new=0, autoraise=1): cmdline = [self.name] + [arg.replace("%s", url) for arg in self.args] try: p = subprocess.Popen(cmdline, close_fds=True) return not p.wait() except OSError: return False | 6b1f6af28ab6bcc6f4e1a10368d417dd1094d4ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6b1f6af28ab6bcc6f4e1a10368d417dd1094d4ef/webbrowser.py |
setsid = getattr(os, 'setsid', None) if not setsid: setsid = getattr(os, 'setpgrp', None) | def open(self, url, new=0, autoraise=1): cmdline = [self.name] + [arg.replace("%s", url) for arg in self.args] setsid = getattr(os, 'setsid', None) if not setsid: setsid = getattr(os, 'setpgrp', None) try: p = subprocess.Popen(cmdline, close_fds=True, preexec_fn=setsid) return (p.poll() is None) except OSError: return ... | 6b1f6af28ab6bcc6f4e1a10368d417dd1094d4ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6b1f6af28ab6bcc6f4e1a10368d417dd1094d4ef/webbrowser.py | |
p = subprocess.Popen(cmdline, close_fds=True, preexec_fn=setsid) | if sys.platform[:3] == 'win': p = subprocess.Popen(cmdline) else: setsid = getattr(os, 'setsid', None) if not setsid: setsid = getattr(os, 'setpgrp', None) p = subprocess.Popen(cmdline, close_fds=True, preexec_fn=setsid) | def open(self, url, new=0, autoraise=1): cmdline = [self.name] + [arg.replace("%s", url) for arg in self.args] setsid = getattr(os, 'setsid', None) if not setsid: setsid = getattr(os, 'setpgrp', None) try: p = subprocess.Popen(cmdline, close_fds=True, preexec_fn=setsid) return (p.poll() is None) except OSError: return ... | 6b1f6af28ab6bcc6f4e1a10368d417dd1094d4ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6b1f6af28ab6bcc6f4e1a10368d417dd1094d4ef/webbrowser.py |
self._tofill = [] | def reset(self): """ Clear the screen, re-center the pen, and set variables to the default values. | 2219110991cdd175e1a19d5965be9339f89d5f07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2219110991cdd175e1a19d5965be9339f89d5f07/turtle.py | |
if self._tofill: for item in self._tofill: self._canvas.itemconfigure(item, fill=self._color) self._items.append(item) | def fill(self, flag): """ Call fill(1) before drawing the shape you want to fill, and fill(0) when done. | 2219110991cdd175e1a19d5965be9339f89d5f07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2219110991cdd175e1a19d5965be9339f89d5f07/turtle.py | |
self._tofill = [] | def fill(self, flag): """ Call fill(1) before drawing the shape you want to fill, and fill(0) when done. | 2219110991cdd175e1a19d5965be9339f89d5f07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2219110991cdd175e1a19d5965be9339f89d5f07/turtle.py | |
self.forward(0) | def fill(self, flag): """ Call fill(1) before drawing the shape you want to fill, and fill(0) when done. | 2219110991cdd175e1a19d5965be9339f89d5f07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2219110991cdd175e1a19d5965be9339f89d5f07/turtle.py | |
self.fill(1) | self._path = [self._position] self._filling = 1 | def begin_fill(self): """ Called just before drawing a shape to be filled. | 2219110991cdd175e1a19d5965be9339f89d5f07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2219110991cdd175e1a19d5965be9339f89d5f07/turtle.py |
color("green") left(130) | left(120) | def demo2(): # exercises some new and improved features speed('fast') width(3) # draw a segmented half-circle setheading(towards(0,0)) x,y = position() r = (x**2+y**2)**.5/2.0 right(90) pendown = True for i in range(18): if pendown: up() pendown = False else: down() pendown = True circle(r,10) sleep(2) reset() left(9... | 2219110991cdd175e1a19d5965be9339f89d5f07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2219110991cdd175e1a19d5965be9339f89d5f07/turtle.py |
forward(90) | forward(70) right(30) down() | def demo2(): # exercises some new and improved features speed('fast') width(3) # draw a segmented half-circle setheading(towards(0,0)) x,y = position() r = (x**2+y**2)**.5/2.0 right(90) pendown = True for i in range(18): if pendown: up() pendown = False else: down() pendown = True circle(r,10) sleep(2) reset() left(9... | 2219110991cdd175e1a19d5965be9339f89d5f07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2219110991cdd175e1a19d5965be9339f89d5f07/turtle.py |
speed('fastest') | speed("fastest") fill(1) for i in range(4): circle(50,90) right(90) forward(30) right(90) color("yellow") fill(0) left(90) up() forward(30) | def demo2(): # exercises some new and improved features speed('fast') width(3) # draw a segmented half-circle setheading(towards(0,0)) x,y = position() r = (x**2+y**2)**.5/2.0 right(90) pendown = True for i in range(18): if pendown: up() pendown = False else: down() pendown = True circle(r,10) sleep(2) reset() left(9... | 2219110991cdd175e1a19d5965be9339f89d5f07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2219110991cdd175e1a19d5965be9339f89d5f07/turtle.py |
import traceback | def formatException(self, ei): """ Format and return the specified exception information as a string. | 5bc3d5b3ccc4bb023381ac18ad5f5fc8e213b9ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5bc3d5b3ccc4bb023381ac18ad5f5fc8e213b9ce/__init__.py | |
import traceback | def handleError(self, record): """ Handle errors which occur during an emit() call. | 5bc3d5b3ccc4bb023381ac18ad5f5fc8e213b9ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5bc3d5b3ccc4bb023381ac18ad5f5fc8e213b9ce/__init__.py | |
def __init__(self, filename, mode="a"): | def __init__(self, filename, mode='a', encoding=None): | def __init__(self, filename, mode="a"): """ Open the specified file and use it as the stream for logging. """ StreamHandler.__init__(self, open(filename, mode)) #keep the absolute path, otherwise derived classes which use this #may come a cropper when the current directory changes self.baseFilename = os.path.abspath(fi... | 5bc3d5b3ccc4bb023381ac18ad5f5fc8e213b9ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5bc3d5b3ccc4bb023381ac18ad5f5fc8e213b9ce/__init__.py |
StreamHandler.__init__(self, open(filename, mode)) | if codecs is None: encoding = None if encoding is None: stream = open(filename, mode) else: stream = codecs.open(filename, mode, encoding) StreamHandler.__init__(self, stream) | def __init__(self, filename, mode="a"): """ Open the specified file and use it as the stream for logging. """ StreamHandler.__init__(self, open(filename, mode)) #keep the absolute path, otherwise derived classes which use this #may come a cropper when the current directory changes self.baseFilename = os.path.abspath(fi... | 5bc3d5b3ccc4bb023381ac18ad5f5fc8e213b9ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5bc3d5b3ccc4bb023381ac18ad5f5fc8e213b9ce/__init__.py |
(if filemode is unspecified, it defaults to "a"). | (if filemode is unspecified, it defaults to 'a'). | def basicConfig(**kwargs): """ Do basic configuration for the logging system. This function does nothing if the root logger already has handlers configured. It is a convenience method intended for use by simple scripts to do one-shot configuration of the logging package. The default behaviour is to create a StreamHan... | 5bc3d5b3ccc4bb023381ac18ad5f5fc8e213b9ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5bc3d5b3ccc4bb023381ac18ad5f5fc8e213b9ce/__init__.py |
mode = kwargs.get("filemode", "a") | mode = kwargs.get("filemode", 'a') | def basicConfig(**kwargs): """ Do basic configuration for the logging system. This function does nothing if the root logger already has handlers configured. It is a convenience method intended for use by simple scripts to do one-shot configuration of the logging package. The default behaviour is to create a StreamHan... | 5bc3d5b3ccc4bb023381ac18ad5f5fc8e213b9ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5bc3d5b3ccc4bb023381ac18ad5f5fc8e213b9ce/__init__.py |
outputs.extend(cmd.get_outputs()) | for filename in cmd.get_outputs(): if filename not in outputs: outputs.append(filename) | def get_outputs (self): # This command doesn't have any outputs of its own, so just # get the outputs of all its sub-commands. outputs = [] for cmd_name in self.get_sub_commands(): cmd = self.get_finalized_command(cmd_name) outputs.extend(cmd.get_outputs()) | 390067eb7d8b26ff30e46561877e178bad034e5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/390067eb7d8b26ff30e46561877e178bad034e5f/install.py |
{'message' : 'foo', 'args' : ('foo',)}), | {'message' : 'foo', 'args' : ('foo',), 'filename' : None, 'errno' : None, 'strerror' : None}), | def testAttributes(self): # test that exception attributes are happy | 00fdbb0ae71076b3ec37c7d26811482a66fd0268 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/00fdbb0ae71076b3ec37c7d26811482a66fd0268/test_exceptions.py |
{'message' : '', 'args' : ('foo', 'bar')}), | {'message' : '', 'args' : ('foo', 'bar'), 'filename' : None, 'errno' : 'foo', 'strerror' : 'bar'}), | def testAttributes(self): # test that exception attributes are happy | 00fdbb0ae71076b3ec37c7d26811482a66fd0268 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/00fdbb0ae71076b3ec37c7d26811482a66fd0268/test_exceptions.py |
{'message' : '', 'args' : ('foo', 'bar')}), | {'message' : '', 'args' : ('foo', 'bar'), 'filename' : 'baz', 'errno' : 'foo', 'strerror' : 'bar'}), (IOError, ('foo', 'bar', 'baz', 'quux'), {'message' : '', 'args' : ('foo', 'bar', 'baz', 'quux')}), | def testAttributes(self): # test that exception attributes are happy | 00fdbb0ae71076b3ec37c7d26811482a66fd0268 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/00fdbb0ae71076b3ec37c7d26811482a66fd0268/test_exceptions.py |
def __init__(self, filenames=()): | def __init__(self, filenames=(), strict=True): | def __init__(self, filenames=()): if not inited: init() self.encodings_map = encodings_map.copy() self.suffix_map = suffix_map.copy() self.types_map = types_map.copy() self.common_types = common_types.copy() for name in filenames: self.read(name) | b0945ca0ad01e7fdc7cc8a5703d1e114970042b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b0945ca0ad01e7fdc7cc8a5703d1e114970042b7/mimetypes.py |
self.types_map = types_map.copy() self.common_types = common_types.copy() | self.types_map = ({}, {}) self.types_map_inv = ({}, {}) for (ext, type) in types_map.items(): self.add_type(type, ext, True) for (ext, type) in common_types.items(): self.add_type(type, ext, False) | def __init__(self, filenames=()): if not inited: init() self.encodings_map = encodings_map.copy() self.suffix_map = suffix_map.copy() self.types_map = types_map.copy() self.common_types = common_types.copy() for name in filenames: self.read(name) | b0945ca0ad01e7fdc7cc8a5703d1e114970042b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b0945ca0ad01e7fdc7cc8a5703d1e114970042b7/mimetypes.py |
self.read(name) def guess_type(self, url, strict=1): | self.read(name, strict) def add_type(self, type, ext, strict=True): """Add a mapping between a type and and extension. When the extension is already known, the new type will replace the old one. When the type is already known the extension will be added to the list of known extensions. If strict is true, information... | def __init__(self, filenames=()): if not inited: init() self.encodings_map = encodings_map.copy() self.suffix_map = suffix_map.copy() self.types_map = types_map.copy() self.common_types = common_types.copy() for name in filenames: self.read(name) | b0945ca0ad01e7fdc7cc8a5703d1e114970042b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b0945ca0ad01e7fdc7cc8a5703d1e114970042b7/mimetypes.py |
Optional `strict' argument when false adds a bunch of commonly found, | Optional `strict' argument when False adds a bunch of commonly found, | def guess_type(self, url, strict=1): """Guess the type of a file based on its URL. | b0945ca0ad01e7fdc7cc8a5703d1e114970042b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b0945ca0ad01e7fdc7cc8a5703d1e114970042b7/mimetypes.py |
types_map = self.types_map common_types = self.common_types | types_map = self.types_map[True] | def guess_type(self, url, strict=1): """Guess the type of a file based on its URL. | b0945ca0ad01e7fdc7cc8a5703d1e114970042b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b0945ca0ad01e7fdc7cc8a5703d1e114970042b7/mimetypes.py |
elif ext in common_types: return common_types[ext], encoding elif ext.lower() in common_types: return common_types[ext.lower()], encoding | types_map = self.types_map[False] if ext in types_map: return types_map[ext], encoding elif ext.lower() in types_map: return types_map[ext.lower()], encoding | def guess_type(self, url, strict=1): """Guess the type of a file based on its URL. | b0945ca0ad01e7fdc7cc8a5703d1e114970042b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b0945ca0ad01e7fdc7cc8a5703d1e114970042b7/mimetypes.py |
def guess_extension(self, type, strict=1): | def guess_all_extensions(self, type, strict=True): """Guess the extensions for a file based on its MIME type. Return value is a list of strings giving the possible filename extensions, including the leading dot ('.'). The extension is not guaranteed to have been associated with any particular data stream, but would b... | def guess_extension(self, type, strict=1): """Guess the extension for a file based on its MIME type. | b0945ca0ad01e7fdc7cc8a5703d1e114970042b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b0945ca0ad01e7fdc7cc8a5703d1e114970042b7/mimetypes.py |
type = type.lower() for ext, stype in self.types_map.items(): if type == stype: return ext if not strict: for ext, stype in common_types.items(): if type == stype: return ext return None def read(self, filename): """Read a single mime.types-format file, specified by pathname.""" | extensions = self.guess_all_extensions(type, strict) if extensions is not None: extensions = extensions[0] return extensions def read(self, filename, strict=True): """ Read a single mime.types-format file, specified by pathname. If strict is true, information will be added to list of standard types, else to the list ... | def guess_extension(self, type, strict=1): """Guess the extension for a file based on its MIME type. | b0945ca0ad01e7fdc7cc8a5703d1e114970042b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b0945ca0ad01e7fdc7cc8a5703d1e114970042b7/mimetypes.py |
def readfp(self, fp): """Read a single mime.types-format file.""" map = self.types_map | def readfp(self, fp, strict=True): """ Read a single mime.types-format file. If strict is true, information will be added to list of standard types, else to the list of non-standard types. """ | def readfp(self, fp): """Read a single mime.types-format file.""" map = self.types_map while 1: line = fp.readline() if not line: break words = line.split() for i in range(len(words)): if words[i][0] == '#': del words[i:] break if not words: continue type, suffixes = words[0], words[1:] for suff in suffixes: map['.' + ... | b0945ca0ad01e7fdc7cc8a5703d1e114970042b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b0945ca0ad01e7fdc7cc8a5703d1e114970042b7/mimetypes.py |
map['.' + suff] = type def guess_type(url, strict=1): | self.add_type(type, suff, strict) def guess_type(url, strict=True): | def readfp(self, fp): """Read a single mime.types-format file.""" map = self.types_map while 1: line = fp.readline() if not line: break words = line.split() for i in range(len(words)): if words[i][0] == '#': del words[i:] break if not words: continue type, suffixes = words[0], words[1:] for suff in suffixes: map['.' + ... | b0945ca0ad01e7fdc7cc8a5703d1e114970042b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b0945ca0ad01e7fdc7cc8a5703d1e114970042b7/mimetypes.py |
def guess_extension(type, strict=1): | def guess_all_extensions(type, strict=True): """Guess the extensions for a file based on its MIME type. Return value is a list of strings giving the possible filename extensions, including the leading dot ('.'). The extension is not guaranteed to have been associated with any particular data stream, but would be mapp... | def guess_extension(type, strict=1): """Guess the extension for a file based on its MIME type. Return value is a string giving a filename extension, including the leading dot ('.'). The extension is not guaranteed to have been associated with any particular data stream, but would be mapped to the MIME type `type' by ... | b0945ca0ad01e7fdc7cc8a5703d1e114970042b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b0945ca0ad01e7fdc7cc8a5703d1e114970042b7/mimetypes.py |
global guess_extension, guess_type | global guess_all_extensions, guess_extension, guess_type | def init(files=None): global guess_extension, guess_type global suffix_map, types_map, encodings_map, common_types global inited inited = 1 db = MimeTypes() if files is None: files = knownfiles for file in files: if os.path.isfile(file): db.readfp(open(file)) encodings_map = db.encodings_map suffix_map = db.suffix_map ... | b0945ca0ad01e7fdc7cc8a5703d1e114970042b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b0945ca0ad01e7fdc7cc8a5703d1e114970042b7/mimetypes.py |
global inited inited = 1 | global add_type, inited inited = True | def init(files=None): global guess_extension, guess_type global suffix_map, types_map, encodings_map, common_types global inited inited = 1 db = MimeTypes() if files is None: files = knownfiles for file in files: if os.path.isfile(file): db.readfp(open(file)) encodings_map = db.encodings_map suffix_map = db.suffix_map ... | b0945ca0ad01e7fdc7cc8a5703d1e114970042b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b0945ca0ad01e7fdc7cc8a5703d1e114970042b7/mimetypes.py |
types_map = db.types_map | types_map = db.types_map[True] guess_all_extensions = db.guess_all_extensions | def init(files=None): global guess_extension, guess_type global suffix_map, types_map, encodings_map, common_types global inited inited = 1 db = MimeTypes() if files is None: files = knownfiles for file in files: if os.path.isfile(file): db.readfp(open(file)) encodings_map = db.encodings_map suffix_map = db.suffix_map ... | b0945ca0ad01e7fdc7cc8a5703d1e114970042b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b0945ca0ad01e7fdc7cc8a5703d1e114970042b7/mimetypes.py |
common_types = db.common_types | add_type = db.add_type common_types = db.types_map[False] | def init(files=None): global guess_extension, guess_type global suffix_map, types_map, encodings_map, common_types global inited inited = 1 db = MimeTypes() if files is None: files = knownfiles for file in files: if os.path.isfile(file): db.readfp(open(file)) encodings_map = db.encodings_map suffix_map = db.suffix_map ... | b0945ca0ad01e7fdc7cc8a5703d1e114970042b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b0945ca0ad01e7fdc7cc8a5703d1e114970042b7/mimetypes.py |
doc = getattr(value, "__doc__", None) | if callable(value): doc = getattr(value, "__doc__", None) else: doc = None | def spilldata(msg, attrs, predicate): ok, attrs = _split_list(attrs, predicate) if ok: hr.maybe() push(msg) for name, kind, homecls, value in ok: base = self.docother(getattr(object, name), name, mod) doc = getattr(value, "__doc__", None) if doc is None: push('<dl><dt>%s</dl>\n' % base) else: doc = self.markup(getdoc(v... | 07f6e5a8c03307be07da3a966532d6b1b9d8864c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/07f6e5a8c03307be07da3a966532d6b1b9d8864c/pydoc.py |
doc = getattr(value, "__doc__", None) | if callable(value): doc = getattr(value, "__doc__", None) else: doc = None | def spilldata(msg, attrs, predicate): ok, attrs = _split_list(attrs, predicate) if ok: hr.maybe() push(msg) for name, kind, homecls, value in ok: doc = getattr(value, "__doc__", None) push(self.docother(getattr(object, name), name, mod, 70, doc) + '\n') return attrs | 07f6e5a8c03307be07da3a966532d6b1b9d8864c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/07f6e5a8c03307be07da3a966532d6b1b9d8864c/pydoc.py |
(0, 50001), RuntimeError) | (0, 50001)) | def bump_num(matchobj): int_value = int(matchobj.group(0)) return str(int_value + 1) | 660fd76c8a68b876067edbc2eca033e4a2ebe64f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/660fd76c8a68b876067edbc2eca033e4a2ebe64f/test_sre.py |
class Boolean: """Boolean-value wrapper. Use True or False to generate a "boolean" XML-RPC value. """ def __init__(self, value = 0): self.value = operator.truth(value) def encode(self, out): out.write("<value><boolean>%d</boolean></value>\n" % self.value) def __cmp__(self, other): if isinstance(other, Boolean): oth... | if _bool_is_builtin: boolean = Boolean = bool True, False = True, False else: class Boolean: """Boolean-value wrapper. Use True or False to generate a "boolean" XML-RPC value. """ def __init__(self, value = 0): self.value = operator.truth(value) def encode(self, out): out.write("<value><boolean>%d</boolean></value>... | def __repr__(self): return ( "<Fault %s: %s>" % (self.faultCode, repr(self.faultString)) ) | 4bf101523d9c126186d5db93395f65a8bd373b9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4bf101523d9c126186d5db93395f65a8bd373b9d/xmlrpclib.py |
WRAPPERS = DateTime, Binary, Boolean | WRAPPERS = (DateTime, Binary) if not _bool_is_builtin: WRAPPERS = WRAPPERS + (Boolean,) | def _binary(data): # decode xml element contents into a Binary structure value = Binary() value.decode(data) return value | 4bf101523d9c126186d5db93395f65a8bd373b9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4bf101523d9c126186d5db93395f65a8bd373b9d/xmlrpclib.py |
return "Not all files were unpacked: %s" % " ".join(names) | return "Not all files were unpacked: %s" % " ".join(names) | def unpack(self, archive, output=None): tf = tarfile.open(archive, "r") members = tf.getmembers() skip = [] if self._renames: for member in members: for oldprefix, newprefix in self._renames: if oldprefix[:len(self._dir)] == self._dir: oldprefix2 = oldprefix[len(self._dir):] else: oldprefix2 = None if member.name[:len(... | fdf67a69a43dc90510c8c54a95b15f0e1980b8aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fdf67a69a43dc90510c8c54a95b15f0e1980b8aa/pimp.py |
if not self.distribution.has_ext_modules(): spec_file.append('BuildArchitectures: noarch') | if not self.force_arch: if not self.distribution.has_ext_modules(): spec_file.append('BuildArch: noarch') else: spec_file.append( 'BuildArch: %s' % self.force_arch ) | def _make_spec_file(self): """Generate the text of an RPM spec file and return it as a list of strings (one per line). """ # definitions and headers spec_file = [ '%define name ' + self.distribution.get_name(), '%define version ' + self.distribution.get_version().replace('-','_'), '%define release ' + self.release.repl... | b362adb2436aaf27eec42a402c0b2cd90f39ef43 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b362adb2436aaf27eec42a402c0b2cd90f39ef43/bdist_rpm.py |
for stack in self.rows + self.suits: | for stack in self.openstacks: | def closeststack(self, card): | 1f3e6c4561d6dffc34a6534ea37a8c8c5fb70ce1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1f3e6c4561d6dffc34a6534ea37a8c8c5fb70ce1/solitaire.py |
for stack in [self.opendeck] + self.suits + self.rows: | for stack in self.openstacks: | def reset(self): | 1f3e6c4561d6dffc34a6534ea37a8c8c5fb70ce1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1f3e6c4561d6dffc34a6534ea37a8c8c5fb70ce1/solitaire.py |
import __main__ class_ = getattr(__main__, options.classname) | classname = options.classname if "." in classname: lastdot = classname.rfind(".") mod = __import__(classname[:lastdot], globals(), locals(), [""]) classname = classname[lastdot+1:] else: import __main__ as mod print mod.__name__, dir(mod) class_ = getattr(mod, classname) | def parseargs(): global DEBUGSTREAM try: opts, args = getopt.getopt( sys.argv[1:], 'nVhc:d', ['class=', 'nosetuid', 'version', 'help', 'debug']) except getopt.error, e: usage(1, e) options = Options() for opt, arg in opts: if opt in ('-h', '--help'): usage(0) elif opt in ('-V', '--version'): print >> sys.stderr, __ver... | 923a59c02f2ae49e8f09bd66f5084e368dbd2ad4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/923a59c02f2ae49e8f09bd66f5084e368dbd2ad4/smtpd.py |
if w[0] != '-' and w[-2:] in ('.o', '.a'): | if w[0] not in ('-', '$') and w[-2:] in ('.o', '.a'): | def select(e, mods, vars, mod, skipofiles): files = [] for w in mods[mod]: w = treatword(w) if not w: continue w = expandvars(w, vars) for w in string.split(w): if skipofiles and w[-2:] == '.o': continue if w[0] != '-' and w[-2:] in ('.o', '.a'): w = os.path.join(e, w) if w[:2] in ('-L', '-R'): w = w[:2] + os.path.join... | 02a4bce349c32531cc74ac467f877a2f6ac4d26f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/02a4bce349c32531cc74ac467f877a2f6ac4d26f/checkextensions.py |
if w[:2] in ('-L', '-R'): | if w[:2] in ('-L', '-R') and w[2:3] != '$': | def select(e, mods, vars, mod, skipofiles): files = [] for w in mods[mod]: w = treatword(w) if not w: continue w = expandvars(w, vars) for w in string.split(w): if skipofiles and w[-2:] == '.o': continue if w[0] != '-' and w[-2:] in ('.o', '.a'): w = os.path.join(e, w) if w[:2] in ('-L', '-R'): w = w[:2] + os.path.join... | 02a4bce349c32531cc74ac467f877a2f6ac4d26f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/02a4bce349c32531cc74ac467f877a2f6ac4d26f/checkextensions.py |
fp.write(' | fp.write(' | def link (self, target_desc, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None): # First examine a couple of options for things that aren't implemented yet if not target_desc in ... | f6469ef84fa33b9b4e2c78048958d52a4c9ea0f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f6469ef84fa33b9b4e2c78048958d52a4c9ea0f2/mwerkscompiler.py |
del self._data[element] | self.remove(element) | def discard(self, element): """Remove an element from a set if it is a member. | 84d1207ea7a53a971d622e4d8d7a1e8c5474caa3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/84d1207ea7a53a971d622e4d8d7a1e8c5474caa3/sets.py |
vr = 0, 0, r[2]-r[0]-15, r[3]-r[1]-15 dr = (0, 0, vr[2], 0) | x0, y0, x1, y1 = self.wid.GetWindowPort().portRect x0 = x0 + 4 y0 = y0 + 4 x1 = x1 - 20 y1 = y1 - 20 vr = dr = x0, y0, x1, y1 | def open(self, path, name, data): self.path = path self.name = name r = windowbounds(400, 400) w = Win.NewWindow(r, name, 1, 0, -1, 1, 0x55555555) self.wid = w vr = 0, 0, r[2]-r[0]-15, r[3]-r[1]-15 dr = (0, 0, vr[2], 0) Qd.SetPort(w) Qd.TextFont(4) Qd.TextSize(9) self.ted = TE.TENew(dr, vr) self.ted.TEAutoView(1) self.... | 9c50abf80bc4b3d1659afe08ec3e68dfc0d60d7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9c50abf80bc4b3d1659afe08ec3e68dfc0d60d7c/ped.py |
match = mime_head.group(0, 1) newline = newline + line[:i] + mime_decode(match[1]) line = line[i + len(match[0]):] | match0, match1 = mime_head.group(0, 1) match1 = string.join(string.split(match1, '_'), ' ') newline = newline + line[:i] + mime_decode(match1) line = line[i + len(match0):] | def mime_decode_header(line): '''Decode a header line to 8bit.''' newline = '' while 1: i = mime_head.search(line) if i < 0: break match = mime_head.group(0, 1) newline = newline + line[:i] + mime_decode(match[1]) line = line[i + len(match[0]):] return newline + line | b833f63e50774e0cb1d83757644b4504440ecfdf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b833f63e50774e0cb1d83757644b4504440ecfdf/mimify.py |
id = 257 | def AskString(prompt, default = "", id=257, ok=None, cancel=None): """Display a PROMPT string and a text entry field with a DEFAULT string. Return the contents of the text entry field when the user clicks the OK button or presses Return. Return None when the user clicks the Cancel button. If omitted, DEFAULT is empty... | c4273b18acf6df204b3b8a05cf8b6edbf6b86496 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c4273b18acf6df204b3b8a05cf8b6edbf6b86496/EasyDialogs.py | |
return strftime(self.format, (item,)*9).capitalize() | return strftime(self.format, (item,)*8+(0,)).capitalize() | def __getitem__(self, item): if isinstance(item, int): if item < 0: item += self.len if not 0 <= item < self.len: raise IndexError, "out of range" return strftime(self.format, (item,)*9).capitalize() elif isinstance(item, type(slice(0))): return [self[e] for e in range(self.len)].__getslice__(item.start, item.stop) | 325b7674ea78afc939283d8008929700bbd2f753 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/325b7674ea78afc939283d8008929700bbd2f753/calendar.py |
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') | 66bc4a46a7fb3489b8760a3b1faf31bc78b9cc0f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66bc4a46a7fb3489b8760a3b1faf31bc78b9cc0f/setup.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.