rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
class MissingSectionHeaderError(Error):
class InterpolationDepthError(Error): def __init__(self, option, section, rawval): Error.__init__(self, "Value interpolation too deeply recursive:\n" "\tsection: [%s]\n" "\toption : %s\n" "\trawval : %s\n" % (section, option, rawval)) self.option = option self.section = section class ParsingError(Error): def __init__(...
def __init__(self, reference, option, section, rawval): Error.__init__(self, "Bad value substitution:\n" "\tsection: [%s]\n" "\toption : %s\n" "\tkey : %s\n" "\trawval : %s\n" % (section, option, reference, rawval)) self.reference = reference self.option = option self.section = section
cecb7da2a446f1c0227844233d9d438a365a7cc7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cecb7da2a446f1c0227844233d9d438a365a7cc7/ConfigParser.py
class ParsingError(Error): def __init__(self, filename): Error.__init__(self, 'File contains parsing errors: %s' % filename) self.filename = filename self.errors = [] def append(self, lineno, line): self.errors.append((lineno, line)) self._msg = self._msg + '\n\t[line %2d]: %s' % (lineno, line)
def __init__(self, filename, lineno, line): Error.__init__( self, 'File contains no section headers.\nfile: %s, line: %d\n%s' % (filename, lineno, line)) self.filename = filename self.lineno = lineno self.line = line
cecb7da2a446f1c0227844233d9d438a365a7cc7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cecb7da2a446f1c0227844233d9d438a365a7cc7/ConfigParser.py
return self.__sections.has_key(section)
return section in self.sections()
def has_section(self, section): """Indicate whether the named section is present in the configuration.
cecb7da2a446f1c0227844233d9d438a365a7cc7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cecb7da2a446f1c0227844233d9d438a365a7cc7/ConfigParser.py
try: opts = self.__sections[section] except KeyError: raise NoSectionError(section) return opts.has_key(option)
return option in self.options(section)
def has_option(self, section, option): """Return whether the given section has the given option.""" try: opts = self.__sections[section] except KeyError: raise NoSectionError(section) return opts.has_key(option)
cecb7da2a446f1c0227844233d9d438a365a7cc7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cecb7da2a446f1c0227844233d9d438a365a7cc7/ConfigParser.py
def get(self, section, option, raw=0, vars=None): """Get an option value for a given section.
cecb7da2a446f1c0227844233d9d438a365a7cc7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cecb7da2a446f1c0227844233d9d438a365a7cc7/ConfigParser.py
return value
break if value.find("%(") >= 0: raise InterpolationDepthError(option, section, rawval) return value
def get(self, section, option, raw=0, vars=None): """Get an option value for a given section.
cecb7da2a446f1c0227844233d9d438a365a7cc7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cecb7da2a446f1c0227844233d9d438a365a7cc7/ConfigParser.py
r'(?P<header>[-\w_.*,(){}]+)'
r'(?P<header>[-\w_.*,(){} ]+)'
def remove_section(self, section): """Remove a file section.""" if self.__sections.has_key(section): del self.__sections[section] return 1 else: return 0
cecb7da2a446f1c0227844233d9d438a365a7cc7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cecb7da2a446f1c0227844233d9d438a365a7cc7/ConfigParser.py
print "font=%r" % font
def __init__(self, root=None, font=None, name=None, exists=False, **options): if not root: root = Tkinter._default_root if font: # get actual settings corresponding to the given font font = root.tk.splitlist(root.tk.call("font", "actual", font)) else: font = self._set(options) if not name: name = "font" + str(id(self))...
4107b8a0be9cb1cc3c942c67da8c60ddb8e40d74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4107b8a0be9cb1cc3c942c67da8c60ddb8e40d74/tkFont.py
_tryorder = ["galeon", "skipstone", "mozilla", "netscape",
_tryorder = ["galeon", "skipstone", "mozilla-firefox", "mozilla-firebird", "mozilla", "netscape",
def open_new(self, url): self.open(url)
a6a97c6b82892ce489bf22e49f88129d407183b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a6a97c6b82892ce489bf22e49f88129d407183b4/webbrowser.py
if _iscommand("mozilla"): register("mozilla", None, Netscape("mozilla")) if _iscommand("netscape"): register("netscape", None, Netscape("netscape"))
for browser in ("mozilla-firefox", "mozilla-firebird", "mozilla", "netscape"): if _iscommand(browser): register(browser, None, Netscape(browser))
def open_new(self, url): self.open(url)
a6a97c6b82892ce489bf22e49f88129d407183b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a6a97c6b82892ce489bf22e49f88129d407183b4/webbrowser.py
_combine = { ' ': ' ', '. ': '-', ' .': '+', '..': '^' }
def dump(tag, x, lo, hi): for i in xrange(lo, hi): print tag, x[i],
e850a274f34167df5ea0e1806902b943c3682a26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e850a274f34167df5ea0e1806902b943c3682a26/ndiff.py
def fancy_replace(a, alo, ahi, b, blo, bhi): if TRACE: print '*** fancy_replace', alo, ahi, blo, bhi dump('>', a, alo, ahi) dump('<', b, blo, bhi) # don't synch up unless the lines have a similarity score of at # least cutoff; best_ratio tracks the best score seen so far best_ratio, cutoff = 0.74, 0.75 cruncher = Sequ...
e850a274f34167df5ea0e1806902b943c3682a26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e850a274f34167df5ea0e1806902b943c3682a26/ndiff.py
atags = atags + '.' * la btags = btags + '.' * lb
atags += '^' * la btags += '^' * lb
def fancy_replace(a, alo, ahi, b, blo, bhi): if TRACE: print '*** fancy_replace', alo, ahi, blo, bhi dump('>', a, alo, ahi) dump('<', b, blo, bhi) # don't synch up unless the lines have a similarity score of at # least cutoff; best_ratio tracks the best score seen so far best_ratio, cutoff = 0.74, 0.75 cruncher = Sequ...
e850a274f34167df5ea0e1806902b943c3682a26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e850a274f34167df5ea0e1806902b943c3682a26/ndiff.py
atags = atags + '.' * la
atags += '-' * la
def fancy_replace(a, alo, ahi, b, blo, bhi): if TRACE: print '*** fancy_replace', alo, ahi, blo, bhi dump('>', a, alo, ahi) dump('<', b, blo, bhi) # don't synch up unless the lines have a similarity score of at # least cutoff; best_ratio tracks the best score seen so far best_ratio, cutoff = 0.74, 0.75 cruncher = Sequ...
e850a274f34167df5ea0e1806902b943c3682a26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e850a274f34167df5ea0e1806902b943c3682a26/ndiff.py
btags = btags + '.' * lb
btags += '+' * lb
def fancy_replace(a, alo, ahi, b, blo, bhi): if TRACE: print '*** fancy_replace', alo, ahi, blo, bhi dump('>', a, alo, ahi) dump('<', b, blo, bhi) # don't synch up unless the lines have a similarity score of at # least cutoff; best_ratio tracks the best score seen so far best_ratio, cutoff = 0.74, 0.75 cruncher = Sequ...
e850a274f34167df5ea0e1806902b943c3682a26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e850a274f34167df5ea0e1806902b943c3682a26/ndiff.py
atags = atags + ' ' * la btags = btags + ' ' * lb
atags += ' ' * la btags += ' ' * lb
def fancy_replace(a, alo, ahi, b, blo, bhi): if TRACE: print '*** fancy_replace', alo, ahi, blo, bhi dump('>', a, alo, ahi) dump('<', b, blo, bhi) # don't synch up unless the lines have a similarity score of at # least cutoff; best_ratio tracks the best score seen so far best_ratio, cutoff = 0.74, 0.75 cruncher = Sequ...
e850a274f34167df5ea0e1806902b943c3682a26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e850a274f34167df5ea0e1806902b943c3682a26/ndiff.py
la, lb = len(atags), len(btags) if la < lb: atags = atags + ' ' * (lb - la) elif lb < la: btags = btags + ' ' * (la - lb) combined = map(lambda x,y: _combine[x+y], atags, btags) printq(aelt, belt, string.rstrip(string.join(combined, '')))
printq(aelt, belt, atags, btags)
def fancy_replace(a, alo, ahi, b, blo, bhi): if TRACE: print '*** fancy_replace', alo, ahi, blo, bhi dump('>', a, alo, ahi) dump('<', b, blo, bhi) # don't synch up unless the lines have a similarity score of at # least cutoff; best_ratio tracks the best score seen so far best_ratio, cutoff = 0.74, 0.75 cruncher = Sequ...
e850a274f34167df5ea0e1806902b943c3682a26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e850a274f34167df5ea0e1806902b943c3682a26/ndiff.py
def printq(aline, bline, qline):
def printq(aline, bline, atags, btags):
def printq(aline, bline, qline): common = min(count_leading(aline, "\t"), count_leading(bline, "\t")) common = min(common, count_leading(qline[:common], " ")) qline = "\t" * common + qline[common:] print '-', aline, '+', bline, '?', qline
e850a274f34167df5ea0e1806902b943c3682a26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e850a274f34167df5ea0e1806902b943c3682a26/ndiff.py
common = min(common, count_leading(qline[:common], " ")) qline = "\t" * common + qline[common:] print '-', aline, '+', bline, '?', qline
common = min(common, count_leading(atags[:common], " ")) print "-", aline, if count_leading(atags, " ") < len(atags): print "?", "\t" * common + atags[common:] print "+", bline, if count_leading(btags, " ") < len(btags): print "?", "\t" * common + btags[common:]
def printq(aline, bline, qline): common = min(count_leading(aline, "\t"), count_leading(bline, "\t")) common = min(common, count_leading(qline[:common], " ")) qline = "\t" * common + qline[common:] print '-', aline, '+', bline, '?', qline
e850a274f34167df5ea0e1806902b943c3682a26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e850a274f34167df5ea0e1806902b943c3682a26/ndiff.py
new = Request(newurl, req.get_data())
new = Request(newurl, req.get_data(), req.headers)
def http_error_302(self, req, fp, code, msg, headers): if headers.has_key('location'): newurl = headers['location'] elif headers.has_key('uri'): newurl = headers['uri'] else: return newurl = urlparse.urljoin(req.get_full_url(), newurl)
9b6c26fdd23687fbddc2e2daba87c16c76b2f32f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9b6c26fdd23687fbddc2e2daba87c16c76b2f32f/urllib2.py
rx = re.compile('[ \t]*([^ \t]+)[ \t]+realm="([^"]*)"')
rx = re.compile('[ \t]*([^ \t]+)[ \t]+realm="([^"]*)"', re.I)
def find_user_password(self, realm, authuri): user, password = HTTPPasswordMgr.find_user_password(self,realm,authuri) if user is not None: return user, password return HTTPPasswordMgr.find_user_password(self, None, authuri)
9e6896504f6621b865fbea34a8f1a4729e837c4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9e6896504f6621b865fbea34a8f1a4729e837c4a/urllib2.py
module = filename
module = filename or "<unknown>"
def warn_explicit(message, category, filename, lineno, module=None, registry=None): if module is None: module = filename if module[-3:].lower() == ".py": module = module[:-3] # XXX What about leading pathname? if registry is None: registry = {} if isinstance(message, Warning): text = str(message) category = message.__c...
995e7094055fa466233e078f237bc8b4b49f0174 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/995e7094055fa466233e078f237bc8b4b49f0174/warnings.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
384b608aeb32db1017935599fa5e0c61e4d02b07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/384b608aeb32db1017935599fa5e0c61e4d02b07/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 ...
384b608aeb32db1017935599fa5e0c61e4d02b07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/384b608aeb32db1017935599fa5e0c61e4d02b07/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 ...
384b608aeb32db1017935599fa5e0c61e4d02b07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/384b608aeb32db1017935599fa5e0c61e4d02b07/webbrowser.py
self.assertEqual( posixpath.expanduser("~") + "/", posixpath.expanduser("~/") )
if posixpath.expanduser("~") != '/': self.assertEqual( posixpath.expanduser("~") + "/", posixpath.expanduser("~/") )
def test_expanduser(self): self.assertEqual(posixpath.expanduser("foo"), "foo") try: import pwd except ImportError: pass else: self.assert_(isinstance(posixpath.expanduser("~/"), basestring)) self.assertEqual( posixpath.expanduser("~") + "/", posixpath.expanduser("~/") ) self.assert_(isinstance(posixpath.expanduser("~r...
db30339994b3d71237703a18c8cb210f50a3ad15 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/db30339994b3d71237703a18c8cb210f50a3ad15/test_posixpath.py
raise ValueError, "overflow in number field"
raise ValueError("overflow in number field")
def itn(n, digits=8, posix=False): """Convert a python number to a number field. """ # POSIX 1003.1-1988 requires numbers to be encoded as a string of # octal digits followed by a null-byte, this allows values up to # (8**(digits-1))-1. GNU tar allows storing numbers greater than # that if necessary. A leading 0200 byt...
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise IOError, "end of file reached"
raise IOError("end of file reached")
def copyfileobj(src, dst, length=None): """Copy length bytes from fileobj src to fileobj dst. If length is None, copy the entire content. """ if length == 0: return if length is None: shutil.copyfileobj(src, dst) return BUFSIZE = 16 * 1024 blocks, remainder = divmod(length, BUFSIZE) for b in xrange(blocks): buf = src....
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise IOError, "end of file reached"
raise IOError("end of file reached")
def copyfileobj(src, dst, length=None): """Copy length bytes from fileobj src to fileobj dst. If length is None, copy the entire content. """ if length == 0: return if length is None: shutil.copyfileobj(src, dst) return BUFSIZE = 16 * 1024 blocks, remainder = divmod(length, BUFSIZE) for b in xrange(blocks): buf = src....
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise CompressionError, "zlib module is not available"
raise CompressionError("zlib module is not available")
def __init__(self, name, mode, comptype, fileobj, bufsize): """Construct a _Stream object. """ self._extfileobj = True if fileobj is None: fileobj = _LowLevelFile(name, mode) self._extfileobj = False
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise CompressionError, "bz2 module is not available"
raise CompressionError("bz2 module is not available")
def __init__(self, name, mode, comptype, fileobj, bufsize): """Construct a _Stream object. """ self._extfileobj = True if fileobj is None: fileobj = _LowLevelFile(name, mode) self._extfileobj = False
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ReadError, "not a gzip file"
raise ReadError("not a gzip file")
def _init_read_gz(self): """Initialize for reading a gzip compressed fileobj. """ self.cmp = self.zlib.decompressobj(-self.zlib.MAX_WBITS) self.dbuf = ""
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise CompressionError, "unsupported compression method"
raise CompressionError("unsupported compression method")
def _init_read_gz(self): """Initialize for reading a gzip compressed fileobj. """ self.cmp = self.zlib.decompressobj(-self.zlib.MAX_WBITS) self.dbuf = ""
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise StreamError, "seeking backwards is not allowed"
raise StreamError("seeking backwards is not allowed")
def seek(self, pos=0): """Set the stream's file pointer to pos. Negative seeking is forbidden. """ if pos - self.pos >= 0: blocks, remainder = divmod(pos - self.pos, self.bufsize) for i in xrange(blocks): self.read(self.bufsize) self.read(remainder) else: raise StreamError, "seeking backwards is not allowed" return sel...
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ValueError, "file is closed"
raise ValueError("file is closed")
def _readnormal(self, size=None): """Read operation for regular files. """ if self.closed: raise ValueError, "file is closed" self.fileobj.seek(self.offset + self.pos) bytesleft = self.size - self.pos if size is None: bytestoread = bytesleft else: bytestoread = min(size, bytesleft) self.pos += bytestoread return self._...
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ValueError, "file is closed"
raise ValueError("file is closed")
def _readsparse(self, size=None): """Read operation for sparse files. """ if self.closed: raise ValueError, "file is closed"
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ValueError, "I/O operation on closed file"
raise ValueError("I/O operation on closed file")
def __iter__(self): """Get an iterator over the file object. """ if self.closed: raise ValueError, "I/O operation on closed file" return self
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ValueError, "truncated header"
raise ValueError("truncated header")
def frombuf(cls, buf): """Construct a TarInfo object from a 512 byte string buffer. """ if len(buf) != BLOCKSIZE: raise ValueError, "truncated header" if buf.count(NUL) == BLOCKSIZE: raise ValueError, "empty header"
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ValueError, "empty header"
raise ValueError("empty header")
def frombuf(cls, buf): """Construct a TarInfo object from a 512 byte string buffer. """ if len(buf) != BLOCKSIZE: raise ValueError, "truncated header" if buf.count(NUL) == BLOCKSIZE: raise ValueError, "empty header"
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ValueError, "invalid header"
raise ValueError("invalid header")
def frombuf(cls, buf): """Construct a TarInfo object from a 512 byte string buffer. """ if len(buf) != BLOCKSIZE: raise ValueError, "truncated header" if buf.count(NUL) == BLOCKSIZE: raise ValueError, "empty header"
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ValueError, "mode must be 'r', 'a' or 'w'"
raise ValueError("mode must be 'r', 'a' or 'w'")
def __init__(self, name=None, mode="r", fileobj=None): """Open an (uncompressed) tar archive `name'. `mode' is either 'r' to read from an existing archive, 'a' to append data to an existing file or 'w' to create a new file overwriting an existing one. `mode' defaults to 'r'. If `fileobj' is given, it is used for readin...
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ValueError, "nothing to open"
raise ValueError("nothing to open")
def open(cls, name=None, mode="r", fileobj=None, bufsize=20*512): """Open a tar archive for reading, writing or appending. Return an appropriate TarFile class.
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ReadError, "file could not be opened successfully"
raise ReadError("file could not be opened successfully")
def open(cls, name=None, mode="r", fileobj=None, bufsize=20*512): """Open a tar archive for reading, writing or appending. Return an appropriate TarFile class.
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise CompressionError, "unknown compression type %r" % comptype
raise CompressionError("unknown compression type %r" % comptype)
def open(cls, name=None, mode="r", fileobj=None, bufsize=20*512): """Open a tar archive for reading, writing or appending. Return an appropriate TarFile class.
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ValueError, "mode must be 'r' or 'w'"
raise ValueError("mode must be 'r' or 'w'")
def open(cls, name=None, mode="r", fileobj=None, bufsize=20*512): """Open a tar archive for reading, writing or appending. Return an appropriate TarFile class.
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ValueError, "undiscernible mode"
raise ValueError("undiscernible mode")
def open(cls, name=None, mode="r", fileobj=None, bufsize=20*512): """Open a tar archive for reading, writing or appending. Return an appropriate TarFile class.
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ValueError, "mode must be 'r', 'a' or 'w'"
raise ValueError("mode must be 'r', 'a' or 'w'")
def taropen(cls, name, mode="r", fileobj=None): """Open uncompressed tar archive name for reading or writing. """ if len(mode) > 1 or mode not in "raw": raise ValueError, "mode must be 'r', 'a' or 'w'" return cls(name, mode, fileobj)
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ValueError, "mode must be 'r' or 'w'"
raise ValueError("mode must be 'r' or 'w'")
def gzopen(cls, name, mode="r", fileobj=None, compresslevel=9): """Open gzip compressed tar archive name for reading or writing. Appending is not allowed. """ if len(mode) > 1 or mode not in "rw": raise ValueError, "mode must be 'r' or 'w'"
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise CompressionError, "gzip module is not available"
raise CompressionError("gzip module is not available")
def gzopen(cls, name, mode="r", fileobj=None, compresslevel=9): """Open gzip compressed tar archive name for reading or writing. Appending is not allowed. """ if len(mode) > 1 or mode not in "rw": raise ValueError, "mode must be 'r' or 'w'"
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ReadError, "not a gzip file"
raise ReadError("not a gzip file")
def gzopen(cls, name, mode="r", fileobj=None, compresslevel=9): """Open gzip compressed tar archive name for reading or writing. Appending is not allowed. """ if len(mode) > 1 or mode not in "rw": raise ValueError, "mode must be 'r' or 'w'"
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ValueError, "mode must be 'r' or 'w'."
raise ValueError("mode must be 'r' or 'w'.")
def bz2open(cls, name, mode="r", fileobj=None, compresslevel=9): """Open bzip2 compressed tar archive name for reading or writing. Appending is not allowed. """ if len(mode) > 1 or mode not in "rw": raise ValueError, "mode must be 'r' or 'w'."
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise CompressionError, "bz2 module is not available"
raise CompressionError("bz2 module is not available")
def bz2open(cls, name, mode="r", fileobj=None, compresslevel=9): """Open bzip2 compressed tar archive name for reading or writing. Appending is not allowed. """ if len(mode) > 1 or mode not in "rw": raise ValueError, "mode must be 'r' or 'w'."
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ReadError, "not a bzip2 file"
raise ReadError("not a bzip2 file")
def bz2open(cls, name, mode="r", fileobj=None, compresslevel=9): """Open bzip2 compressed tar archive name for reading or writing. Appending is not allowed. """ if len(mode) > 1 or mode not in "rw": raise ValueError, "mode must be 'r' or 'w'."
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise KeyError, "filename %r not found" % name
raise KeyError("filename %r not found" % name)
def getmember(self, name): """Return a TarInfo object for member `name'. If `name' can not be found in the archive, KeyError is raised. If a member occurs more than once in the archive, its last occurence is assumed to be the most up-to-date version. """ tarinfo = self._getmember(name) if tarinfo is None: raise KeyErro...
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ValueError, "file is too large (>= 8 GB)"
raise ValueError("file is too large (>= 8 GB)")
def addfile(self, tarinfo, fileobj=None): """Add the TarInfo object `tarinfo' to the archive. If `fileobj' is given, tarinfo.size bytes are read from it and added to the archive. You can create TarInfo objects using gettarinfo(). On Windows platforms, `fileobj' should always be opened with mode 'rb' to avoid irritation...
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ValueError, "linkname is too long (>%d)" \ % (LENGTH_LINK)
raise ValueError("linkname is too long (>%d)" % (LENGTH_LINK))
def addfile(self, tarinfo, fileobj=None): """Add the TarInfo object `tarinfo' to the archive. If `fileobj' is given, tarinfo.size bytes are read from it and added to the archive. You can create TarInfo objects using gettarinfo(). On Windows platforms, `fileobj' should always be opened with mode 'rb' to avoid irritation...
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ValueError, "name is too long (>%d)" \ % (LENGTH_NAME)
raise ValueError("name is too long (>%d)" % (LENGTH_NAME))
def addfile(self, tarinfo, fileobj=None): """Add the TarInfo object `tarinfo' to the archive. If `fileobj' is given, tarinfo.size bytes are read from it and added to the archive. You can create TarInfo objects using gettarinfo(). On Windows platforms, `fileobj' should always be opened with mode 'rb' to avoid irritation...
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise StreamError, "cannot extract (sym)link as file object"
raise StreamError("cannot extract (sym)link as file object")
def extractfile(self, member): """Extract a member from the archive as a file object. `member' may be a filename or a TarInfo object. If `member' is a regular file, a file-like object is returned. If `member' is a link, a file-like object is constructed from the link's target. If `member' is none of the above, None is ...
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ExtractError, "fifo not supported by system"
raise ExtractError("fifo not supported by system")
def makefifo(self, tarinfo, targetpath): """Make a fifo called targetpath. """ if hasattr(os, "mkfifo"): os.mkfifo(targetpath) else: raise ExtractError, "fifo not supported by system"
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ExtractError, "special devices not supported by system"
raise ExtractError("special devices not supported by system")
def makedev(self, tarinfo, targetpath): """Make a character or block device called targetpath. """ if not hasattr(os, "mknod") or not hasattr(os, "makedev"): raise ExtractError, "special devices not supported by system"
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise IOError, "link could not be created"
raise IOError("link could not be created")
def makelink(self, tarinfo, targetpath): """Make a (symbolic) link called targetpath. If it cannot be created (platform limitation), we try to make a copy of the referenced file instead of a link. """ linkpath = tarinfo.linkname try: if tarinfo.issym(): os.symlink(linkpath, targetpath) else: # See extract(). os.link(ta...
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ExtractError, "could not change owner"
raise ExtractError("could not change owner")
def chown(self, tarinfo, targetpath): """Set owner of targetpath according to tarinfo. """ if pwd and hasattr(os, "geteuid") and os.geteuid() == 0: # We have to be root to do so. try: g = grp.getgrnam(tarinfo.gname)[2] except KeyError: try: g = grp.getgrgid(tarinfo.gid)[2] except KeyError: g = os.getgid() try: u = pwd....
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ExtractError, "could not change mode"
raise ExtractError("could not change mode")
def chmod(self, tarinfo, targetpath): """Set file permissions of targetpath according to tarinfo. """ if hasattr(os, 'chmod'): try: os.chmod(targetpath, tarinfo.mode) except EnvironmentError, e: raise ExtractError, "could not change mode"
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ExtractError, "could not change modification time"
raise ExtractError("could not change modification time")
def utime(self, tarinfo, targetpath): """Set modification time of targetpath according to tarinfo. """ if not hasattr(os, 'utime'): return if sys.platform == "win32" and tarinfo.isdir(): # According to msdn.microsoft.com, it is an error (EACCES) # to use utime() on directories. return try: os.utime(targetpath, (tarinfo...
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
self._dbg(2, "0x%X: %s" % (self.offset, e))
self._dbg(2, "0x%X: empty or invalid block: %s" % (self.offset, e))
def next(self): """Return the next member of the archive as a TarInfo object, when TarFile is opened for reading. Return None if there is no more available. """ self._check("ra") if self.firstmember is not None: m = self.firstmember self.firstmember = None return m
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ReadError, str(e)
raise ReadError("empty, unreadable or compressed " "file: %s" % e)
def next(self): """Return the next member of the archive as a TarInfo object, when TarFile is opened for reading. Return None if there is no more available. """ self._check("ra") if self.firstmember is not None: m = self.firstmember self.firstmember = None return m
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise IOError, "%s is closed" % self.__class__.__name__
raise IOError("%s is closed" % self.__class__.__name__)
def _check(self, mode=None): """Check if TarFile is still open, and if the operation's mode corresponds to TarFile's mode. """ if self.closed: raise IOError, "%s is closed" % self.__class__.__name__ if mode is not None and self._mode not in mode: raise IOError, "bad operation for mode %r" % self._mode
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise IOError, "bad operation for mode %r" % self._mode
raise IOError("bad operation for mode %r" % self._mode)
def _check(self, mode=None): """Check if TarFile is still open, and if the operation's mode corresponds to TarFile's mode. """ if self.closed: raise IOError, "%s is closed" % self.__class__.__name__ if mode is not None and self._mode not in mode: raise IOError, "bad operation for mode %r" % self._mode
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
raise ValueError, "unknown compression constant"
raise ValueError("unknown compression constant")
def __init__(self, file, mode="r", compression=TAR_PLAIN): if compression == TAR_PLAIN: self.tarfile = TarFile.taropen(file, mode) elif compression == TAR_GZIPPED: self.tarfile = TarFile.gzopen(file, mode) else: raise ValueError, "unknown compression constant" if mode[0:1] == "r": members = self.tarfile.getmembers() fo...
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
ifp = open(args)
ifp = open(args[0])
def main(): global DEBUG # opts, args = getopt.getopt(sys.argv[1:], "D", ["debug"]) for opt, arg in opts: if opt in ("-D", "--debug"): DEBUG = DEBUG + 1 if len(args) == 0: ifp = sys.stdin ofp = sys.stdout elif len(args) == 1: ifp = open(args) ofp = sys.stdout elif len(args) == 2: ifp = open(args[0]) ofp = open(args[1],...
082fec83c8af353bd090af107d5cb3647fed99c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/082fec83c8af353bd090af107d5cb3647fed99c1/latex2esis.py
def test_05_no_pop_tops(self): self.run_test(no_pop_tops)
## def test_05_no_pop_tops(self):
ef70c4dadcacd8f988aaa366337187a233d67ae9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ef70c4dadcacd8f988aaa366337187a233d67ae9/test_trace.py
container.set_payload(msg)
container.attach(msg)
def _parsebody(self, container, fp): # Parse the body, but first split the payload on the content-type # boundary if present. boundary = container.get_boundary() isdigest = (container.get_type() == 'multipart/digest') # If there's a boundary, split the payload text into its constituent # parts and parse each separately...
d023012402c28000a8a1533ab4aa2455b6a4be4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d023012402c28000a8a1533ab4aa2455b6a4be4b/Parser.py
t = _translations.setdefault(key, class_(open(mofile, 'rb')))
t = _translations.get(key) if t is None: t = _translations.setdefault(key, class_(open(mofile, 'rb')))
def translation(domain, localedir=None, languages=None, class_=None): if class_ is None: class_ = GNUTranslations mofile = find(domain, localedir, languages) if mofile is None: raise IOError(ENOENT, 'No translation file found for domain', domain) key = os.path.abspath(mofile) # TBD: do we need to worry about the file p...
e07d26144bc287651413cc5f1e67510b55983344 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e07d26144bc287651413cc5f1e67510b55983344/gettext.py
def input(files=(), inplace=0, backup=""):
def input(files=None, inplace=0, backup=""):
def input(files=(), inplace=0, backup=""): global _state if _state and _state._file: raise RuntimeError, "input() already active" _state = FileInput(files, inplace, backup) return _state
413b6a4a69e7d1143fbf5d8036bf65adb7bced6c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/413b6a4a69e7d1143fbf5d8036bf65adb7bced6c/fileinput.py
def __init__(self, files=(), inplace=0, backup=""):
def __init__(self, files=None, inplace=0, backup=""):
def __init__(self, files=(), inplace=0, backup=""): if type(files) == type(''): files = (files,) else: files = tuple(files) if not files: files = tuple(sys.argv[1:]) if not files: files = ('-',) self._files = files self._inplace = inplace self._backup = backup self._savestdout = None self._output = None self._filename ...
413b6a4a69e7d1143fbf5d8036bf65adb7bced6c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/413b6a4a69e7d1143fbf5d8036bf65adb7bced6c/fileinput.py
files = tuple(files)
if files is None: files = sys.argv[1:]
def __init__(self, files=(), inplace=0, backup=""): if type(files) == type(''): files = (files,) else: files = tuple(files) if not files: files = tuple(sys.argv[1:]) if not files: files = ('-',) self._files = files self._inplace = inplace self._backup = backup self._savestdout = None self._output = None self._filename ...
413b6a4a69e7d1143fbf5d8036bf65adb7bced6c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/413b6a4a69e7d1143fbf5d8036bf65adb7bced6c/fileinput.py
files = tuple(sys.argv[1:]) if not files: files = ('-',)
files = ('-',) else: files = tuple(files)
def __init__(self, files=(), inplace=0, backup=""): if type(files) == type(''): files = (files,) else: files = tuple(files) if not files: files = tuple(sys.argv[1:]) if not files: files = ('-',) self._files = files self._inplace = inplace self._backup = backup self._savestdout = None self._output = None self._filename ...
413b6a4a69e7d1143fbf5d8036bf65adb7bced6c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/413b6a4a69e7d1143fbf5d8036bf65adb7bced6c/fileinput.py
except:
except AttributeError:
def close(self): self.sync() try: self.dict.close() except: pass self.dict = 0
5184326ad9da95589399812261faa8359532f7cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5184326ad9da95589399812261faa8359532f7cf/shelve.py
import imp
def load_dynamic(self, name, filename, file): if name not in self.ok_dynamic_modules: raise ImportError, "untrusted dynamic module: %s" % name if sys.modules.has_key(name): src = sys.modules[name] else: import imp src = imp.load_dynamic(name, filename, file) dst = self.copy_except(src, []) return dst
d6a6439e7c2781a1ffe46e50bdf9c9432bd08a42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d6a6439e7c2781a1ffe46e50bdf9c9432bd08a42/rexec.py
db.readfp(f) return db.types_map
db.readfp(f, True) return db.types_map[True]
def read_mime_types(file): try: f = open(file) except IOError: return None db = MimeTypes() db.readfp(f) return db.types_map
0b3b86b3273c4857e012732f9d1f861df055164f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0b3b86b3273c4857e012732f9d1f861df055164f/mimetypes.py
codecs.StreamReader.__init__(self,strict,errors)
codecs.StreamReader.__init__(self,stream,errors)
def __init__(self,stream,errors='strict',mapping=None):
3707af1c6fd31c337c2a36a51eb60e6612bae7e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3707af1c6fd31c337c2a36a51eb60e6612bae7e0/charmap.py
if optional and len(params) == 1: line = line[m.end():] else:
def subconvert(self, endchar=None, depth=0): stack = [] line = self.line if DEBUG and endchar: self.err_write( "subconvert(%s)\n line = %s\n" % (`endchar`, `line[:20]`)) while line: if line[0] == endchar and not stack: if DEBUG: self.err_write("subconvert() --> %s\n" % `line[1:21]`) self.line = line return line m = _c...
bf2763cf07522d5ef19fe1c77b99de178484ab7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bf2763cf07522d5ef19fe1c77b99de178484ab7b/latex2esis.py
if optional and type(params[0]) is type(()):
if optional and type(params[0]) is TupleType:
def subconvert(self, endchar=None, depth=0): stack = [] line = self.line if DEBUG and endchar: self.err_write( "subconvert(%s)\n line = %s\n" % (`endchar`, `line[:20]`)) while line: if line[0] == endchar and not stack: if DEBUG: self.err_write("subconvert() --> %s\n" % `line[1:21]`) self.line = line return line m = _c...
bf2763cf07522d5ef19fe1c77b99de178484ab7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bf2763cf07522d5ef19fe1c77b99de178484ab7b/latex2esis.py
if type(attrname) is type(""):
if type(attrname) is StringType:
def subconvert(self, endchar=None, depth=0): stack = [] line = self.line if DEBUG and endchar: self.err_write( "subconvert(%s)\n line = %s\n" % (`endchar`, `line[:20]`)) while line: if line[0] == endchar and not stack: if DEBUG: self.err_write("subconvert() --> %s\n" % `line[1:21]`) self.line = line return line m = _c...
bf2763cf07522d5ef19fe1c77b99de178484ab7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bf2763cf07522d5ef19fe1c77b99de178484ab7b/latex2esis.py
elif type(attrname) is type(()):
elif type(attrname) is TupleType:
def subconvert(self, endchar=None, depth=0): stack = [] line = self.line if DEBUG and endchar: self.err_write( "subconvert(%s)\n line = %s\n" % (`endchar`, `line[:20]`)) while line: if line[0] == endchar and not stack: if DEBUG: self.err_write("subconvert() --> %s\n" % `line[1:21]`) self.line = line return line m = _c...
bf2763cf07522d5ef19fe1c77b99de178484ab7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bf2763cf07522d5ef19fe1c77b99de178484ab7b/latex2esis.py
elif type(attrname) is type([]):
elif type(attrname) is ListType:
def subconvert(self, endchar=None, depth=0): stack = [] line = self.line if DEBUG and endchar: self.err_write( "subconvert(%s)\n line = %s\n" % (`endchar`, `line[:20]`)) while line: if line[0] == endchar and not stack: if DEBUG: self.err_write("subconvert() --> %s\n" % `line[1:21]`) self.line = line return line m = _c...
bf2763cf07522d5ef19fe1c77b99de178484ab7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bf2763cf07522d5ef19fe1c77b99de178484ab7b/latex2esis.py
dbgmsg("subconvert() ==> " + `line[:20]`)
def subconvert(self, endchar=None, depth=0): stack = [] line = self.line if DEBUG and endchar: self.err_write( "subconvert(%s)\n line = %s\n" % (`endchar`, `line[:20]`)) while line: if line[0] == endchar and not stack: if DEBUG: self.err_write("subconvert() --> %s\n" % `line[1:21]`) self.line = line return line m = _c...
bf2763cf07522d5ef19fe1c77b99de178484ab7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bf2763cf07522d5ef19fe1c77b99de178484ab7b/latex2esis.py
if params and type(params[-1]) is type('') \
if params and type(params[-1]) is StringType \
def subconvert(self, endchar=None, depth=0): stack = [] line = self.line if DEBUG and endchar: self.err_write( "subconvert(%s)\n line = %s\n" % (`endchar`, `line[:20]`)) while line: if line[0] == endchar and not stack: if DEBUG: self.err_write("subconvert() --> %s\n" % `line[1:21]`) self.line = line return line m = _c...
bf2763cf07522d5ef19fe1c77b99de178484ab7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bf2763cf07522d5ef19fe1c77b99de178484ab7b/latex2esis.py
and type(conversion) is not type(""):
and type(conversion) is not StringType:
def subconvert(self, endchar=None, depth=0): stack = [] line = self.line if DEBUG and endchar: self.err_write( "subconvert(%s)\n line = %s\n" % (`endchar`, `line[:20]`)) while line: if line[0] == endchar and not stack: if DEBUG: self.err_write("subconvert() --> %s\n" % `line[1:21]`) self.line = line return line m = _c...
bf2763cf07522d5ef19fe1c77b99de178484ab7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bf2763cf07522d5ef19fe1c77b99de178484ab7b/latex2esis.py
dummy, fp = os.popen4(cmd, "r") dummy.close()
child = popen2.Popen4(cmd) child.tochild.close()
def _cmd(self, output, dir, *cmditems): """Internal routine to run a shell command in a given directory.""" cmd = ("cd \"%s\"; " % dir) + " ".join(cmditems) if output: output.write("+ %s\n" % cmd) if NO_EXECUTE: return 0 dummy, fp = os.popen4(cmd, "r") dummy.close() while 1: line = fp.readline() if not line: break if ...
c5fa057f06fde346ae334f98efa0a96c31c4c62e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c5fa057f06fde346ae334f98efa0a96c31c4c62e/pimp.py
line = fp.readline()
line = child.fromchild.readline()
def _cmd(self, output, dir, *cmditems): """Internal routine to run a shell command in a given directory.""" cmd = ("cd \"%s\"; " % dir) + " ".join(cmditems) if output: output.write("+ %s\n" % cmd) if NO_EXECUTE: return 0 dummy, fp = os.popen4(cmd, "r") dummy.close() while 1: line = fp.readline() if not line: break if ...
c5fa057f06fde346ae334f98efa0a96c31c4c62e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c5fa057f06fde346ae334f98efa0a96c31c4c62e/pimp.py
rv = fp.close() return rv
return child.wait()
def _cmd(self, output, dir, *cmditems): """Internal routine to run a shell command in a given directory.""" cmd = ("cd \"%s\"; " % dir) + " ".join(cmditems) if output: output.write("+ %s\n" % cmd) if NO_EXECUTE: return 0 dummy, fp = os.popen4(cmd, "r") dummy.close() while 1: line = fp.readline() if not line: break if ...
c5fa057f06fde346ae334f98efa0a96c31c4c62e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c5fa057f06fde346ae334f98efa0a96c31c4c62e/pimp.py
return "install %s: running \"%s\" failed" % self.fullname()
return "install %s: running \"%s\" failed" % \ (self.fullname(), installcmd)
def installPackageOnly(self, output=None): """Install a single source package. If output is given it should be a file-like object and it will receive a log of what happened.""" if self._dict.has_key('Pre-install-command'): if self._cmd(output, self._buildDirname, self._dict['Pre-install-command']): return "pre-instal...
c5fa057f06fde346ae334f98efa0a96c31c4c62e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c5fa057f06fde346ae334f98efa0a96c31c4c62e/pimp.py
except error_proto(val):
except error_proto, val:
def quit(self): """Signoff: commit changes on server, unlock mailbox, close connection.""" try: resp = self._shortcmd('QUIT') except error_proto(val): resp = val self.file.close() self.sock.close() del self.file, self.sock return resp
687ad76ca16d6b8bf53b2ced6111f69d14d88a28 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/687ad76ca16d6b8bf53b2ced6111f69d14d88a28/poplib.py
strip_dir=python_build,
strip_dir=0,
def _setup_compile(self, outdir, macros, incdirs, sources, depends, extra): """Process arguments and decide which source files to compile.
2132d8fd7252ef1da5aada223cc614a6ebef25a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2132d8fd7252ef1da5aada223cc614a6ebef25a2/ccompiler.py
objects = self.object_filenames(sources, strip_dir=python_build, output_dir=output_dir)
objects = self.object_filenames(sources, output_dir=output_dir)
def _prep_compile(self, sources, output_dir, depends=None): """Decide which souce files must be recompiled.
2132d8fd7252ef1da5aada223cc614a6ebef25a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2132d8fd7252ef1da5aada223cc614a6ebef25a2/ccompiler.py
_platform_cache = None _platform_aliased_cache = None
_platform_cache = {True:None, False:None} _platform_aliased_cache = {True:None, False:None}
def python_compiler(): """ Returns a string identifying the compiler used for compiling Python. """ return _sys_version()[3]
51b92569a7dcb6d35980977565c3b69cb6767752 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/51b92569a7dcb6d35980977565c3b69cb6767752/platform.py
if not aliased and (_platform_cache is not None): return _platform_cache elif _platform_aliased_cache is not None: return _platform_aliased_cache
if not aliased and (_platform_cache[bool(terse)] is not None): return _platform_cache[bool(terse)] elif _platform_aliased_cache[bool(terse)] is not None: return _platform_aliased_cache[bool(terse)]
def platform(aliased=0, terse=0): """ Returns a single string identifying the underlying platform with as much useful information as possible (but no more :). The output is intended to be human readable rather than machine parseable. It may look different on different platforms and this is intended. If "aliased" is ...
51b92569a7dcb6d35980977565c3b69cb6767752 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/51b92569a7dcb6d35980977565c3b69cb6767752/platform.py
_platform_aliased_cache = platform
_platform_aliased_cache[bool(terse)] = platform
def platform(aliased=0, terse=0): """ Returns a single string identifying the underlying platform with as much useful information as possible (but no more :). The output is intended to be human readable rather than machine parseable. It may look different on different platforms and this is intended. If "aliased" is ...
51b92569a7dcb6d35980977565c3b69cb6767752 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/51b92569a7dcb6d35980977565c3b69cb6767752/platform.py
_platform_cache = platform
_platform_cache[bool(terse)] = platform
def platform(aliased=0, terse=0): """ Returns a single string identifying the underlying platform with as much useful information as possible (but no more :). The output is intended to be human readable rather than machine parseable. It may look different on different platforms and this is intended. If "aliased" is ...
51b92569a7dcb6d35980977565c3b69cb6767752 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/51b92569a7dcb6d35980977565c3b69cb6767752/platform.py