rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
print "found", `title[start:m.end()]` | def clean_title(title): title = raisebox_rx.sub("", title) title = hackscore_rx.sub(r"\\_", title) pos = 0 while 1: m = title_rx.search(title, pos) if m: start = m.start() print "found", `title[start:m.end()]` if title[start:start+15] != "\\textunderscore": title = title[:start] + title[m.end():] pos = start + 1 else: ... | eff1f7622aaa4d0ba180290f614e49543e05eef1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eff1f7622aaa4d0ba180290f614e49543e05eef1/toc2bkm.py | |
print `title` | def clean_title(title): title = raisebox_rx.sub("", title) title = hackscore_rx.sub(r"\\_", title) pos = 0 while 1: m = title_rx.search(title, pos) if m: start = m.start() print "found", `title[start:m.end()]` if title[start:start+15] != "\\textunderscore": title = title[:start] + title[m.end():] pos = start + 1 else: ... | eff1f7622aaa4d0ba180290f614e49543e05eef1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eff1f7622aaa4d0ba180290f614e49543e05eef1/toc2bkm.py | |
if not os.isatty(slave_fd): raise TestFailed, "slave_fd is not a tty" | def debug(msg): pass | 4e8f5492c5c74b3cb3a8448fa8bf482d4e8a3d74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4e8f5492c5c74b3cb3a8448fa8bf482d4e8a3d74/test_pty.py | |
if ' raise BuildError, "BuildApplet could destroy your sourcefile on OSX, please rename: %s" % filename | def process(template, filename, destname, copy_codefragment, rsrcname=None, others=[], raw=0, progress="default"): if progress == "default": progress = EasyDialogs.ProgressBar("Processing %s..."%os.path.split(filename)[1], 120) progress.label("Compiling...") progress.inc(0) # Read the source and compile it # (there's... | 58ba80a6a66d74f7b9dcc40fb8c08a2201749194 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/58ba80a6a66d74f7b9dcc40fb8c08a2201749194/buildtools.py | |
self.tagpre = Int2AP(random.randint(0, 31999)) | self.tagpre = Int2AP(random.randint(4096, 65535)) | def __init__(self, host = '', port = IMAP4_PORT): self.debug = Debug self.state = 'LOGOUT' self.literal = None # A literal argument to a command self.tagged_commands = {} # Tagged commands awaiting response self.untagged_responses = {} # {typ: [data, ...], ...} self.continuation_response = '' # Las... | 2dfc168bc3b92a0087a3a619b7f793240528936a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2dfc168bc3b92a0087a3a619b7f793240528936a/imaplib.py |
if (new == Py_None) { | if (new == NULL || new == Py_None) { | def outputFreeIt(self, itselfname): Output("DisposeDialog(%s);", itselfname) | 599ce9c6c2299b085011c426f0893d494cf9403d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/599ce9c6c2299b085011c426f0893d494cf9403d/dlgsupport.py |
self._out.write(' %s="%s"' % (name, escape(value))) | self._out.write(' %s=%s' % (name, quoteattr(value))) | def startElement(self, name, attrs): self._out.write('<' + name) for (name, value) in attrs.items(): self._out.write(' %s="%s"' % (name, escape(value))) self._out.write('>') | dad91dd1e90222cfae4543eb290e2b2fa99192c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/dad91dd1e90222cfae4543eb290e2b2fa99192c2/saxutils.py |
self._out.write(' %s="%s"' % (name, escape(value))) | self._out.write(' %s=%s' % (name, quoteattr(value))) | def startElementNS(self, name, qname, attrs): if name[0] is None: # if the name was not namespace-scoped, use the unqualified part name = name[1] else: # else try to restore the original prefix from the namespace name = self._current_context[name[0]] + ":" + name[1] self._out.write('<' + name) | dad91dd1e90222cfae4543eb290e2b2fa99192c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/dad91dd1e90222cfae4543eb290e2b2fa99192c2/saxutils.py |
flags = 0 | flags = select.POLLERR | select.POLLHUP | select.POLLNVAL | def poll2(timeout=0.0, map=None): # Use the poll() support added to the select module in Python 2.0 if map is None: map = socket_map if timeout is not None: # timeout is in milliseconds timeout = int(timeout*1000) pollster = select.poll() if map: for fd, obj in map.items(): flags = 0 if obj.readable(): flags = select.P... | 0ebbbe30f1652c71133542f237f69a008395a8e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0ebbbe30f1652c71133542f237f69a008395a8e7/asyncore.py |
flags = select.POLLIN | flags = select.POLLIN | select.POLLPRI | def poll2(timeout=0.0, map=None): # Use the poll() support added to the select module in Python 2.0 if map is None: map = socket_map if timeout is not None: # timeout is in milliseconds timeout = int(timeout*1000) pollster = select.poll() if map: for fd, obj in map.items(): flags = 0 if obj.readable(): flags = select.P... | 0ebbbe30f1652c71133542f237f69a008395a8e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0ebbbe30f1652c71133542f237f69a008395a8e7/asyncore.py |
return WeakValuedItemIterator(self) | for wr in self.data.itervalues(): value = wr() if value is not None: yield wr.key, value | def iteritems(self): return WeakValuedItemIterator(self) | 61146790992e0a00b76a6bf6ecc9e53289a1ecd7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/61146790992e0a00b76a6bf6ecc9e53289a1ecd7/weakref.py |
__iter__ = iterkeys | def __iter__(self): return self.data.iterkeys() | def iterkeys(self): return self.data.iterkeys() | 61146790992e0a00b76a6bf6ecc9e53289a1ecd7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/61146790992e0a00b76a6bf6ecc9e53289a1ecd7/weakref.py |
return WeakValuedValueIterator(self) | for wr in self.data.itervalues(): obj = wr() if obj is not None: yield obj | def itervalues(self): return WeakValuedValueIterator(self) | 61146790992e0a00b76a6bf6ecc9e53289a1ecd7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/61146790992e0a00b76a6bf6ecc9e53289a1ecd7/weakref.py |
return WeakKeyedItemIterator(self) | for wr, value in self.data.iteritems(): key = wr() if key is not None: yield key, value | def iteritems(self): return WeakKeyedItemIterator(self) | 61146790992e0a00b76a6bf6ecc9e53289a1ecd7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/61146790992e0a00b76a6bf6ecc9e53289a1ecd7/weakref.py |
return WeakKeyedKeyIterator(self) __iter__ = iterkeys | for wr in self.data.iterkeys(): obj = wr() if obj is not None: yield obj def __iter__(self): return self.iterkeys() | def iterkeys(self): return WeakKeyedKeyIterator(self) | 61146790992e0a00b76a6bf6ecc9e53289a1ecd7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/61146790992e0a00b76a6bf6ecc9e53289a1ecd7/weakref.py |
def WeakKeyedKeyIterator(weakdict): for wr in weakdict.data.iterkeys(): obj = wr() if obj is not None: yield obj def WeakKeyedItemIterator(weakdict): for wr, value in weakdict.data.iteritems(): key = wr() if key is not None: yield key, value def WeakValuedValueIterator(weakdict): for wr in weakdict.data.itervalues(... | def update(self, dict=None, **kwargs): d = self.data if dict is not None: if not hasattr(dict, "items"): dict = type({})(dict) for key, value in dict.items(): d[ref(key, self._remove)] = value if len(kwargs): self.update(kwargs) | 61146790992e0a00b76a6bf6ecc9e53289a1ecd7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/61146790992e0a00b76a6bf6ecc9e53289a1ecd7/weakref.py | |
except TypeError: pass else: raise TestFailed, 'expected TypeError' | except (AttributeError, TypeError): pass else: raise TestFailed, 'expected TypeError or AttributeError' | def b(): 'my docstring' pass | 56ff387a7e625a692851e2e5ffdea096b72831f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/56ff387a7e625a692851e2e5ffdea096b72831f7/test_funcattrs.py |
except TypeError: pass | except (AttributeError, TypeError): pass | def b(): 'my docstring' pass | 56ff387a7e625a692851e2e5ffdea096b72831f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/56ff387a7e625a692851e2e5ffdea096b72831f7/test_funcattrs.py |
except TypeError: | except (AttributeError, TypeError): | def cantset(obj, name, value): verify(hasattr(obj, name)) # Otherwise it's probably a typo try: setattr(obj, name, value) except TypeError: pass else: raise TestFailed, "shouldn't be able to set %s to %r" % (name, value) try: delattr(obj, name) except TypeError: pass else: raise TestFailed, "shouldn't be able to del %s... | 56ff387a7e625a692851e2e5ffdea096b72831f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/56ff387a7e625a692851e2e5ffdea096b72831f7/test_funcattrs.py |
except TypeError: | except (AttributeError, TypeError): | def cantset(obj, name, value): verify(hasattr(obj, name)) # Otherwise it's probably a typo try: setattr(obj, name, value) except TypeError: pass else: raise TestFailed, "shouldn't be able to set %s to %r" % (name, value) try: delattr(obj, name) except TypeError: pass else: raise TestFailed, "shouldn't be able to del %s... | 56ff387a7e625a692851e2e5ffdea096b72831f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/56ff387a7e625a692851e2e5ffdea096b72831f7/test_funcattrs.py |
exts.append( Extension('errno', ['errnomodule.c']) ) | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 5f8a23f32fb32476d97c0be4c7da2dea5efe3393 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5f8a23f32fb32476d97c0be4c7da2dea5efe3393/setup.py | |
self.dict[headerseen] = string.strip(line[len(headerseen)+2:]) | self.dict[headerseen] = string.strip(line[len(headerseen)+1:]) | def readheaders(self): """Read header lines. Read header lines up to the entirely blank line that terminates them. The (normally blank) line that ends the headers is skipped, but not included in the returned list. If a non-header line ends the headers, (which is an error), an attempt is made to backspace over it; it ... | d8957d6802551c6510974667e102027ed07a0fa5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d8957d6802551c6510974667e102027ed07a0fa5/rfc822.py |
dbgmsg("%s<%s> at %s" % (" "*depth, name, point)) | dbgmsg("pushing <%s> at %s" % (name, point)) | def pushing(name, point, depth): dbgmsg("%s<%s> at %s" % (" "*depth, name, point)) | 96e4a06fa6de789770f154fa651adcf057c57fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96e4a06fa6de789770f154fa651adcf057c57fcf/latex2esis.py |
dbgmsg("%s</%s> at %s" % (" "*depth, name, point)) class Conversion: def __init__(self, ifp, ofp, table=None, discards=(), autoclosing=()): | dbgmsg("popping </%s> at %s" % (name, point)) class _Stack(UserList.UserList): StringType = type('') def append(self, entry): if type(entry) is not self.StringType: raise LaTeXFormatError("cannot push non-string on stack: " + `entry`) sys.stderr.write("%s<%s>\n" % (" "*len(self.data), entry)) self.data.append(entry)... | def popping(name, point, depth): dbgmsg("%s</%s> at %s" % (" "*depth, name, point)) | 96e4a06fa6de789770f154fa651adcf057c57fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96e4a06fa6de789770f154fa651adcf057c57fcf/latex2esis.py |
self.err_write = sys.stderr.write | def __init__(self, ifp, ofp, table=None, discards=(), autoclosing=()): self.ofp_stack = [ofp] self.pop_output() self.table = table self.discards = discards self.autoclosing = autoclosing self.line = string.join(map(string.rstrip, ifp.readlines()), "\n") self.err_write = sys.stderr.write self.preamble = 1 | 96e4a06fa6de789770f154fa651adcf057c57fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96e4a06fa6de789770f154fa651adcf057c57fcf/latex2esis.py | |
stack = [] | stack = self.stack | 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... | 96e4a06fa6de789770f154fa651adcf057c57fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96e4a06fa6de789770f154fa651adcf057c57fcf/latex2esis.py |
if DEBUG and endchar: self.err_write( "subconvert(%s)\n line = %s\n" % (`endchar`, `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... | 96e4a06fa6de789770f154fa651adcf057c57fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96e4a06fa6de789770f154fa651adcf057c57fcf/latex2esis.py | |
if DEBUG: self.err_write("subconvert() --> %s\n" % `line[1:21]`) | 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... | 96e4a06fa6de789770f154fa651adcf057c57fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96e4a06fa6de789770f154fa651adcf057c57fcf/latex2esis.py | |
stack = [] | 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... | 96e4a06fa6de789770f154fa651adcf057c57fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96e4a06fa6de789770f154fa651adcf057c57fcf/latex2esis.py | |
self.err_write("stack: %s\n" % `stack`) raise LaTeXFormatError( "environment close for %s doesn't match" % envname) | raise LaTeXStackError(envname, stack) | 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... | 96e4a06fa6de789770f154fa651adcf057c57fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96e4a06fa6de789770f154fa651adcf057c57fcf/latex2esis.py |
line = line[m.end(1):] | line = line[m.end(1):] | 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... | 96e4a06fa6de789770f154fa651adcf057c57fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96e4a06fa6de789770f154fa651adcf057c57fcf/latex2esis.py |
pushing(macroname, "a", depth + len(stack)) | 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... | 96e4a06fa6de789770f154fa651adcf057c57fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96e4a06fa6de789770f154fa651adcf057c57fcf/latex2esis.py | |
pushing(macroname, "b", len(stack) + depth) | 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... | 96e4a06fa6de789770f154fa651adcf057c57fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96e4a06fa6de789770f154fa651adcf057c57fcf/latex2esis.py | |
if DEBUG: self.err_write("subconvert() --> %s\n" % `line[1:21]`) | 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... | 96e4a06fa6de789770f154fa651adcf057c57fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96e4a06fa6de789770f154fa651adcf057c57fcf/latex2esis.py | |
def convert(self): self.subconvert() | def convert(self): self.subconvert() | 96e4a06fa6de789770f154fa651adcf057c57fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96e4a06fa6de789770f154fa651adcf057c57fcf/latex2esis.py | |
def convert(ifp, ofp, table={}, discards=(), autoclosing=()): | class NewConversion(BaseConversion): def __init__(self, ifp, ofp, table={}): BaseConversion.__init__(self, ifp, ofp, table) self.discards = [] def subconvert(self, endchar=None, depth=0): stack = new_stack() line = self.line while line: if line[0] == endchar and not stack: self.line = line return line m = _commen... | def convert(ifp, ofp, table={}, discards=(), autoclosing=()): c = Conversion(ifp, ofp, table, discards, autoclosing) try: c.convert() except IOError, (err, msg): if err != errno.EPIPE: raise | 96e4a06fa6de789770f154fa651adcf057c57fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96e4a06fa6de789770f154fa651adcf057c57fcf/latex2esis.py |
while line and line[0] in " %\n\t": | while line and line[0] in " %\n\t\r": | def skip_white(line): while line and line[0] in " %\n\t": line = string.lstrip(line[1:]) return line | 96e4a06fa6de789770f154fa651adcf057c57fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96e4a06fa6de789770f154fa651adcf057c57fcf/latex2esis.py |
if len(sys.argv) == 2: ifp = open(sys.argv[1]) | global DEBUG convert = new_convert newstyle = 1 opts, args = getopt.getopt(sys.argv[1:], "Dn", ["debug", "new"]) for opt, arg in opts: if opt in ("-n", "--new"): convert = new_convert newstyle = 1 elif opt in ("-o", "--old"): convert = old_convert newstyle = 0 elif opt in ("-D", "--debug"): DEBUG = DEBUG + 1 if len(ar... | def main(): if len(sys.argv) == 2: ifp = open(sys.argv[1]) ofp = sys.stdout elif len(sys.argv) == 3: ifp = open(sys.argv[1]) ofp = open(sys.argv[2], "w") else: usage() sys.exit(2) convert(ifp, ofp, { # entries have the form: # name: ([attribute names], is1stOptional, isEmpty, isEnv, nocontent) # attribute names can be:... | 96e4a06fa6de789770f154fa651adcf057c57fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96e4a06fa6de789770f154fa651adcf057c57fcf/latex2esis.py |
elif len(sys.argv) == 3: ifp = open(sys.argv[1]) ofp = open(sys.argv[2], "w") | elif len(args) == 1: ifp = open(args) ofp = sys.stdout elif len(args) == 2: ifp = open(args[0]) ofp = open(args[1], "w") | def main(): if len(sys.argv) == 2: ifp = open(sys.argv[1]) ofp = sys.stdout elif len(sys.argv) == 3: ifp = open(sys.argv[1]) ofp = open(sys.argv[2], "w") else: usage() sys.exit(2) convert(ifp, ofp, { # entries have the form: # name: ([attribute names], is1stOptional, isEmpty, isEnv, nocontent) # attribute names can be:... | 96e4a06fa6de789770f154fa651adcf057c57fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96e4a06fa6de789770f154fa651adcf057c57fcf/latex2esis.py |
convert(ifp, ofp, { | table = { | def main(): if len(sys.argv) == 2: ifp = open(sys.argv[1]) ofp = sys.stdout elif len(sys.argv) == 3: ifp = open(sys.argv[1]) ofp = open(sys.argv[2], "w") else: usage() sys.exit(2) convert(ifp, ofp, { # entries have the form: # name: ([attribute names], is1stOptional, isEmpty, isEnv, nocontent) # attribute names can be:... | 96e4a06fa6de789770f154fa651adcf057c57fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96e4a06fa6de789770f154fa651adcf057c57fcf/latex2esis.py |
"appendix": ([], 0, 1, 0, 0), | def main(): if len(sys.argv) == 2: ifp = open(sys.argv[1]) ofp = sys.stdout elif len(sys.argv) == 3: ifp = open(sys.argv[1]) ofp = open(sys.argv[2], "w") else: usage() sys.exit(2) convert(ifp, ofp, { # entries have the form: # name: ([attribute names], is1stOptional, isEmpty, isEnv, nocontent) # attribute names can be:... | 96e4a06fa6de789770f154fa651adcf057c57fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96e4a06fa6de789770f154fa651adcf057c57fcf/latex2esis.py | |
"catcode": ([], 0, 1, 0, 0), | def main(): if len(sys.argv) == 2: ifp = open(sys.argv[1]) ofp = sys.stdout elif len(sys.argv) == 3: ifp = open(sys.argv[1]) ofp = open(sys.argv[2], "w") else: usage() sys.exit(2) convert(ifp, ofp, { # entries have the form: # name: ([attribute names], is1stOptional, isEmpty, isEnv, nocontent) # attribute names can be:... | 96e4a06fa6de789770f154fa651adcf057c57fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96e4a06fa6de789770f154fa651adcf057c57fcf/latex2esis.py | |
}, | } if newstyle: table = load_table(open(os.path.join(sys.path[0], 'conversion.xml'))) convert(ifp, ofp, table, | def main(): if len(sys.argv) == 2: ifp = open(sys.argv[1]) ofp = sys.stdout elif len(sys.argv) == 3: ifp = open(sys.argv[1]) ofp = open(sys.argv[2], "w") else: usage() sys.exit(2) convert(ifp, ofp, { # entries have the form: # name: ([attribute names], is1stOptional, isEmpty, isEnv, nocontent) # attribute names can be:... | 96e4a06fa6de789770f154fa651adcf057c57fcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96e4a06fa6de789770f154fa651adcf057c57fcf/latex2esis.py |
value = _EmptyClass() value.__class__ = klass else: | try: value = _EmptyClass() value.__class__ = klass except RuntimeError: pass if not instantiated: | def load_inst(self): k = self.marker() args = tuple(self.stack[k+1:]) del self.stack[k:] module = self.readline()[:-1] name = self.readline()[:-1] klass = self.find_class(module, name) | abe2a457de09d728ddd0704fc1de855adf263944 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/abe2a457de09d728ddd0704fc1de855adf263944/pickle.py |
value = _EmptyClass() value.__class__ = klass else: | try: value = _EmptyClass() value.__class__ = klass instantiated = 1 except RuntimeError: pass if not instantiated: | def load_obj(self): stack = self.stack k = self.marker() klass = stack[k + 1] del stack[k + 1] args = tuple(stack[k + 1:]) del stack[k:] | abe2a457de09d728ddd0704fc1de855adf263944 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/abe2a457de09d728ddd0704fc1de855adf263944/pickle.py |
inst.__dict__.update(value) | try: inst.__dict__.update(value) except RuntimeError: for k, v in value.items(): setattr(inst, k, v) | def load_build(self): stack = self.stack value = stack[-1] del stack[-1] inst = stack[-1] try: setstate = inst.__setstate__ except AttributeError: inst.__dict__.update(value) else: setstate(value) | abe2a457de09d728ddd0704fc1de855adf263944 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/abe2a457de09d728ddd0704fc1de855adf263944/pickle.py |
if sys.maxint == 2**32-1: | if sys.maxint == 2**31-1: | def test_exc(formatstr, args, exception, excmsg): try: testformat(formatstr, args) except exception, exc: if str(exc) == excmsg: if verbose: print "yes" else: if verbose: print 'no' print 'Unexpected ', exception, ':', repr(str(exc)) except: if verbose: print 'no' print 'Unexpected exception' raise else: raise TestFail... | 457bf91a7fb1ab628a94fe740450f137b4ee1b92 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/457bf91a7fb1ab628a94fe740450f137b4ee1b92/test_format.py |
"""Normalize case of pathname. Makes all characters lowercase and all slashes into backslashes""" return string.translate(s, _normtable) | """Normalize case of pathname. Makes all characters lowercase and all slashes into backslashes. """ return string.lower(string.replace(s, "/", "\\")) | def normcase(s): """Normalize case of pathname. Makes all characters lowercase and all | 16a0bc278e34ca5b1b1717f21b9e6a4c4b2059f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/16a0bc278e34ca5b1b1717f21b9e6a4c4b2059f9/ntpath.py |
def subn(self, repl, source, count=0): """subn(repl, string[, count=0]) -> tuple | 6f7c3431c80b93d0b82e1d1a2d087192f9f9c590 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6f7c3431c80b93d0b82e1d1a2d087192f9f9c590/pre.py | ||
except error: | except (error, TypeError): | def subn(self, repl, source, count=0): """subn(repl, string[, count=0]) -> tuple | 6f7c3431c80b93d0b82e1d1a2d087192f9f9c590 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6f7c3431c80b93d0b82e1d1a2d087192f9f9c590/pre.py |
assert u"%r, %r" % (u"abc", "abc") == u"u'abc', 'abc'" | value = u"%r, %r" % (u"abc", "abc") if value != u"u'abc', 'abc'": print '*** formatting failed for "%s"' % 'u"%r, %r" % (u"abc", "abc")' | test('capwords', u'abc\t def \nghi', u'Abc Def Ghi') | 846257382602e1579b041073ae469bf990873b04 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/846257382602e1579b041073ae469bf990873b04/test_unicode.py |
assert u"%(x)s, %()s" % {'x':u"abc", u''.encode('utf-8'):"def"} == u'abc, def' | try: value = u"%(x)s, %()s" % {'x':u"abc", u''.encode('utf-8'):"def"} except KeyError: print '*** formatting failed for "%s"' % "u'abc, def'" else: assert value == u'abc, def' | test('capwords', u'abc\t def \nghi', u'Abc Def Ghi') | 846257382602e1579b041073ae469bf990873b04 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/846257382602e1579b041073ae469bf990873b04/test_unicode.py |
raise AssertionError, "'...%s......' % u'abc' failed to raise an exception" | print "*** formatting failed ...%s......' % u'abc' failed to raise an exception" | test('capwords', u'abc\t def \nghi', u'Abc Def Ghi') | 846257382602e1579b041073ae469bf990873b04 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/846257382602e1579b041073ae469bf990873b04/test_unicode.py |
lastmod = apply(imp.load_module, info) | lastmod = _imp.load_module(*info) | def _rec_find_module(module): "Improvement over imp.find_module which finds submodules." path="" for mod in string.split(module,"."): if path == "": info = (mod,) + _imp.find_module(mod) else: info = (mod,) + _imp.find_module(mod, [path]) lastmod = apply(imp.load_module, info) try: path = lastmod.__path__[0] except A... | d34580cb878efadc2e6a33df3de7b6d9828e67b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d34580cb878efadc2e6a33df3de7b6d9828e67b0/__init__.py |
drv_module = apply(imp.load_module, info) | drv_module = _imp.load_module(*info) | def _create_parser(parser_name): info = _rec_find_module(parser_name) drv_module = apply(imp.load_module, info) return drv_module.create_parser() | d34580cb878efadc2e6a33df3de7b6d9828e67b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d34580cb878efadc2e6a33df3de7b6d9828e67b0/__init__.py |
submsgobj = self.parsestr(part) msgobj.attach(submsgobj) | 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_content_type() == 'multipart/digest') # If there's a boundary, split the payload text into its constituent # parts and parse each se... | 5c9130ec466f531b7cea6302c762d8a29641b219 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5c9130ec466f531b7cea6302c762d8a29641b219/Parser.py | |
dupDB.associate(secDB, lambda a, b: a+b) | def f(a,b): return a+b dupDB.associate(secDB, f) | def test00_associateDBError(self): if verbose: print '\n', '-=' * 30 print "Running %s.test00_associateDBError..." % \ self.__class__.__name__ | 7e87a8a0be621c8fc09f44c2047b44d63ddba8f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7e87a8a0be621c8fc09f44c2047b44d63ddba8f8/test_associate.py |
self.primary.open(self.filename, "primary", self.dbtype, | if db.version() >= (4, 1): self.primary.open(self.filename, "primary", self.dbtype, | def createDB(self, txn=None): | 7e87a8a0be621c8fc09f44c2047b44d63ddba8f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7e87a8a0be621c8fc09f44c2047b44d63ddba8f8/test_associate.py |
self.getDB().associate(self.secDB, self.getGenre, txn=txn) | if db.version() >= (4,1): self.getDB().associate(self.secDB, self.getGenre, txn=txn) else: self.getDB().associate(self.secDB, self.getGenre) | def test13_associate_in_transaction(self): if verbose: print '\n', '-=' * 30 print "Running %s.test13_associateAutoCommit..." % \ self.__class__.__name__ | 7e87a8a0be621c8fc09f44c2047b44d63ddba8f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7e87a8a0be621c8fc09f44c2047b44d63ddba8f8/test_associate.py |
suite.addTest(unittest.makeSuite(AssociateBTreeTxnTestCase)) | if db.version() >= (4, 1): suite.addTest(unittest.makeSuite(AssociateBTreeTxnTestCase)) | def test_suite(): suite = unittest.TestSuite() if db.version() >= (3, 3, 11): suite.addTest(unittest.makeSuite(AssociateErrorTestCase)) suite.addTest(unittest.makeSuite(AssociateHashTestCase)) suite.addTest(unittest.makeSuite(AssociateBTreeTestCase)) suite.addTest(unittest.makeSuite(AssociateRecnoTestCase)) suite.ad... | 7e87a8a0be621c8fc09f44c2047b44d63ddba8f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7e87a8a0be621c8fc09f44c2047b44d63ddba8f8/test_associate.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... | 54fb7fb9d0ff1c96849572ff809cc9323e87bfa4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/54fb7fb9d0ff1c96849572ff809cc9323e87bfa4/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... | 54fb7fb9d0ff1c96849572ff809cc9323e87bfa4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/54fb7fb9d0ff1c96849572ff809cc9323e87bfa4/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... | 54fb7fb9d0ff1c96849572ff809cc9323e87bfa4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/54fb7fb9d0ff1c96849572ff809cc9323e87bfa4/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... | 54fb7fb9d0ff1c96849572ff809cc9323e87bfa4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/54fb7fb9d0ff1c96849572ff809cc9323e87bfa4/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... | 54fb7fb9d0ff1c96849572ff809cc9323e87bfa4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/54fb7fb9d0ff1c96849572ff809cc9323e87bfa4/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... | 54fb7fb9d0ff1c96849572ff809cc9323e87bfa4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/54fb7fb9d0ff1c96849572ff809cc9323e87bfa4/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... | 54fb7fb9d0ff1c96849572ff809cc9323e87bfa4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/54fb7fb9d0ff1c96849572ff809cc9323e87bfa4/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... | 54fb7fb9d0ff1c96849572ff809cc9323e87bfa4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/54fb7fb9d0ff1c96849572ff809cc9323e87bfa4/latex2esis.py |
c, noise = noise[0], noise[1:] res = res + c return res + noise + line res = "" for line in map(addnoise, lines): b = binascii.a2b_base64(line) res = res + b verify(res == testdata) | self.fail("binascii.a2b_qp(**{1:1}) didn't raise TypeError") self.assertEqual(binascii.a2b_qp("= "), "") self.assertEqual(binascii.a2b_qp("=="), "=") self.assertEqual(binascii.a2b_qp("=AX"), "=AX") self.assertRaises(TypeError, binascii.b2a_qp, foo="bar") self.assertEqual(binascii.a2b_qp("=00\r\n=00"), "\x00\r\n\x00") s... | def addnoise(line): noise = fillers ratio = len(line) // len(noise) res = "" while line and noise: if len(line) // len(noise) > ratio: c, line = line[0], line[1:] else: c, noise = noise[0], noise[1:] res = res + c return res + noise + line | cd1e8a948516a8a05d4e682d793a49d80bbdf8f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cd1e8a948516a8a05d4e682d793a49d80bbdf8f8/test_binascii.py |
verify(binascii.a2b_base64(fillers) == '') | def test_main(): test_support.run_unittest(BinASCIITest) | def addnoise(line): noise = fillers ratio = len(line) // len(noise) res = "" while line and noise: if len(line) // len(noise) > ratio: c, line = line[0], line[1:] else: c, noise = noise[0], noise[1:] res = res + c return res + noise + line | cd1e8a948516a8a05d4e682d793a49d80bbdf8f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cd1e8a948516a8a05d4e682d793a49d80bbdf8f8/test_binascii.py |
print "uu test" MAX_UU = 45 lines = [] for i in range(0, len(testdata), MAX_UU): b = testdata[i:i+MAX_UU] a = binascii.b2a_uu(b) lines.append(a) print a, res = "" for line in lines: b = binascii.a2b_uu(line) res = res + b verify(res == testdata) crc = binascii.crc32("Test the CRC-32 of") crc = binascii.crc32(" this ... | if __name__ == "__main__": test_main() | def addnoise(line): noise = fillers ratio = len(line) // len(noise) res = "" while line and noise: if len(line) // len(noise) > ratio: c, line = line[0], line[1:] else: c, noise = noise[0], noise[1:] res = res + c return res + noise + line | cd1e8a948516a8a05d4e682d793a49d80bbdf8f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cd1e8a948516a8a05d4e682d793a49d80bbdf8f8/test_binascii.py |
os.rename(tmp_file.name, dest) | try: if hasattr(os, 'link'): os.link(tmp_file.name, dest) os.remove(tmp_file.name) else: os.rename(tmp_file.name, dest) except OSError, e: os.remove(tmp_file.name) if e.errno == errno.EEXIST: raise ExternalClashError('Name clash with existing message: %s' % dest) else: raise | def add(self, message): """Add message and return assigned key.""" tmp_file = self._create_tmp() try: self._dump_message(message, tmp_file) finally: _sync_close(tmp_file) if isinstance(message, MaildirMessage): subdir = message.get_subdir() suffix = self.colon + message.get_info() if suffix == self.colon: suffix = '' e... | 978d8286ae36ac3570d1a2c6f48187ad9c0919c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/978d8286ae36ac3570d1a2c6f48187ad9c0919c7/mailbox.py |
return open(path, 'wb+') | try: return _create_carefully(path) except OSError, e: if e.errno != errno.EEXIST: raise | def _create_tmp(self): """Create a file in the tmp subdirectory and open and return it.""" now = time.time() hostname = socket.gethostname() if '/' in hostname: hostname = hostname.replace('/', r'\057') if ':' in hostname: hostname = hostname.replace(':', r'\072') uniq = "%s.M%sP%sQ%s.%s" % (int(now), int(now % 1 * 1e6... | 978d8286ae36ac3570d1a2c6f48187ad9c0919c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/978d8286ae36ac3570d1a2c6f48187ad9c0919c7/mailbox.py |
else: raise ExternalClashError('Name clash prevented file creation: %s' % path) | raise ExternalClashError('Name clash prevented file creation: %s' % path) | def _create_tmp(self): """Create a file in the tmp subdirectory and open and return it.""" now = time.time() hostname = socket.gethostname() if '/' in hostname: hostname = hostname.replace('/', r'\057') if ':' in hostname: hostname = hostname.replace(':', r'\072') uniq = "%s.M%sP%sQ%s.%s" % (int(now), int(now % 1 * 1e6... | 978d8286ae36ac3570d1a2c6f48187ad9c0919c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/978d8286ae36ac3570d1a2c6f48187ad9c0919c7/mailbox.py |
char *cStr = PyString_AsString(v); *p_itself = CFStringCreateWithCString((CFAllocatorRef)NULL, cStr, 0); | char *cStr; if (!PyArg_Parse(v, "et", "ascii", &cStr)) return NULL; *p_itself = CFStringCreateWithCString((CFAllocatorRef)NULL, cStr, kCFStringEncodingASCII); | def outputCheckConvertArg(self): Out(""" if (v == Py_None) { *p_itself = NULL; return 1; } if (PyString_Check(v)) { char *cStr = PyString_AsString(v); *p_itself = CFStringCreateWithCString((CFAllocatorRef)NULL, cStr, 0); return 1; } if (PyUnicode_Check(v)) { /* We use the CF types here, if Python was configured differe... | d505cab5b3c9074aa678a33f03f97623d3e5fd28 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d505cab5b3c9074aa678a33f03f97623d3e5fd28/cfsupport.py |
"times", "getlogin", "getloadavg", "tmpnam", | "times", "getloadavg", "tmpnam", | def testNoArgFunctions(self): # test posix functions which take no arguments and have # no side-effects which we need to cleanup (e.g., fork, wait, abort) NO_ARG_FUNCTIONS = [ "ctermid", "getcwd", "getcwdu", "uname", "times", "getlogin", "getloadavg", "tmpnam", "getegid", "geteuid", "getgid", "getgroups", "getpid", "ge... | 71b13e8b4c4aad547d870a63e9b2f8784835eb2f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/71b13e8b4c4aad547d870a63e9b2f8784835eb2f/test_posix.py |
self.compiler = new_compiler (plat=os.environ.get ('PLAT'), verbose=self.verbose, | self.compiler = new_compiler (verbose=self.verbose, | def run (self): | 4620f306a4d46ca6e455247cfa5c900765d4b9d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4620f306a4d46ca6e455247cfa5c900765d4b9d1/build_ext.py |
event = self.getevent(mask, wait) if event: | ok, event = self.getevent(mask, wait) if IsDialogEvent(event): if self.do_dialogevent(event): return if ok: | def do1event(self, mask = everyEvent, wait = 0): event = self.getevent(mask, wait) if event: self.dispatch(event) | 13dc4f71a903ee38510aff6583a82435fbdf700b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/13dc4f71a903ee38510aff6583a82435fbdf700b/FrameWork.py |
if ok: return event else: return None | return ok, event | def getevent(self, mask = everyEvent, wait = 0): ok, event = WaitNextEvent(mask, wait) if ok: return event else: return None | 13dc4f71a903ee38510aff6583a82435fbdf700b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/13dc4f71a903ee38510aff6583a82435fbdf700b/FrameWork.py |
if IsDialogEvent(event): self.do_dialogevent(event) return | def dispatch(self, event): if IsDialogEvent(event): self.do_dialogevent(event) return (what, message, when, where, modifiers) = event if eventname.has_key(what): name = "do_" + eventname[what] else: name = "do_%d" % what try: handler = getattr(self, name) except AttributeError: handler = self.do_unknownevent handler(ev... | 13dc4f71a903ee38510aff6583a82435fbdf700b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/13dc4f71a903ee38510aff6583a82435fbdf700b/FrameWork.py | |
window.do_itemhit(item, event) | self._windows[window].do_itemhit(item, event) | def do_dialogevent(self, event): gotone, window, item = DialogSelect(event) if gotone: if self._windows.has_key(window): window.do_itemhit(item, event) else: print 'Dialog event for unknown dialog' | 13dc4f71a903ee38510aff6583a82435fbdf700b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/13dc4f71a903ee38510aff6583a82435fbdf700b/FrameWork.py |
self.wid.DisposeDialog() | def close(self): self.wid.DisposeDialog() self.do_postclose() | 13dc4f71a903ee38510aff6583a82435fbdf700b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/13dc4f71a903ee38510aff6583a82435fbdf700b/FrameWork.py | |
ret | return [None, None] | def _synthesize(browser): """Attempt to synthesize a controller base on existing controllers. This is useful to create a controller when a user specifies a path to an entry in the BROWSER environment variable -- we can copy a general controller to operate using a specific installation of the desired browser in this wa... | 118aa5337c745dece455f4782799c83b9e3a7d4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/118aa5337c745dece455f4782799c83b9e3a7d4f/webbrowser.py |
print "link_shared_object():" print " output_filename =", output_filename print " mkpath'ing:", os.path.dirname (output_filename) | def link_shared_object (self, 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): | 04c90fc475d4dbd0ea74682a3e399ce93f043a2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/04c90fc475d4dbd0ea74682a3e399ce93f043a2c/msvccompiler.py | |
err = PyMac_GetFullPathname(&_self->ob_itself, strbuf, sizeof(strbuf)); | err = _PyMac_GetFullPathname(&_self->ob_itself, strbuf, sizeof(strbuf)); | def parseArgumentList(self, args): args0, arg1, argsrest = args[:1], args[1], args[2:] t0, n0, m0 = arg1 args = args0 + argsrest if m0 != InMode: raise ValueError, "method's 'self' must be 'InMode'" self.itself = Variable(t0, "_self->ob_itself", SelfMode) FunctionGenerator.parseArgumentList(self, args) self.argumentLis... | d7b76e9f697e7539955d39b92527c586becbcdc5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d7b76e9f697e7539955d39b92527c586becbcdc5/filesupport.py |
it = iter(self._fp) | eq(iter(self._fp), self._fp) | def test_iterator(self): eq = self.assertEqual unless = self.failUnless it = iter(self._fp) # Does this object support the iteration protocol? unless(hasattr(it, '__iter__')) unless(hasattr(it, 'next')) i = 0 for line in self._fp: eq(line, self._line + '\n') i += 1 eq(i, 5) | 352f9477da79cfeba9afdb97e4554f7eca5b77db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/352f9477da79cfeba9afdb97e4554f7eca5b77db/test_StringIO.py |
unless(hasattr(it, '__iter__')) unless(hasattr(it, 'next')) | unless(hasattr(self._fp, '__iter__')) unless(hasattr(self._fp, 'next')) | def test_iterator(self): eq = self.assertEqual unless = self.failUnless it = iter(self._fp) # Does this object support the iteration protocol? unless(hasattr(it, '__iter__')) unless(hasattr(it, 'next')) i = 0 for line in self._fp: eq(line, self._line + '\n') i += 1 eq(i, 5) | 352f9477da79cfeba9afdb97e4554f7eca5b77db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/352f9477da79cfeba9afdb97e4554f7eca5b77db/test_StringIO.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... | 54f871e19351af3cc2de39d34fa4fe24cedb92f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/54f871e19351af3cc2de39d34fa4fe24cedb92f7/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'), | 54f871e19351af3cc2de39d34fa4fe24cedb92f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/54f871e19351af3cc2de39d34fa4fe24cedb92f7/pydoc.py |
'COERCIONS': 'CONVERSIONS', 'CONVERSIONS': ('ref/conversions', ''), | 'COERCIONS': ('ref/coercion-rules','CONVERSIONS'), 'CONVERSIONS': ('ref/conversions', 'COERCIONS'), | 'METHODS': ('lib/typesmethods', 'class def CLASSES TYPES'), | 54f871e19351af3cc2de39d34fa4fe24cedb92f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/54f871e19351af3cc2de39d34fa4fe24cedb92f7/pydoc.py |
if isclass(object): | if hasattr(object, '__module__'): | def getmodule(object): """Return the module an object was defined in, or None if not found.""" if ismodule(object): return object if isclass(object): return sys.modules.get(object.__module__) try: file = getabsfile(object) except TypeError: return None if file in modulesbyfile: return sys.modules.get(modulesbyfile[file... | 9324526a7658c5450eba24b48065d87d5db5ab1f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9324526a7658c5450eba24b48065d87d5db5ab1f/inspect.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') | 05d4d562d70568469b12cb2b45dfc78886f8c5d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/05d4d562d70568469b12cb2b45dfc78886f8c5d9/setup.py | ||
'/usr/lib', | 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') | 05d4d562d70568469b12cb2b45dfc78886f8c5d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/05d4d562d70568469b12cb2b45dfc78886f8c5d9/setup.py | |
'/lib', | 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') | 05d4d562d70568469b12cb2b45dfc78886f8c5d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/05d4d562d70568469b12cb2b45dfc78886f8c5d9/setup.py | |
), 'incs': ('db.h',)}, | )}, | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 05d4d562d70568469b12cb2b45dfc78886f8c5d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/05d4d562d70568469b12cb2b45dfc78886f8c5d9/setup.py |
'/usr/lib', '/lib', | 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') | 05d4d562d70568469b12cb2b45dfc78886f8c5d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/05d4d562d70568469b12cb2b45dfc78886f8c5d9/setup.py | |
), 'incs': ('db.h',)}, | )}, | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 05d4d562d70568469b12cb2b45dfc78886f8c5d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/05d4d562d70568469b12cb2b45dfc78886f8c5d9/setup.py |
find_lib_file = self.compiler.find_library_file | 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') | 05d4d562d70568469b12cb2b45dfc78886f8c5d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/05d4d562d70568469b12cb2b45dfc78886f8c5d9/setup.py | |
for dbinc in dbd['incs']: db_incs = find_file(dbinc, [], dbd['incdirs']) dblib_dir = find_lib_file(dbd['libdirs'], dblib) if db_incs and dblib_dir: dblib_dir = os.path.dirname(dblib_dir) dblibs = [dblib] raise found | db_incs = find_file('db.h', [], dbd['incdirs']) dblib_dir = find_library_file(self.compiler, dblib, lib_dirs, list(dbd['libdirs'])) if (db_incs or dbkey == std_dbinc) and \ dblib_dir is not None: dblibs = [dblib] raise found | 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') | 05d4d562d70568469b12cb2b45dfc78886f8c5d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/05d4d562d70568469b12cb2b45dfc78886f8c5d9/setup.py |
library_dirs=[dblib_dir], runtime_library_dirs=[dblib_dir], | library_dirs=dblib_dir, runtime_library_dirs=dblib_dir, | 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') | 05d4d562d70568469b12cb2b45dfc78886f8c5d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/05d4d562d70568469b12cb2b45dfc78886f8c5d9/setup.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.