rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
if not res:
if res is None:
def parse_doctype(self, res): rawdata = self.rawdata n = len(rawdata) name = res.group('name') pubid, syslit = res.group('pubid', 'syslit') if pubid is not None: pubid = pubid[1:-1] # remove quotes pubid = string.join(string.split(pubid)) # normalize if syslit is not None: syslit = syslit[1:-1] # remove quotes ...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py
res = endbracket.search(rawdata, k) if not res:
res = endbracketfind.match(rawdata, k) if res is None:
def parse_doctype(self, res): rawdata = self.rawdata n = len(rawdata) name = res.group('name') pubid, syslit = res.group('pubid', 'syslit') if pubid is not None: pubid = pubid[1:-1] # remove quotes pubid = string.join(string.split(pubid)) # normalize if syslit is not None: syslit = syslit[1:-1] # remove quotes ...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py
if res.start(0) != k:
if endbracket.match(rawdata, k) is None:
def parse_doctype(self, res): rawdata = self.rawdata n = len(rawdata) name = res.group('name') pubid, syslit = res.group('pubid', 'syslit') if pubid is not None: pubid = pubid[1:-1] # remove quotes pubid = string.join(string.split(pubid)) # normalize if syslit is not None: syslit = syslit[1:-1] # remove quotes ...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py
if not res:
if res is None:
def parse_cdata(self, i): rawdata = self.rawdata if rawdata[i:i+9] <> '<![CDATA[': raise RuntimeError, 'unexpected call to parse_cdata' res = cdataclose.search(rawdata, i+9) if not res: return -1 if illegal.search(rawdata, i+9, res.start(0)): self.syntax_error('illegal character in CDATA') if not self.stack: self.synta...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py
if not end:
if end is None:
def parse_proc(self, i): rawdata = self.rawdata end = procclose.search(rawdata, i) if not end: return -1 j = end.start(0) if illegal.search(rawdata, i+2, j): self.syntax_error('illegal character in processing instruction') res = tagfind.match(rawdata, i+2) if not res: raise RuntimeError, 'unexpected call to parse_proc'...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py
if not res:
if res is None:
def parse_proc(self, i): rawdata = self.rawdata end = procclose.search(rawdata, i) if not end: return -1 j = end.start(0) if illegal.search(rawdata, i+2, j): self.syntax_error('illegal character in processing instruction') res = tagfind.match(rawdata, i+2) if not res: raise RuntimeError, 'unexpected call to parse_proc'...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py
def parse_attributes(self, tag, k, j, attributes = None):
def parse_attributes(self, tag, i, j, attributes = None):
def parse_attributes(self, tag, k, j, attributes = None): rawdata = self.rawdata # Now parse the data between k and j into a tag and attrs attrdict = {} try: # convert attributes list to dictionary d = {} for a in attributes: d[a] = None attributes = d except TypeError: pass while k < j: res = attrfind.match(rawdata, k...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py
def parse_attributes(self, tag, k, j, attributes = None): rawdata = self.rawdata # Now parse the data between k and j into a tag and attrs attrdict = {} try: # convert attributes list to dictionary d = {} for a in attributes: d[a] = None attributes = d except TypeError: pass while k < j: res = attrfind.match(rawdata, k...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py
while k < j: res = attrfind.match(rawdata, k) if not res: break
while i < j: res = attrfind.match(rawdata, i) if res is None: break
def parse_attributes(self, tag, k, j, attributes = None): rawdata = self.rawdata # Now parse the data between k and j into a tag and attrs attrdict = {} try: # convert attributes list to dictionary d = {} for a in attributes: d[a] = None attributes = d except TypeError: pass while k < j: res = attrfind.match(rawdata, k...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py
self.syntax_error('no attribute value specified')
self.syntax_error("no value specified for attribute `%s'" % attrname)
def parse_attributes(self, tag, k, j, attributes = None): rawdata = self.rawdata # Now parse the data between k and j into a tag and attrs attrdict = {} try: # convert attributes list to dictionary d = {} for a in attributes: d[a] = None attributes = d except TypeError: pass while k < j: res = attrfind.match(rawdata, k...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py
self.syntax_error('attribute value not quoted')
self.syntax_error("attribute `%s' value not quoted" % attrname) if '<' in attrvalue: self.syntax_error("`<' illegal in attribute value")
def parse_attributes(self, tag, k, j, attributes = None): rawdata = self.rawdata # Now parse the data between k and j into a tag and attrs attrdict = {} try: # convert attributes list to dictionary d = {} for a in attributes: d[a] = None attributes = d except TypeError: pass while k < j: res = attrfind.match(rawdata, k...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py
self.syntax_error('unknown attribute %s of element %s' %
self.syntax_error("unknown attribute `%s' of element `%s'" %
def parse_attributes(self, tag, k, j, attributes = None): rawdata = self.rawdata # Now parse the data between k and j into a tag and attrs attrdict = {} try: # convert attributes list to dictionary d = {} for a in attributes: d[a] = None attributes = d except TypeError: pass while k < j: res = attrfind.match(rawdata, k...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py
self.syntax_error('attribute specified twice')
self.syntax_error("attribute `%s' specified twice" % attrname)
def parse_attributes(self, tag, k, j, attributes = None): rawdata = self.rawdata # Now parse the data between k and j into a tag and attrs attrdict = {} try: # convert attributes list to dictionary d = {} for a in attributes: d[a] = None attributes = d except TypeError: pass while k < j: res = attrfind.match(rawdata, k...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py
k = res.end(0)
i = res.end(0)
def parse_attributes(self, tag, k, j, attributes = None): rawdata = self.rawdata # Now parse the data between k and j into a tag and attrs attrdict = {} try: # convert attributes list to dictionary d = {} for a in attributes: d[a] = None attributes = d except TypeError: pass while k < j: res = attrfind.match(rawdata, k...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py
return attrdict, k
return attrdict, i
def parse_attributes(self, tag, k, j, attributes = None): rawdata = self.rawdata # Now parse the data between k and j into a tag and attrs attrdict = {} try: # convert attributes list to dictionary d = {} for a in attributes: d[a] = None attributes = d except TypeError: pass while k < j: res = attrfind.match(rawdata, k...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py
end = endbracket.search(rawdata, i+1) if not end:
end = endbracketfind.match(rawdata, i+1) if end is None:
def parse_starttag(self, i): rawdata = self.rawdata # i points to start of tag end = endbracket.search(rawdata, i+1) if not end: return -1 j = end.start(0) res = tagfind.match(rawdata, i+1) if not res: raise RuntimeError, 'unexpected call to parse_starttag' k = res.end(0) tag = res.group(0) if not self.__seen_starttag ...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py
j = end.start(0) res = tagfind.match(rawdata, i+1) if not res: raise RuntimeError, 'unexpected call to parse_starttag' k = res.end(0) tag = res.group(0) if not self.__seen_starttag and self.__seen_doctype: if tag != self.__seen_doctype: self.syntax_error('starttag does not match DOCTYPE')
tag = starttagmatch.match(rawdata, i) if tag is None or tag.end(0) != end.end(0): self.syntax_error('garbage in starttag') return end.end(0) tagname = tag.group('tagname') if not self.__seen_starttag and self.__seen_doctype and \ tagname != self.__seen_doctype: self.syntax_error('starttag does not match DOCTYPE')
def parse_starttag(self, i): rawdata = self.rawdata # i points to start of tag end = endbracket.search(rawdata, i+1) if not end: return -1 j = end.start(0) res = tagfind.match(rawdata, i+1) if not res: raise RuntimeError, 'unexpected call to parse_starttag' k = res.end(0) tag = res.group(0) if not self.__seen_starttag ...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py
if hasattr(self, tag + '_attributes'): attributes = getattr(self, tag + '_attributes')
if hasattr(self, tagname + '_attributes'): attributes = getattr(self, tagname + '_attributes')
def parse_starttag(self, i): rawdata = self.rawdata # i points to start of tag end = endbracket.search(rawdata, i+1) if not end: return -1 j = end.start(0) res = tagfind.match(rawdata, i+1) if not res: raise RuntimeError, 'unexpected call to parse_starttag' k = res.end(0) tag = res.group(0) if not self.__seen_starttag ...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py
attrdict, k = self.parse_attributes(tag, k, j, attributes) res = starttagend.match(rawdata, k) if not res: self.syntax_error('garbage in start tag') self.finish_starttag(tag, attrdict) if res and res.group('slash') == '/': self.finish_endtag(tag) return end.end(0)
k, j = tag.span('attrs') attrdict, k = self.parse_attributes(tagname, k, j, attributes) self.finish_starttag(tagname, attrdict) if tag.group('slash') == '/': self.finish_endtag(tagname) return tag.end(0)
def parse_starttag(self, i): rawdata = self.rawdata # i points to start of tag end = endbracket.search(rawdata, i+1) if not end: return -1 j = end.start(0) res = tagfind.match(rawdata, i+1) if not res: raise RuntimeError, 'unexpected call to parse_starttag' k = res.end(0) tag = res.group(0) if not self.__seen_starttag ...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py
end = endbracket.search(rawdata, i+1) if not end:
end = endbracketfind.match(rawdata, i+1) if end is None:
def parse_endtag(self, i): rawdata = self.rawdata end = endbracket.search(rawdata, i+1) if not end: return -1 res = tagfind.match(rawdata, i+2) if not res: self.syntax_error('no name specified in end tag') tag = '' k = i+2 else: tag = res.group(0) k = res.end(0) if k != end.start(0): self.syntax_error('garbage in end t...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py
if not res:
if res is None:
def parse_endtag(self, i): rawdata = self.rawdata end = endbracket.search(rawdata, i+1) if not end: return -1 res = tagfind.match(rawdata, i+2) if not res: self.syntax_error('no name specified in end tag') tag = '' k = i+2 else: tag = res.group(0) k = res.end(0) if k != end.start(0): self.syntax_error('garbage in end t...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py
if k != end.start(0):
if endbracket.match(rawdata, k) is None:
def parse_endtag(self, i): rawdata = self.rawdata end = endbracket.search(rawdata, i+1) if not end: return -1 res = tagfind.match(rawdata, i+2) if not res: self.syntax_error('no name specified in end tag') tag = '' k = i+2 else: tag = res.group(0) k = res.end(0) if k != end.start(0): self.syntax_error('garbage in end t...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py
if os.name == 'mac': def writable(self): return not self.accepting else: def writable(self): return True
def writable(self): return True
def readable(self): return True
419af88b34fb84062baed5c0be7f6c9e72fcb77d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/419af88b34fb84062baed5c0be7f6c9e72fcb77d/asyncore.py
base = path[len(longest) + 1:].replace("/", ".")
if longest: base = path[len(longest) + 1:] else: base = path base = base.replace("/", ".")
def fullmodname(path): """Return a plausible module name for the path.""" # If the file 'path' is part of a package, then the filename isn't # enough to uniquely identify it. Try to do the right thing by # looking in sys.path for the longest matching prefix. We'll # assume that the rest is the package name. longest...
b427c00376e0737147af9265755af454cbdb92cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b427c00376e0737147af9265755af454cbdb92cc/trace.py
(script, type) = self.tk.splitlist( self.tk.call('after', 'info', id))
data = self.tk.call('after', 'info', id) script = self.tk.splitlist(data)[0]
def after_cancel(self, id): """Cancel scheduling of function identified with ID.
3c0f2c91adf086f809169f94ca9a2a75df3dc996 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3c0f2c91adf086f809169f94ca9a2a75df3dc996/Tkinter.py
def shared_object_filename (self, source_filename): """Return the shared object filename corresponding to a specified source filename.""" return self._change_extensions( source_filenames, self._shared_lib_ext )
c8a95c8d5e24202ab561b68b72198d0603a8c708 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c8a95c8d5e24202ab561b68b72198d0603a8c708/msvccompiler.py
return "lib%s%s" %( libname, self._static_lib_ext )
return "%s%s" %( libname, self._static_lib_ext )
def library_filename (self, libname): """Return the static library filename corresponding to the specified library name.""" return "lib%s%s" %( libname, self._static_lib_ext )
c8a95c8d5e24202ab561b68b72198d0603a8c708 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c8a95c8d5e24202ab561b68b72198d0603a8c708/msvccompiler.py
return "lib%s%s" %( libname, self._shared_lib_ext )
return "%s%s" %( libname, self._shared_lib_ext )
def shared_library_filename (self, libname): """Return the shared library filename corresponding to the specified library name.""" return "lib%s%s" %( libname, self._shared_lib_ext )
c8a95c8d5e24202ab561b68b72198d0603a8c708 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c8a95c8d5e24202ab561b68b72198d0603a8c708/msvccompiler.py
if kwargs.has_key('command')
if kwargs.has_key('command'):
def __init__(self, master, variable, value, *values, **kwargs): kw = {"borderwidth": 2, "textvariable": variable, "indicatoron": 1, "relief": RAISED, "anchor": "c", "highlightthickness": 2} Widget.__init__(self, master, "menubutton", kw) self.widgetName = 'tk_optionMenu' menu = self.__menu = Menu(self, name="menu", tea...
0ba33002e1df4627901f3303574554f239789a1a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0ba33002e1df4627901f3303574554f239789a1a/Tkinter.py
self.__msg = msg
self._msg = msg
def __init__(self, msg=''): self.__msg = msg
bfa3f6b673d80de48c2bb9a85cf942a958b97374 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bfa3f6b673d80de48c2bb9a85cf942a958b97374/ConfigParser.py
return self.__msg
return self._msg
def __repr__(self): return self.__msg
bfa3f6b673d80de48c2bb9a85cf942a958b97374 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bfa3f6b673d80de48c2bb9a85cf942a958b97374/ConfigParser.py
on the defaults passed into the constructor.
on the defaults passed into the constructor, unless the optional argument `raw' is true.
def get(self, section, option, raw=0): """Get an option value for a given section.
bfa3f6b673d80de48c2bb9a85cf942a958b97374 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bfa3f6b673d80de48c2bb9a85cf942a958b97374/ConfigParser.py
cursect = None
cursect = None
def __read(self, fp): """Parse a sectioned setup file.
bfa3f6b673d80de48c2bb9a85cf942a958b97374 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bfa3f6b673d80de48c2bb9a85cf942a958b97374/ConfigParser.py
if line[0] in ' \t' and cursect <> None and optname:
if line[0] in ' \t' and cursect is not None and optname:
def __read(self, fp): """Parse a sectioned setup file.
bfa3f6b673d80de48c2bb9a85cf942a958b97374 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bfa3f6b673d80de48c2bb9a85cf942a958b97374/ConfigParser.py
cursect = cursect[optname] + '\n ' + value elif secthead_cre.match(line) >= 0: sectname = secthead_cre.group(1) if self.__sections.has_key(sectname): cursect = self.__sections[sectname] elif sectname == DEFAULTSECT: cursect = self.__defaults
cursect[optname] = cursect[optname] + '\n ' + value else: mo = self.__SECTCRE.match(line) if mo: sectname = mo.group('header') if self.__sections.has_key(sectname): cursect = self.__sections[sectname] elif sectname == DEFAULTSECT: cursect = self.__defaults else: cursect = {} self.__sections[sectname] = cursect optna...
def __read(self, fp): """Parse a sectioned setup file.
bfa3f6b673d80de48c2bb9a85cf942a958b97374 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bfa3f6b673d80de48c2bb9a85cf942a958b97374/ConfigParser.py
cursect = {'name': sectname} self.__sections[sectname] = cursect optname = None elif option_cre.match(line) >= 0: optname, optval = option_cre.group(1, 3) optname = string.lower(optname) optval = string.strip(optval) if optval == '""': optval = '' cursect[optname] = optval else: print 'Error in %s at %d: %s', (fp.n...
mo = self.__OPTCRE.match(line) if mo: optname, optval = mo.group('option', 'value') optname = string.lower(optname) optval = string.strip(optval) if optval == '""': optval = '' cursect[optname] = optval else: if not e: e = ParsingError(fp.name) e.append(lineno, `line`) if e: raise e
def __read(self, fp): """Parse a sectioned setup file.
bfa3f6b673d80de48c2bb9a85cf942a958b97374 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bfa3f6b673d80de48c2bb9a85cf942a958b97374/ConfigParser.py
#ifndef kControlCheckBoxUncheckedValue
736b51df7c0ce09e2944976d75929696126cac72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/736b51df7c0ce09e2944976d75929696126cac72/ctlsupport.py
#ifndef kControlCheckBoxUncheckedValue
736b51df7c0ce09e2944976d75929696126cac72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/736b51df7c0ce09e2944976d75929696126cac72/ctlsupport.py
#ifndef kControlCheckBoxUncheckedValue
736b51df7c0ce09e2944976d75929696126cac72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/736b51df7c0ce09e2944976d75929696126cac72/ctlsupport.py
#ifndef kControlCheckBoxUncheckedValue
736b51df7c0ce09e2944976d75929696126cac72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/736b51df7c0ce09e2944976d75929696126cac72/ctlsupport.py
#ifndef kControlCheckBoxUncheckedValue
736b51df7c0ce09e2944976d75929696126cac72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/736b51df7c0ce09e2944976d75929696126cac72/ctlsupport.py
#ifndef kControlCheckBoxUncheckedValue
736b51df7c0ce09e2944976d75929696126cac72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/736b51df7c0ce09e2944976d75929696126cac72/ctlsupport.py
#ifndef kControlCheckBoxUncheckedValue
736b51df7c0ce09e2944976d75929696126cac72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/736b51df7c0ce09e2944976d75929696126cac72/ctlsupport.py
#ifndef kControlCheckBoxUncheckedValue
736b51df7c0ce09e2944976d75929696126cac72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/736b51df7c0ce09e2944976d75929696126cac72/ctlsupport.py
f = ManualGenerator("SetControlData_Callback", setcontroldata_callback_body, condition="
f = ManualGenerator("SetControlData_Callback", setcontroldata_callback_body);
def outputCleanupStructMembers(self): Output("Py_XDECREF(self->ob_callbackdict);") Output("if (self->ob_itself)SetControlReference(self->ob_itself, (long)0); /* Make it forget about us */")
736b51df7c0ce09e2944976d75929696126cac72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/736b51df7c0ce09e2944976d75929696126cac72/ctlsupport.py
f = ManualGenerator("GetPopupData", getpopupdata_body, condition="
f = ManualGenerator("GetPopupData", getpopupdata_body, condition="
def outputCleanupStructMembers(self): Output("Py_XDECREF(self->ob_callbackdict);") Output("if (self->ob_itself)SetControlReference(self->ob_itself, (long)0); /* Make it forget about us */")
736b51df7c0ce09e2944976d75929696126cac72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/736b51df7c0ce09e2944976d75929696126cac72/ctlsupport.py
f = ManualGenerator("SetPopupData", setpopupdata_body, condition="
f = ManualGenerator("SetPopupData", setpopupdata_body, condition="
def outputCleanupStructMembers(self): Output("Py_XDECREF(self->ob_callbackdict);") Output("if (self->ob_itself)SetControlReference(self->ob_itself, (long)0); /* Make it forget about us */")
736b51df7c0ce09e2944976d75929696126cac72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/736b51df7c0ce09e2944976d75929696126cac72/ctlsupport.py
def readline(self):
def readline(self, length=None):
def readline(self): if self.buflist: self.buf = self.buf + string.joinfields(self.buflist, '') self.buflist = [] i = string.find(self.buf, '\n', self.pos) if i < 0: newpos = self.len else: newpos = i+1 r = self.buf[self.pos:newpos] self.pos = newpos return r
2e2525fd3cb841cf4850a81c7bb95e97230c6964 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2e2525fd3cb841cf4850a81c7bb95e97230c6964/StringIO.py
dotted_req_host = "."+req_host
req_host = "."+req_host
def domain_return_ok(self, domain, request): # Liberal check of. This is here as an optimization to avoid # having to load lots of MSIE cookie files unless necessary. req_host, erhn = eff_request_host(request) if not req_host.startswith("."): dotted_req_host = "."+req_host if not erhn.startswith("."): dotted_erhn = "....
bab4143348f2185c1a9a778a281ef84d46307842 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bab4143348f2185c1a9a778a281ef84d46307842/cookielib.py
dotted_erhn = "."+erhn if not (dotted_req_host.endswith(domain) or dotted_erhn.endswith(domain)):
erhn = "."+erhn if not (req_host.endswith(domain) or erhn.endswith(domain)):
def domain_return_ok(self, domain, request): # Liberal check of. This is here as an optimization to avoid # having to load lots of MSIE cookie files unless necessary. req_host, erhn = eff_request_host(request) if not req_host.startswith("."): dotted_req_host = "."+req_host if not erhn.startswith("."): dotted_erhn = "....
bab4143348f2185c1a9a778a281ef84d46307842 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bab4143348f2185c1a9a778a281ef84d46307842/cookielib.py
if self.rpm3_mode: rpm_base = os.path.join(self.bdist_base, "rpm") else: rpm_base = self.bdist_base
def run (self):
7ce6d074aa331774c9e7198747eb5665ee125881 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7ce6d074aa331774c9e7198747eb5665ee125881/bdist_rpm.py
rpm_dir[d] = os.path.join(rpm_base, d)
rpm_dir[d] = os.path.join(self.rpm_base, d)
def run (self):
7ce6d074aa331774c9e7198747eb5665ee125881 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7ce6d074aa331774c9e7198747eb5665ee125881/bdist_rpm.py
'_topdir %s/%s' % (os.getcwd(), rpm_base),])
'_topdir %s/%s' % (os.getcwd(), self.rpm_base),])
def run (self):
7ce6d074aa331774c9e7198747eb5665ee125881 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7ce6d074aa331774c9e7198747eb5665ee125881/bdist_rpm.py
('postun', 'post_uninstall', None))
('postun', 'post_uninstall', None),
def _make_spec_file(self): """Generate the text of an RPM spec file and return it as a list of strings (one per line). """ # definitions and headers spec_file = [ '%define name ' + self.distribution.get_name(), '%define version ' + self.distribution.get_version(), '%define release ' + self.release, '', 'Summary: ' + se...
7ce6d074aa331774c9e7198747eb5665ee125881 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7ce6d074aa331774c9e7198747eb5665ee125881/bdist_rpm.py
sf = self.static and "staticforward "
sf = self.static and "static "
def generate(self): # XXX This should use long strings and %(varname)s substitution!
938ace69a0e112424a2f426a4881d1fd1fc922d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/938ace69a0e112424a2f426a4881d1fd1fc922d2/bgenObjectDefinition.py
sf = self.static and "staticforward "
sf = self.static and "static "
def outputTypeObject(self): sf = self.static and "staticforward " Output() Output("%sPyTypeObject %s = {", sf, self.typename) IndentLevel() Output("PyObject_HEAD_INIT(NULL)") Output("0, /*ob_size*/") if self.modulename: Output("\"%s.%s\", /*tp_name*/", self.modulename, self.name) else: Output("\"%s\", /*tp_name*/", sel...
938ace69a0e112424a2f426a4881d1fd1fc922d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/938ace69a0e112424a2f426a4881d1fd1fc922d2/bgenObjectDefinition.py
"""Basic (multiple values per field) form content as dictionary.
"""Form content as dictionary with a list of values per field.
def make_file(self, binary=None): """Overridable: return a readable & writable file.
a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d/cgi.py
"""Strict single-value expecting form content as dictionary. IF you only expect a single value for each field, then form[key]
"""Form content as dictionary expecting a single value per field. If you only expect a single value for each field, then form[key]
def __init__(self, environ=os.environ): self.dict = self.data = parse(environ=environ) self.query_string = environ['QUERY_STRING']
a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d/cgi.py
that expectation is not true. IF you expect a field to have
that expectation is not true. If you expect a field to have
def __init__(self, environ=os.environ): self.dict = self.data = parse(environ=environ) self.query_string = environ['QUERY_STRING']
a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d/cgi.py
lis = [] for each in self.dict.values(): if len( each ) == 1 : lis.append(each[0]) else: lis.append(each) return lis
result = [] for value in self.dict.values(): if len(value) == 1: result.append(value[0]) else: result.append(value) return result
def values(self): lis = [] for each in self.dict.values(): if len( each ) == 1 : lis.append(each[0]) else: lis.append(each) return lis
a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d/cgi.py
lis = [] for key,value in self.dict.items(): if len(value) == 1 : lis.append((key, value[0])) else: lis.append((key, value)) return lis
result = [] for key, value in self.dict.items(): if len(value) == 1: result.append((key, value[0])) else: result.append((key, value)) return result
def items(self): lis = [] for key,value in self.dict.items(): if len(value) == 1 : lis.append((key, value[0])) else: lis.append((key, value)) return lis
a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d/cgi.py
def __getitem__( self, key ): v = SvFormContentDict.__getitem__( self, key ) if v[0] in string.digits+'+-.' : try: return string.atoi( v )
def __getitem__(self, key): v = SvFormContentDict.__getitem__(self, key) if v[0] in string.digits + '+-.': try: return string.atoi(v)
def __getitem__( self, key ): v = SvFormContentDict.__getitem__( self, key ) if v[0] in string.digits+'+-.' : try: return string.atoi( v ) except ValueError: try: return string.atof( v ) except ValueError: pass return string.strip(v)
a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d/cgi.py
try: return string.atof( v )
try: return string.atof(v)
def __getitem__( self, key ): v = SvFormContentDict.__getitem__( self, key ) if v[0] in string.digits+'+-.' : try: return string.atoi( v ) except ValueError: try: return string.atof( v ) except ValueError: pass return string.strip(v)
a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d/cgi.py
def values( self ): lis = []
def values(self): result = []
def values( self ): lis = [] for key in self.keys(): try: lis.append( self[key] ) except IndexError: lis.append( self.dict[key] ) return lis
a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d/cgi.py
lis.append( self[key] )
result.append(self[key])
def values( self ): lis = [] for key in self.keys(): try: lis.append( self[key] ) except IndexError: lis.append( self.dict[key] ) return lis
a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d/cgi.py
lis.append( self.dict[key] ) return lis def items( self ): lis = []
result.append(self.dict[key]) return result def items(self): result = []
def values( self ): lis = [] for key in self.keys(): try: lis.append( self[key] ) except IndexError: lis.append( self.dict[key] ) return lis
a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d/cgi.py
lis.append( (key, self[key]) )
result.append((key, self[key]))
def items( self ): lis = [] for key in self.keys(): try: lis.append( (key, self[key]) ) except IndexError: lis.append( (key, self.dict[key]) ) return lis
a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d/cgi.py
lis.append( (key, self.dict[key]) ) return lis
result.append((key, self.dict[key])) return result
def items( self ): lis = [] for key in self.keys(): try: lis.append( (key, self[key]) ) except IndexError: lis.append( (key, self.dict[key]) ) return lis
a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d/cgi.py
if len (self.dict[key]) > location:
if len(self.dict[key]) > location:
def indexed_value(self, key, location): if self.dict.has_key(key): if len (self.dict[key]) > location: return self.dict[key][location] else: return None else: return None
a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d/cgi.py
print_directory() print_arguments()
def test(environ=os.environ): """Robust test CGI script, usable as main program. Write minimal HTTP headers and dump all information provided to the script in HTML form. """ import traceback print "Content-type: text/html" print sys.stderr = sys.stdout try: form = FieldStorage() # Replace with other classes to test...
a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d/cgi.py
print_directory() print_arguments()
def g(f=f): f()
a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d/cgi.py
ret = decompress(data)
ret = bz2.decompress(data)
def decompress(self, data): pop = popen2.Popen3("bunzip2", capturestderr=1) pop.tochild.write(data) pop.tochild.close() ret = pop.fromchild.read() pop.fromchild.close() if pop.wait() != 0: ret = decompress(data) return ret
499d09af92ec52d9cdfd7fc0353aff9fd3443b91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/499d09af92ec52d9cdfd7fc0353aff9fd3443b91/test_bz2.py
data = compress(self.TEXT)
if self.skip_decompress_tests: return data = bz2.compress(self.TEXT)
def testCompress(self): # "Test compress() function" data = compress(self.TEXT) self.assertEqual(self.decompress(data), self.TEXT)
499d09af92ec52d9cdfd7fc0353aff9fd3443b91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/499d09af92ec52d9cdfd7fc0353aff9fd3443b91/test_bz2.py
text = decompress(self.DATA)
text = bz2.decompress(self.DATA)
def testDecompress(self): # "Test decompress() function" text = decompress(self.DATA) self.assertEqual(text, self.TEXT)
499d09af92ec52d9cdfd7fc0353aff9fd3443b91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/499d09af92ec52d9cdfd7fc0353aff9fd3443b91/test_bz2.py
text = decompress("")
text = bz2.decompress("")
def testDecompressEmpty(self): # "Test decompress() function with empty string" text = decompress("") self.assertEqual(text, "")
499d09af92ec52d9cdfd7fc0353aff9fd3443b91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/499d09af92ec52d9cdfd7fc0353aff9fd3443b91/test_bz2.py
self.assertRaises(ValueError, decompress, self.DATA[:-10])
self.assertRaises(ValueError, bz2.decompress, self.DATA[:-10])
def testDecompressIncomplete(self): # "Test decompress() function with incomplete data" self.assertRaises(ValueError, decompress, self.DATA[:-10])
499d09af92ec52d9cdfd7fc0353aff9fd3443b91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/499d09af92ec52d9cdfd7fc0353aff9fd3443b91/test_bz2.py
test_support.run_unittest(BZ2FileTest) test_support.run_unittest(BZ2CompressorTest) test_support.run_unittest(BZ2DecompressorTest) test_support.run_unittest(FuncTest)
suite = unittest.TestSuite() for test in (BZ2FileTest, BZ2CompressorTest, BZ2DecompressorTest, FuncTest): suite.addTest(unittest.makeSuite(test)) test_support.run_suite(suite)
def test_main(): test_support.run_unittest(BZ2FileTest) test_support.run_unittest(BZ2CompressorTest) test_support.run_unittest(BZ2DecompressorTest) test_support.run_unittest(FuncTest)
499d09af92ec52d9cdfd7fc0353aff9fd3443b91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/499d09af92ec52d9cdfd7fc0353aff9fd3443b91/test_bz2.py
print 'Testing UTF-16 code point order comparisons...', assert u'\u0061' < u'\u20ac' assert u'\u0061' < u'\ud800\udc02' def test_lecmp(s, s2): assert s < s2 , "comparison failed on %s < %s" % (s, s2) def test_fixup(s): s2 = u'\ud800\udc01' test_lecmp(s, s2) s2 = u'\ud900\udc01' test_lecmp(s, s2) s2 = u'\uda00\udc...
if 0: print 'Testing UTF-16 code point order comparisons...', assert u'\u0061' < u'\u20ac' assert u'\u0061' < u'\ud800\udc02' def test_lecmp(s, s2): assert s < s2 , "comparison failed on %s < %s" % (s, s2) def test_fixup(s): s2 = u'\ud800\udc01' test_lecmp(s, s2) s2 = u'\ud900\udc01' test_lecmp(s, s2) s2 = u'\u...
test('capwords', u'abc\t def \nghi', u'Abc Def Ghi')
e5034378cc2e46f9a7233269a5687bfec8c8c303 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e5034378cc2e46f9a7233269a5687bfec8c8c303/test_unicode.py
def test_getstatus(self): # This pattern should match 'ls -ld /bin/ls' on any posix # system, however perversely configured. pat = r'''[l-]..x..x..x # It is executable. (May be a symlink.) \s+\d+ # It has some number of links. \s+\w+\s+\w+ # It has a user and group, which may # be named anything. [^/]* ...
4993c51b9436bc28126659519c362558fdcdd0d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4993c51b9436bc28126659519c362558fdcdd0d7/test_commands.py
pat = r'''[l-]..x..x..x
pat = r'''d.........
def test_getstatus(self): # This pattern should match 'ls -ld /bin/ls' on any posix # system, however perversely configured. pat = r'''[l-]..x..x..x # It is executable. (May be a symlink.) \s+\d+ # It has some number of links. \s+\w+\s+\w+ # It has a user and group, which may # be named anything. [^/]* ...
4993c51b9436bc28126659519c362558fdcdd0d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4993c51b9436bc28126659519c362558fdcdd0d7/test_commands.py
/bin/ls
/.
def test_getstatus(self): # This pattern should match 'ls -ld /bin/ls' on any posix # system, however perversely configured. pat = r'''[l-]..x..x..x # It is executable. (May be a symlink.) \s+\d+ # It has some number of links. \s+\w+\s+\w+ # It has a user and group, which may # be named anything. [^/]* ...
4993c51b9436bc28126659519c362558fdcdd0d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4993c51b9436bc28126659519c362558fdcdd0d7/test_commands.py
self.assert_(re.match(pat, getstatus("/bin/ls"), re.VERBOSE))
self.assert_(re.match(pat, getstatus("/."), re.VERBOSE))
def test_getstatus(self): # This pattern should match 'ls -ld /bin/ls' on any posix # system, however perversely configured. pat = r'''[l-]..x..x..x # It is executable. (May be a symlink.) \s+\d+ # It has some number of links. \s+\w+\s+\w+ # It has a user and group, which may # be named anything. [^/]* ...
4993c51b9436bc28126659519c362558fdcdd0d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4993c51b9436bc28126659519c362558fdcdd0d7/test_commands.py
self.package_dir = self.distribution.package_dir
self.package_dir = {} if self.distribution.package_dir: for name, path in self.distribution.package_dir.items(): self.package_dir[name] = convert_path(path)
def finalize_options (self): self.set_undefined_options('build', ('build_lib', 'build_lib'), ('force', 'force'))
0c350bfad0ec9350aec57e37962b1aadb8492173 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0c350bfad0ec9350aec57e37962b1aadb8492173/build_py.py
verify(str(c1).find('C instance at ') >= 0)
verify(str(c1).find('C object at ') >= 0)
def __getitem__(self, i): if 0 <= i < 10: return i raise IndexError
ff0e6d6ef542b5b4f3c31786aa152cec68598d4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ff0e6d6ef542b5b4f3c31786aa152cec68598d4f/test_descr.py
verify(str(d1).find('D instance at ') >= 0)
verify(str(d1).find('D object at ') >= 0)
def __getitem__(self, i): if 0 <= i < 10: return i raise IndexError
ff0e6d6ef542b5b4f3c31786aa152cec68598d4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ff0e6d6ef542b5b4f3c31786aa152cec68598d4f/test_descr.py
sys.settrace(gself.lobaltrace)
sys.settrace(self.globaltrace)
def runctx(self, cmd, globals=None, locals=None): if globals is None: globals = {} if locals is None: locals = {} if not self.donothing: sys.settrace(gself.lobaltrace) try: exec cmd in dict, dict finally: if not self.donothing: sys.settrace(None)
3a48ed94817fb3ec9c204160b606d344d67b1410 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3a48ed94817fb3ec9c204160b606d344d67b1410/trace.py
exec cmd in dict, dict
exec cmd in globals, locals
def runctx(self, cmd, globals=None, locals=None): if globals is None: globals = {} if locals is None: locals = {} if not self.donothing: sys.settrace(gself.lobaltrace) try: exec cmd in dict, dict finally: if not self.donothing: sys.settrace(None)
3a48ed94817fb3ec9c204160b606d344d67b1410 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3a48ed94817fb3ec9c204160b606d344d67b1410/trace.py
ignore_it = self.ignore.names(filename, modulename) if not ignore_it: if self.trace: print " --- modulename: %s, funcname: %s" % (modulename, funcname,) return self.localtrace
if modulename is not None: ignore_it = self.ignore.names(filename, modulename) if not ignore_it: if self.trace: print " --- modulename: %s, funcname: %s" % (modulename, funcname,) return self.localtrace
def globaltrace_lt(self, frame, why, arg): """ Handles `call' events (why == 'call') and if the code block being entered is to be ignored then it returns `None', else it returns `self.localtrace'. """ if why == 'call': (filename, lineno, funcname, context, lineindex,) = inspect.getframeinfo(frame, 0) # if DEBUG_MODE an...
3a48ed94817fb3ec9c204160b606d344d67b1410 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3a48ed94817fb3ec9c204160b606d344d67b1410/trace.py
try: print "%s(%d): %s" % (bname, lineno, context[lineindex],), except IndexError: pass
if context is not None: try: print "%s(%d): %s" % (bname, lineno, context[lineindex],), except IndexError: pass else: print "%s(???): ???" % bname
def localtrace_trace(self, frame, why, arg): if why == 'line': # XXX shouldn't do the count increment when arg is exception? But be careful to return self.localtrace when arg is exception! ? --Zooko 2001-10-14 # record the file name and line number of every trace # XXX I wish inspect offered me an optimized `getfilen...
3a48ed94817fb3ec9c204160b606d344d67b1410 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3a48ed94817fb3ec9c204160b606d344d67b1410/trace.py
self.assertEqual(binascii.a2b_qp("= "), "")
self.assertEqual(binascii.a2b_qp("= "), "= ")
def test_qp(self): # A test for SF bug 534347 (segfaults without the proper fix) try: binascii.a2b_qp("", **{1:1}) except TypeError: pass else: self.fail("binascii.a2b_qp(**{1:1}) didn't raise TypeError") self.assertEqual(binascii.a2b_qp("= "), "") self.assertEqual(binascii.a2b_qp("=="), "=") self.assertEqual(binascii....
dd3bffb679f8c76ffb1ac9a9a4a7fb515e0f4447 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/dd3bffb679f8c76ffb1ac9a9a4a7fb515e0f4447/test_binascii.py
testf.write(data)
if DEBUG: testf.write(data)
def write(self, data):
479c1b300871f297b716b25c2cd9494d51ace0c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/479c1b300871f297b716b25c2cd9494d51ace0c8/binhex.py
fss, ok = macfs.StandardGetFile()
fss, ok = macfs.PromptGetFile('File to convert:')
def _test(): if os.name == 'mac': fss, ok = macfs.StandardGetFile() if not ok: sys.exit(0) fname = fss.as_pathname() else: fname = sys.argv[1] #binhex(fname, fname+'.hqx') #hexbin(fname+'.hqx', fname+'.viahqx') hexbin(fname, fname+'.unpacked') sys.exit(1)
479c1b300871f297b716b25c2cd9494d51ace0c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/479c1b300871f297b716b25c2cd9494d51ace0c8/binhex.py
macostools.mkalias(os.path.join(sys.exec_prefix, src), dst)
do_copy = 0 if macfs.FSSpec(sys.exec_prefix).as_tuple()[0] != -1: try: import Dlg rv = Dlg.CautionAlert(ALERT_NONBOOT, None) if rv == ALERT_NONBOOT_COPY: do_copy = 1 except ImportError: pass if do_copy: macostools.copy(os.path.join(sys.exec_prefix, src), dst) else: macostools.mkalias(os.path.join(sys.exec_prefix, src),...
def mkcorealias(src, altsrc): import string import macostools version = string.split(sys.version)[0] dst = getextensiondirfile(src+ ' ' + version) if not os.path.exists(os.path.join(sys.exec_prefix, src)): if not os.path.exists(os.path.join(sys.exec_prefix, altsrc)): if verbose: print '*', src, 'not found' return 0 sr...
52b5b0221f7207a1dbd4b9b23885f6e89b8f109e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/52b5b0221f7207a1dbd4b9b23885f6e89b8f109e/ConfigurePython.py
def flush(self):
def flush(self,zlib_mode=zlib.Z_SYNC_FLUSH): if self.mode == WRITE: self.fileobj.write(self.compress.flush(zlib_mode))
def flush(self): self.fileobj.flush()
f2a8d63e4fac18c794ab99fd46999b36de35d11d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f2a8d63e4fac18c794ab99fd46999b36de35d11d/gzip.py
This is called by the http_error_30x methods when a redirection response is received. If a redirection should take place, return a new Request to allow http_error_30x to perform the redirect. Otherwise, raise HTTPError if no-one else should try to handle this url. Return None if you can't but another Handler might.
This is called by the http_error_30x methods when a redirection response is received. If a redirection should take place, return a new Request to allow http_error_30x to perform the redirect. Otherwise, raise HTTPError if no-one else should try to handle this url. Return None if you can't but another Handler might.
def redirect_request(self, req, fp, code, msg, headers, newurl): """Return a Request or None in response to a redirect.
aefae5570dddbf9f90b4c19b63aaeed6b43cedb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/aefae5570dddbf9f90b4c19b63aaeed6b43cedb6/urllib2.py
user, password = HTTPPasswordMgr.find_user_password(self,realm,authuri)
user, password = HTTPPasswordMgr.find_user_password(self, realm, authuri)
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)
aefae5570dddbf9f90b4c19b63aaeed6b43cedb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/aefae5570dddbf9f90b4c19b63aaeed6b43cedb6/urllib2.py
header = 'Authorization'
auth_header = 'Authorization'
def get_entity_digest(self, data, chal): # XXX not implemented yet return None
aefae5570dddbf9f90b4c19b63aaeed6b43cedb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/aefae5570dddbf9f90b4c19b63aaeed6b43cedb6/urllib2.py
header = 'Proxy-Authorization'
auth_header = 'Proxy-Authorization'
def http_error_401(self, req, fp, code, msg, headers): host = urlparse.urlparse(req.get_full_url())[1] self.http_error_auth_reqed('www-authenticate', host, req, headers)
aefae5570dddbf9f90b4c19b63aaeed6b43cedb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/aefae5570dddbf9f90b4c19b63aaeed6b43cedb6/urllib2.py
if s1[-2:] == "\r\n": s1 = s1[:-2] + "\n" sys.stdout.write(s1)
sys.stdout.write(s1.replace("\r\n", "\n"))
def debug(msg): pass
dc795b82aaa6943e1760ec34515d5dd82a57c4ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/dc795b82aaa6943e1760ec34515d5dd82a57c4ca/test_pty.py
if s2[-2:] == "\r\n": s2 = s2[:-2] + "\n" sys.stdout.write(s2)
sys.stdout.write(s2.replace("\r\n", "\n"))
def debug(msg): pass
dc795b82aaa6943e1760ec34515d5dd82a57c4ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/dc795b82aaa6943e1760ec34515d5dd82a57c4ca/test_pty.py