rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
if s != u'\xa0\xc2\u1234 \x11abc\xff\u1234':
if s != unicode(r'\xa0\xc2\u1234 \x11abc\xff\u1234', 'unicode-escape'):
def testunicode(): try: array.array('b', u'foo') except TypeError: pass else: raise TestFailed("creating a non-unicode array from " "a Unicode string should fail") x = array.array('u', u'\xa0\xc2\u1234') x.fromunicode(u' ') x.fromunicode(u'') x.fromunicode(u'') x.fromunicode(u'\x11abc\xff\u1234') s = x.tounicode() if ...
db6b399f23452fdc46f5281f0de1fff07600367f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/db6b399f23452fdc46f5281f0de1fff07600367f/test_array.py
s = u'\x00="\'a\\b\x80\xff\u0000\u0001\u1234'
s = unicode(r'\x00="\'a\\b\x80\xff\u0000\u0001\u1234', 'unicode-escape')
def testunicode(): try: array.array('b', u'foo') except TypeError: pass else: raise TestFailed("creating a non-unicode array from " "a Unicode string should fail") x = array.array('u', u'\xa0\xc2\u1234') x.fromunicode(u' ') x.fromunicode(u'') x.fromunicode(u'') x.fromunicode(u'\x11abc\xff\u1234') s = x.tounicode() if ...
db6b399f23452fdc46f5281f0de1fff07600367f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/db6b399f23452fdc46f5281f0de1fff07600367f/test_array.py
def test(): root = Tk() def doit(root=root): d = SimpleDialog(root,
if __name__ == '__main__': def test(): root = Tk() def doit(root=root): d = SimpleDialog(root,
def test(): root = Tk() def doit(root=root): d = SimpleDialog(root, text="This is a test dialog. " "Would this have been an actual dialog, " "the buttons below would have been glowing " "in soft pink light.\n" "Do you believe this?", buttons=["Yes", "No", "Cancel"], default=0, cancel=2, title="Test Dialog") print d.go...
604c179b1b09c34e7464045e39a9637011692031 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/604c179b1b09c34e7464045e39a9637011692031/SimpleDialog.py
print d.go() t = Button(root, text='Test', command=doit) t.pack() q = Button(root, text='Quit', command=t.quit) q.pack() t.mainloop()
print d.go() t = Button(root, text='Test', command=doit) t.pack() q = Button(root, text='Quit', command=t.quit) q.pack() t.mainloop()
def doit(root=root): d = SimpleDialog(root, text="This is a test dialog. " "Would this have been an actual dialog, " "the buttons below would have been glowing " "in soft pink light.\n" "Do you believe this?", buttons=["Yes", "No", "Cancel"], default=0, cancel=2, title="Test Dialog") print d.go()
604c179b1b09c34e7464045e39a9637011692031 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/604c179b1b09c34e7464045e39a9637011692031/SimpleDialog.py
if __name__ == '__main__':
def doit(root=root): d = SimpleDialog(root, text="This is a test dialog. " "Would this have been an actual dialog, " "the buttons below would have been glowing " "in soft pink light.\n" "Do you believe this?", buttons=["Yes", "No", "Cancel"], default=0, cancel=2, title="Test Dialog") print d.go()
604c179b1b09c34e7464045e39a9637011692031 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/604c179b1b09c34e7464045e39a9637011692031/SimpleDialog.py
args=(), kwargs={}, verbose=None):
args=(), kwargs=None, verbose=None):
def __init__(self, group=None, target=None, name=None, args=(), kwargs={}, verbose=None): assert group is None, "group argument must be None for now" _Verbose.__init__(self, verbose) self.__target = target self.__name = str(name or _newname()) self.__args = args self.__kwargs = kwargs self.__daemonic = self._set_daemon...
690241df6862860aaad09dff853c4669701e0a2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/690241df6862860aaad09dff853c4669701e0a2b/threading.py
def maybe_mutate(): global mutate if not mutate: return if random.random() < 0.5: return if random.random() < 0.5: target, keys = dict1, dict1keys else: target, keys = dict2, dict2keys if random.random() < 0.2: # Insert a new key. mutate = 0 # disable mutation until key inserted while 1: newkey = Horrid(random.rand...
95d4f6fec86d39e2a0acc5bafe09163df283195e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/95d4f6fec86d39e2a0acc5bafe09163df283195e/test_mutants.py
libraries, extradirs, extraexportsymbols, outputdir)
libraries, extradirs, extraexportsymbols, outputdir, libraryflags, stdlibraryflags, prefixname)
def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files....
736be72f8793ccab6608ce1c427e22d7e9182b29 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/736be72f8793ccab6608ce1c427e22d7e9182b29/genpluginprojects.py
libraries, extradirs, extraexportsymbols, outputdir)
libraries, extradirs, extraexportsymbols, outputdir, libraryflags, stdlibraryflags, prefixname)
def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files....
736be72f8793ccab6608ce1c427e22d7e9182b29 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/736be72f8793ccab6608ce1c427e22d7e9182b29/genpluginprojects.py
genpluginproject("all", "_Res", outputdir="::Lib:Carbon")
genpluginproject("all", "_Res", stdlibraryflags="Debug, WeakImport", outputdir="::Lib:Carbon")
def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files....
736be72f8793ccab6608ce1c427e22d7e9182b29 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/736be72f8793ccab6608ce1c427e22d7e9182b29/genpluginprojects.py
nil = fp.read() fp.close()
def http_error_302(self, req, fp, code, msg, headers): if headers.has_key('location'): newurl = headers['location'] elif headers.has_key('uri'): newurl = headers['uri'] else: return nil = fp.read() fp.close()
5bbbd4294ac08f3fc66ccaa5a749c7ff417782f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5bbbd4294ac08f3fc66ccaa5a749c7ff417782f0/urllib2.py
self.inf_msg + msg, headers)
self.inf_msg + msg, headers, fp)
def http_error_302(self, req, fp, code, msg, headers): if headers.has_key('location'): newurl = headers['location'] elif headers.has_key('uri'): newurl = headers['uri'] else: return nil = fp.read() fp.close()
5bbbd4294ac08f3fc66ccaa5a749c7ff417782f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5bbbd4294ac08f3fc66ccaa5a749c7ff417782f0/urllib2.py
p
def do_proxy(self, p, req): p return self.parent.open(req)
5bbbd4294ac08f3fc66ccaa5a749c7ff417782f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5bbbd4294ac08f3fc66ccaa5a749c7ff417782f0/urllib2.py
passwd = HTTPPassowrdMgr()
passwd = HTTPPasswordMgr()
def __init__(self, passwd=None): if passwd is None: passwd = HTTPPassowrdMgr() self.passwd = passwd self.add_password = self.passwd.add_password self.__current_realm = None
5bbbd4294ac08f3fc66ccaa5a749c7ff417782f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5bbbd4294ac08f3fc66ccaa5a749c7ff417782f0/urllib2.py
opener = OpenerDirectory()
opener = OpenerDirector()
def build_opener(self): opener = OpenerDirectory() for ph in self.proxy_handlers: if type(ph) == types.ClassType: ph = ph() opener.add_handler(ph)
5bbbd4294ac08f3fc66ccaa5a749c7ff417782f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5bbbd4294ac08f3fc66ccaa5a749c7ff417782f0/urllib2.py
a[8] and b[17] match for 6 elements a[14] and b[23] match for 15 elements
a[8] and b[17] match for 21 elements
def _calculate_ratio(matches, length): if length: return 2.0 * matches / length return 1.0
7c9c388d5233d32b2025500c5dff79a1fc55ab98 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7c9c388d5233d32b2025500c5dff79a1fc55ab98/difflib.py
equal a[8:14] b[17:23] equal a[14:29] b[23:38]
equal a[8:29] b[17:38]
def _calculate_ratio(matches, length): if length: return 2.0 * matches / length return 1.0
7c9c388d5233d32b2025500c5dff79a1fc55ab98 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7c9c388d5233d32b2025500c5dff79a1fc55ab98/difflib.py
i and in j.
i and in j. New in Python 2.5, it's also guaranteed that if (i, j, n) and (i', j', n') are adjacent triples in the list, and the second is not the last triple in the list, then i+n != i' or j+n != j'. IOW, adjacent triples never describe adjacent equal blocks.
def get_matching_blocks(self): """Return list of triples describing matching subsequences.
7c9c388d5233d32b2025500c5dff79a1fc55ab98 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7c9c388d5233d32b2025500c5dff79a1fc55ab98/difflib.py
self.matching_blocks = matching_blocks = []
def get_matching_blocks(self): """Return list of triples describing matching subsequences.
7c9c388d5233d32b2025500c5dff79a1fc55ab98 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7c9c388d5233d32b2025500c5dff79a1fc55ab98/difflib.py
matching_blocks.append( (la, lb, 0) ) return matching_blocks
i1 = j1 = k1 = 0 non_adjacent = [] for i2, j2, k2 in matching_blocks: if i1 + k1 == i2 and j1 + k1 == j2: k1 += k2 else: if k1: non_adjacent.append((i1, j1, k1)) i1, j1, k1 = i2, j2, k2 if k1: non_adjacent.append((i1, j1, k1)) non_adjacent.append( (la, lb, 0) ) self.matching_blocks = non_adjacent return sel...
def get_matching_blocks(self): """Return list of triples describing matching subsequences.
7c9c388d5233d32b2025500c5dff79a1fc55ab98 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7c9c388d5233d32b2025500c5dff79a1fc55ab98/difflib.py
self.msg('IAC %s %d', c == DO and 'DO' or 'DONT', ord(c)) self.sock.send(IAC + WONT + opt)
self.msg('IAC %s %d', c == DO and 'DO' or 'DONT', ord(opt)) if self.option_callback: self.option_callback(self.sock, c, opt) else: self.sock.send(IAC + WONT + opt)
def process_rawq(self): """Transfer from raw queue to cooked queue.
74cc4ec526faf0009042444a5c11ab2ac3aa5aae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/74cc4ec526faf0009042444a5c11ab2ac3aa5aae/telnetlib.py
c == WILL and 'WILL' or 'WONT', ord(c)) self.sock.send(IAC + DONT + opt)
c == WILL and 'WILL' or 'WONT', ord(opt)) if self.option_callback: self.option_callback(self.sock, c, opt) else: self.sock.send(IAC + DONT + opt)
def process_rawq(self): """Transfer from raw queue to cooked queue.
74cc4ec526faf0009042444a5c11ab2ac3aa5aae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/74cc4ec526faf0009042444a5c11ab2ac3aa5aae/telnetlib.py
self.msg('IAC %s not recognized' % `c`)
self.msg('IAC %d not recognized' % ord(opt))
def process_rawq(self): """Transfer from raw queue to cooked queue.
74cc4ec526faf0009042444a5c11ab2ac3aa5aae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/74cc4ec526faf0009042444a5c11ab2ac3aa5aae/telnetlib.py
for l in text[1:]: lines.append (big_indent + l)
def generate_help (self, header=None): """Generate help text (a list of strings, one per suggested line of output) from the option table for this FancyGetopt object."""
5b9fd6c67e4f04c5fa9be8e421bcfae30f303bcc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5b9fd6c67e4f04c5fa9be8e421bcfae30f303bcc/fancy_getopt.py
def putrequest(self, method, url, skip_host=0):
def putrequest(self, method, url, skip_host=0, skip_accept_encoding=0):
def putrequest(self, method, url, skip_host=0): """Send a request to the server.
24c2750f2d068b58dcf29a18cd2cae41c07ff188 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/24c2750f2d068b58dcf29a18cd2cae41c07ff188/httplib.py
def putrequest(self, method, url, skip_host=0): """Send a request to the server.
24c2750f2d068b58dcf29a18cd2cae41c07ff188 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/24c2750f2d068b58dcf29a18cd2cae41c07ff188/httplib.py
self.putheader('Accept-Encoding', 'identity')
if not skip_accept_encoding: self.putheader('Accept-Encoding', 'identity')
def putrequest(self, method, url, skip_host=0): """Send a request to the server.
24c2750f2d068b58dcf29a18cd2cae41c07ff188 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/24c2750f2d068b58dcf29a18cd2cae41c07ff188/httplib.py
verify(float(a).__class__ is float)
def __repr__(self): return "%.*g" % (self.prec, self)
9a6cf0303393fd29c3b95f4fa62a8b8a590d8694 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9a6cf0303393fd29c3b95f4fa62a8b8a590d8694/test_descr.py
self.announce(e.msg, log.ERROR)
self.announce(str(e), log.ERROR)
def upload_file(self, command, pyversion, filename): # Sign if requested if self.sign: gpg_args = ["gpg", "--detach-sign", "-a", filename] if self.identity: gpg_args[2:2] = ["--local-user", self.identity] spawn(gpg_args, dry_run=self.dry_run)
58ad189776930998dfece005da86eba6a7b01c5e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58ad189776930998dfece005da86eba6a7b01c5e/upload.py
except IOError:
except IOError, reason:
def main(self):
f25521a6d07c968b7f585598e43d332e4c2af3bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f25521a6d07c968b7f585598e43d332e4c2af3bb/pybench.py
except IOError:
except IOError, reason:
def main(self):
f25521a6d07c968b7f585598e43d332e4c2af3bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f25521a6d07c968b7f585598e43d332e4c2af3bb/pybench.py
if timeout is None: while not self.__stopped: self.__block.wait() if __debug__: self._note("%s.join(): thread stopped", self) else: deadline = _time() + timeout while not self.__stopped: delay = deadline - _time() if delay <= 0: if __debug__: self._note("%s.join(): timed out", self) break self.__block.wait(delay) else:...
try: if timeout is None: while not self.__stopped: self.__block.wait()
def join(self, timeout=None): assert self.__initialized, "Thread.__init__() not called" assert self.__started, "cannot join thread before it is started" assert self is not currentThread(), "cannot join current thread" if __debug__: if not self.__stopped: self._note("%s.join(): waiting until thread stops", self) self.__...
c66948eac73f4d518ea76bb4ea45f37eaf5744cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c66948eac73f4d518ea76bb4ea45f37eaf5744cc/threading.py
self.__block.release()
else: deadline = _time() + timeout while not self.__stopped: delay = deadline - _time() if delay <= 0: if __debug__: self._note("%s.join(): timed out", self) break self.__block.wait(delay) else: if __debug__: self._note("%s.join(): thread stopped", self) finally: self.__block.release()
def join(self, timeout=None): assert self.__initialized, "Thread.__init__() not called" assert self.__started, "cannot join thread before it is started" assert self is not currentThread(), "cannot join current thread" if __debug__: if not self.__stopped: self._note("%s.join(): waiting until thread stops", self) self.__...
c66948eac73f4d518ea76bb4ea45f37eaf5744cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c66948eac73f4d518ea76bb4ea45f37eaf5744cc/threading.py
except pickle.UnpicklingError:
except pickle.PicklingError:
def putmessage(self, message): self.debug("putmessage:%d:" % message[0]) try: s = pickle.dumps(message) except pickle.UnpicklingError: print >>sys.__stderr__, "Cannot pickle:", `message` raise s = struct.pack("<i", len(s)) + s while len(s) > 0: try: n = self.sock.send(s) except (AttributeError, socket.error): # socket ...
a59f7ae2730843e575e136e132cfcbe24a1d8b59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a59f7ae2730843e575e136e132cfcbe24a1d8b59/rpc.py
n = self.sock.send(s)
r, w, x = select.select([], [self.sock], []) n = self.sock.send(s[:BUFSIZE])
def putmessage(self, message): self.debug("putmessage:%d:" % message[0]) try: s = pickle.dumps(message) except pickle.UnpicklingError: print >>sys.__stderr__, "Cannot pickle:", `message` raise s = struct.pack("<i", len(s)) + s while len(s) > 0: try: n = self.sock.send(s) except (AttributeError, socket.error): # socket ...
a59f7ae2730843e575e136e132cfcbe24a1d8b59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a59f7ae2730843e575e136e132cfcbe24a1d8b59/rpc.py
def ioready(self, wait): r, w, x = select.select([self.sock.fileno()], [], [], wait) return len(r)
def ioready(self, wait): r, w, x = select.select([self.sock.fileno()], [], [], wait) return len(r)
a59f7ae2730843e575e136e132cfcbe24a1d8b59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a59f7ae2730843e575e136e132cfcbe24a1d8b59/rpc.py
if not self.ioready(wait):
r, w, x = select.select([self.sock.fileno()], [], [], wait) if len(r) == 0:
def pollpacket(self, wait): self._stage0() if len(self.buffer) < self.bufneed: if not self.ioready(wait): return None try: s = self.sock.recv(BUFSIZE) except socket.error: raise EOFError if len(s) == 0: raise EOFError self.buffer += s self._stage0() return self._stage1()
a59f7ae2730843e575e136e132cfcbe24a1d8b59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a59f7ae2730843e575e136e132cfcbe24a1d8b59/rpc.py
except:
except pickle.UnpicklingError:
def pollmessage(self, wait): packet = self.pollpacket(wait) if packet is None: return None try: message = pickle.loads(packet) except: print >>sys.__stderr__, "-----------------------" print >>sys.__stderr__, "cannot unpickle packet:", `packet` traceback.print_stack(file=sys.__stderr__) print >>sys.__stderr__, "-------...
a59f7ae2730843e575e136e132cfcbe24a1d8b59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a59f7ae2730843e575e136e132cfcbe24a1d8b59/rpc.py
for data in f[1]: data = convert_path(data) (out, _) = self.copy_file(data, dir) self.outfiles.append(out)
if f[1] == []: self.outfiles.append(dir) else: for data in f[1]: data = convert_path(data) (out, _) = self.copy_file(data, dir) self.outfiles.append(out)
def run (self): self.mkpath(self.install_dir) for f in self.data_files: if type(f) == StringType: # it's a simple file, so copy it f = convert_path(f) if self.warn_dir: self.warn("setup script did not provide a directory for " "'%s' -- installing right in '%s'" % (f, self.install_dir)) (out, _) = self.copy_file(f, self...
76ae1f54051b988220b9adba5ba190d36c3ef0de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/76ae1f54051b988220b9adba5ba190d36c3ef0de/install_data.py
from Carbon import Qd
def close(self): if self.editgroup.editor.changed: import EasyDialogs from Carbon import Qd Qd.InitCursor() save = EasyDialogs.AskYesNoCancel('Save window "%s" before closing?' % self.title, default=1, no="Don\xd5t save") if save > 0: if self.domenu_save(): return 1 elif save < 0: return 1 self.globals = None W.Window....
cc05327f1a884449e59676683450b01d0a266b10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cc05327f1a884449e59676683450b01d0a266b10/PyEdit.py
import Qd; Qd.InitCursor()
Qd.InitCursor()
def _run(self): if self.run_with_interpreter: if self.editgroup.editor.changed: import EasyDialogs import Qd; Qd.InitCursor() save = EasyDialogs.AskYesNoCancel('Save "%s" before running?' % self.title, 1) if save > 0: if self.domenu_save(): return elif save < 0: return if not self.path: raise W.AlertError, "Can't run u...
cc05327f1a884449e59676683450b01d0a266b10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cc05327f1a884449e59676683450b01d0a266b10/PyEdit.py
if self._eoln != '\n': import EasyDialogs ok = EasyDialogs.AskYesNoCancel('Warning: "%s" does not have Unix line-endings' % self.title, 1, yes='OK', no='') if not ok: return
def _run(self): if self.run_with_interpreter: if self.editgroup.editor.changed: import EasyDialogs import Qd; Qd.InitCursor() save = EasyDialogs.AskYesNoCancel('Save "%s" before running?' % self.title, 1) if save > 0: if self.domenu_save(): return elif save < 0: return if not self.path: raise W.AlertError, "Can't run u...
cc05327f1a884449e59676683450b01d0a266b10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cc05327f1a884449e59676683450b01d0a266b10/PyEdit.py
import Qd; Qd.InitCursor()
Qd.InitCursor()
def _run(self): if self.run_with_interpreter: if self.editgroup.editor.changed: import EasyDialogs import Qd; Qd.InitCursor() save = EasyDialogs.AskYesNoCancel('Save "%s" before running?' % self.title, 1) if save > 0: if self.domenu_save(): return elif save < 0: return if not self.path: raise W.AlertError, "Can't run u...
cc05327f1a884449e59676683450b01d0a266b10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cc05327f1a884449e59676683450b01d0a266b10/PyEdit.py
if type(value) != type([]):
if type(value) not in (type([]), type( () )):
def post_to_server(self, data, auth=None): ''' Post a query to the server, and return a string response. '''
f94437b9b874785c3086a112b0fe140bbe66031e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f94437b9b874785c3086a112b0fe140bbe66031e/register.py
def seek(self, pos, whence=0): if whence==1: self.pos = self.pos + pos if whence==2: self.pos = self.stop + pos else: self.pos = self.start + pos
def __init__(self, fp, factory=rfc822.Message): self.fp = fp self.seekp = 0 self.factory = factory
8abcfe7656ab064f04db590da57f5f696b307f4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8abcfe7656ab064f04db590da57f5f696b307f4a/mailbox.py
self.closed = 0
self.closed = False
def __init__(self, buf = ''): # Force self.buf to be a string or unicode if not isinstance(buf, basestring): buf = str(buf) self.buf = buf self.len = len(buf) self.buflist = [] self.pos = 0 self.closed = 0 self.softspace = 0
6542690b4188f7f53b198ea23efc9b5bbea194dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6542690b4188f7f53b198ea23efc9b5bbea194dc/StringIO.py
self.closed = 1
self.closed = True
def close(self): """Free the memory buffer. """ if not self.closed: self.closed = 1 del self.buf, self.pos
6542690b4188f7f53b198ea23efc9b5bbea194dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6542690b4188f7f53b198ea23efc9b5bbea194dc/StringIO.py
if self.closed: raise ValueError, "I/O operation on closed file"
_complain_ifclosed(self.closed)
def isatty(self): if self.closed: raise ValueError, "I/O operation on closed file" return False
6542690b4188f7f53b198ea23efc9b5bbea194dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6542690b4188f7f53b198ea23efc9b5bbea194dc/StringIO.py
if self.closed: raise ValueError, "I/O operation on closed file"
_complain_ifclosed(self.closed)
def seek(self, pos, mode = 0): if self.closed: raise ValueError, "I/O operation on closed file" if self.buflist: self.buf += ''.join(self.buflist) self.buflist = [] if mode == 1: pos += self.pos elif mode == 2: pos += self.len self.pos = max(0, pos)
6542690b4188f7f53b198ea23efc9b5bbea194dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6542690b4188f7f53b198ea23efc9b5bbea194dc/StringIO.py
if self.closed: raise ValueError, "I/O operation on closed file"
_complain_ifclosed(self.closed)
def tell(self): if self.closed: raise ValueError, "I/O operation on closed file" return self.pos
6542690b4188f7f53b198ea23efc9b5bbea194dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6542690b4188f7f53b198ea23efc9b5bbea194dc/StringIO.py
if self.closed: raise ValueError, "I/O operation on closed file"
_complain_ifclosed(self.closed)
def read(self, n = -1): if self.closed: raise ValueError, "I/O operation on closed file" if self.buflist: self.buf += ''.join(self.buflist) self.buflist = [] if n < 0: newpos = self.len else: newpos = min(self.pos+n, self.len) r = self.buf[self.pos:newpos] self.pos = newpos return r
6542690b4188f7f53b198ea23efc9b5bbea194dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6542690b4188f7f53b198ea23efc9b5bbea194dc/StringIO.py
if self.closed: raise ValueError, "I/O operation on closed file"
_complain_ifclosed(self.closed)
def readline(self, length=None): if self.closed: raise ValueError, "I/O operation on closed file" if self.buflist: self.buf += ''.join(self.buflist) self.buflist = [] i = self.buf.find('\n', self.pos) if i < 0: newpos = self.len else: newpos = i+1 if length is not None: if self.pos + length < newpos: newpos = self.pos ...
6542690b4188f7f53b198ea23efc9b5bbea194dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6542690b4188f7f53b198ea23efc9b5bbea194dc/StringIO.py
if self.closed: raise ValueError, "I/O operation on closed file"
_complain_ifclosed(self.closed)
def truncate(self, size=None): if self.closed: raise ValueError, "I/O operation on closed file" if size is None: size = self.pos elif size < 0: raise IOError(EINVAL, "Negative size not allowed") elif size < self.pos: self.pos = size self.buf = self.getvalue()[:size]
6542690b4188f7f53b198ea23efc9b5bbea194dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6542690b4188f7f53b198ea23efc9b5bbea194dc/StringIO.py
if self.closed: raise ValueError, "I/O operation on closed file"
_complain_ifclosed(self.closed)
def write(self, s): if self.closed: raise ValueError, "I/O operation on closed file" if not s: return # Force s to be a string or unicode if not isinstance(s, basestring): s = str(s) if self.pos == self.len: self.buflist.append(s) self.len = self.pos = self.pos + len(s) return if self.pos > self.len: self.buflist.appen...
6542690b4188f7f53b198ea23efc9b5bbea194dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6542690b4188f7f53b198ea23efc9b5bbea194dc/StringIO.py
if self.closed: raise ValueError, "I/O operation on closed file"
_complain_ifclosed(self.closed)
def flush(self): if self.closed: raise ValueError, "I/O operation on closed file"
6542690b4188f7f53b198ea23efc9b5bbea194dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6542690b4188f7f53b198ea23efc9b5bbea194dc/StringIO.py
except TypeError:
except (AttributeError, TypeError):
def softspace(file, newvalue): oldvalue = 0 try: oldvalue = file.softspace except AttributeError: pass try: file.softspace = newvalue except TypeError: # "attribute-less object" or "read-only attributes" pass return oldvalue
9dd492d59a9939223645f1625527ebc0d179b44f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9dd492d59a9939223645f1625527ebc0d179b44f/code.py
raise ValueError("time data did not match format")
raise ValueError("time data did not match format: data=%s fmt=%s" % (data_string, format))
def strptime(data_string, format="%a %b %d %H:%M:%S %Y"): """Return a time struct based on the input data and the format string.""" global _locale_cache global _regex_cache locale_time = _locale_cache.locale_time # If the language changes, caches are invalidated, so clear them if locale_time.lang != _getlang(): _locale...
bed2a30cdaaf5bbf3937ed3e63290b22ca65f5c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bed2a30cdaaf5bbf3937ed3e63290b22ca65f5c6/_strptime.py
'marshal', 'math', 'md5', 'operator',
'math', 'md5', 'operator',
def reload(self, module, path=None): if path is None and hasattr(module, '__filename__'): head, tail = os.path.split(module.__filename__) path = [os.path.join(head, '')] return ihooks.ModuleImporter.reload(self, module, path)
026e8e32c712985e0d526be5af142d174027c2e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/026e8e32c712985e0d526be5af142d174027c2e8/rexec.py
'Content-Type: %s\n' % (mtype or 'text/plain'))) host, file = splithost(url)
'Content-Type: %s\nContent-Length: %d\nLast-modified: %s\n' % (mtype or 'text/plain', size, modified)))
def open_local_file(self, url): """Use local file.""" import mimetypes, mimetools, StringIO mtype = mimetypes.guess_type(url)[0] headers = mimetools.Message(StringIO.StringIO( 'Content-Type: %s\n' % (mtype or 'text/plain'))) host, file = splithost(url) if not host: urlfile = file if file[:1] == '/': urlfile = 'file://'...
ef141c8252e5527b22cd6ac842db63a0ffa522a0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ef141c8252e5527b22cd6ac842db63a0ffa522a0/urllib.py
return addinfourl(open(url2pathname(file), 'rb'),
return addinfourl(open(localname, 'rb'),
def open_local_file(self, url): """Use local file.""" import mimetypes, mimetools, StringIO mtype = mimetypes.guess_type(url)[0] headers = mimetools.Message(StringIO.StringIO( 'Content-Type: %s\n' % (mtype or 'text/plain'))) host, file = splithost(url) if not host: urlfile = file if file[:1] == '/': urlfile = 'file://'...
ef141c8252e5527b22cd6ac842db63a0ffa522a0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ef141c8252e5527b22cd6ac842db63a0ffa522a0/urllib.py
return addinfourl(open(url2pathname(file), 'rb'),
return addinfourl(open(localname, 'rb'),
def open_local_file(self, url): """Use local file.""" import mimetypes, mimetools, StringIO mtype = mimetypes.guess_type(url)[0] headers = mimetools.Message(StringIO.StringIO( 'Content-Type: %s\n' % (mtype or 'text/plain'))) host, file = splithost(url) if not host: urlfile = file if file[:1] == '/': urlfile = 'file://'...
ef141c8252e5527b22cd6ac842db63a0ffa522a0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ef141c8252e5527b22cd6ac842db63a0ffa522a0/urllib.py
"exclude=", "include=", "package=", "strip")
"exclude=", "include=", "package=", "strip", "iconfile=")
def main(builder=None): if builder is None: builder = AppBuilder(verbosity=1) shortopts = "b:n:r:e:m:c:p:lx:i:hvq" longopts = ("builddir=", "name=", "resource=", "executable=", "mainprogram=", "creator=", "nib=", "plist=", "link", "link-exec", "help", "verbose", "quiet", "standalone", "exclude=", "include=", "package=...
11edf2e129a41542c8d7ba1370ddf7d44d0a83e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11edf2e129a41542c8d7ba1370ddf7d44d0a83e0/bundlebuilder.py
p = Parser()
p = Parser(strict=1)
def test_bogus_boundary(self): fp = openfile(findfile('msg_15.txt')) try: data = fp.read() finally: fp.close() p = Parser() # Note, under a future non-strict parsing mode, this would parse the # message into the intended message tree. self.assertRaises(Errors.BoundaryError, p.parsestr, data)
1b82ccf34f8b7355442a0e6e3588865865ad1f2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1b82ccf34f8b7355442a0e6e3588865865ad1f2b/test_email.py
ExistingwasteObj_New, &we) ) return NULL;
WEOObj_Convert, &we) ) return NULL;
def outputCheckNewArg(self): Output("""if (itself == NULL) { Py_INCREF(Py_None); return Py_None; }""")
6a203c59d146d7c0c26c935bc767ceadc00ee8f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6a203c59d146d7c0c26c935bc767ceadc00ee8f5/wastesupport.py
def join(a, b): if isabs(b): return b if a == '' or a[-1:] in '/\\': return a + b return a + os.sep + b
def join(a, *p): path = a for b in p: if isabs(b): path = b elif path == '' or path[-1:] in '/\\': path = path + b else: path = path + os.sep + b return path
def isabs(s): s = splitdrive(s)[1] return s != '' and s[:1] in '/\\'
0f0b31022413145aa92ee61b6ae46482b4e1c46b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0f0b31022413145aa92ee61b6ae46482b4e1c46b/dospath.py
option = string.lower(option)
option = self.optionxform(option)
def get(self, section, option, raw=0, vars=None): """Get an option value for a given section.
c1da1078f47d55e42fecc2a9e46047446172dd40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c1da1078f47d55e42fecc2a9e46047446172dd40/ConfigParser.py
__SECTCRE = re.compile(
SECTCRE = re.compile(
def getboolean(self, section, option): v = self.get(section, option) val = string.atoi(v) if val not in (0, 1): raise ValueError, 'Not a boolean: %s' % v return val
c1da1078f47d55e42fecc2a9e46047446172dd40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c1da1078f47d55e42fecc2a9e46047446172dd40/ConfigParser.py
__OPTCRE = re.compile(
OPTCRE = re.compile(
def getboolean(self, section, option): v = self.get(section, option) val = string.atoi(v) if val not in (0, 1): raise ValueError, 'Not a boolean: %s' % v return val
c1da1078f47d55e42fecc2a9e46047446172dd40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c1da1078f47d55e42fecc2a9e46047446172dd40/ConfigParser.py
mo = self.__SECTCRE.match(line)
mo = self.SECTCRE.match(line)
def __read(self, fp): """Parse a sectioned setup file.
c1da1078f47d55e42fecc2a9e46047446172dd40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c1da1078f47d55e42fecc2a9e46047446172dd40/ConfigParser.py
mo = self.__OPTCRE.match(line)
mo = self.OPTCRE.match(line)
def __read(self, fp): """Parse a sectioned setup file.
c1da1078f47d55e42fecc2a9e46047446172dd40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c1da1078f47d55e42fecc2a9e46047446172dd40/ConfigParser.py
opts, args = getopt.getopt(sys.argv[1:], 'e:p:')
opts, args = getopt.getopt(sys.argv[1:], 'e:p:P:')
def main(): # overridable context prefix = PREFIX # settable with -p option extensions = [] path = sys.path # output files frozen_c = 'frozen.c' config_c = 'config.c' target = 'a.out' # normally derived from script name makefile = 'Makefile' # parse command line try: opts, args = getopt.getopt(sys.argv[1:], 'e:p:'...
bbf003ce64fe627cd70357565d8e6a46983244b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bbf003ce64fe627cd70357565d8e6a46983244b7/freeze.py
binlib = os.path.join(prefix, 'lib/python/lib')
binlib = os.path.join(exec_prefix, 'lib/python/lib')
def main(): # overridable context prefix = PREFIX # settable with -p option extensions = [] path = sys.path # output files frozen_c = 'frozen.c' config_c = 'config.c' target = 'a.out' # normally derived from script name makefile = 'Makefile' # parse command line try: opts, args = getopt.getopt(sys.argv[1:], 'e:p:'...
bbf003ce64fe627cd70357565d8e6a46983244b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bbf003ce64fe627cd70357565d8e6a46983244b7/freeze.py
defines = ['-DHAVE_CONFIG_H', '-DUSE_FROZEN', '-DNO_MAIN',
defines = ['-DHAVE_CONFIG_H',
def main(): # overridable context prefix = PREFIX # settable with -p option extensions = [] path = sys.path # output files frozen_c = 'frozen.c' config_c = 'config.c' target = 'a.out' # normally derived from script name makefile = 'Makefile' # parse command line try: opts, args = getopt.getopt(sys.argv[1:], 'e:p:'...
bbf003ce64fe627cd70357565d8e6a46983244b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bbf003ce64fe627cd70357565d8e6a46983244b7/freeze.py
for dir in [prefix, binlib, incldir] + extensions:
for dir in [prefix, exec_prefix, binlib, incldir] + extensions:
def main(): # overridable context prefix = PREFIX # settable with -p option extensions = [] path = sys.path # output files frozen_c = 'frozen.c' config_c = 'config.c' target = 'a.out' # normally derived from script name makefile = 'Makefile' # parse command line try: opts, args = getopt.getopt(sys.argv[1:], 'e:p:'...
bbf003ce64fe627cd70357565d8e6a46983244b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bbf003ce64fe627cd70357565d8e6a46983244b7/freeze.py
for file in config_c_in, makefile_in, frozenmain_c:
for file in [config_c_in, makefile_in] + supp_sources:
def main(): # overridable context prefix = PREFIX # settable with -p option extensions = [] path = sys.path # output files frozen_c = 'frozen.c' config_c = 'config.c' target = 'a.out' # normally derived from script name makefile = 'Makefile' # parse command line try: opts, args = getopt.getopt(sys.argv[1:], 'e:p:'...
bbf003ce64fe627cd70357565d8e6a46983244b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bbf003ce64fe627cd70357565d8e6a46983244b7/freeze.py
files = ['$(OPT)', config_c, frozen_c, frozenmain_c] + \ addfiles + libs + \
files = ['$(OPT)', config_c, frozen_c] + \ supp_sources + addfiles + libs + \
def main(): # overridable context prefix = PREFIX # settable with -p option extensions = [] path = sys.path # output files frozen_c = 'frozen.c' config_c = 'config.c' target = 'a.out' # normally derived from script name makefile = 'Makefile' # parse command line try: opts, args = getopt.getopt(sys.argv[1:], 'e:p:'...
bbf003ce64fe627cd70357565d8e6a46983244b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bbf003ce64fe627cd70357565d8e6a46983244b7/freeze.py
doc(arg)
help.help(arg)
def stopped(): print 'pydoc server stopped'
e83ab454f498bc3440faadf86f62b002191e1722 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e83ab454f498bc3440faadf86f62b002191e1722/pydoc.py
function, module, or package, or a dotted reference to a class or function within a module or module in a package. If <name> contains a '%s', it is used as the path to a Python source file to document.
Python keyword, topic, function, module, or package, or a dotted reference to a class or function within a module or module in a package. If <name> contains a '%s', it is used as the path to a Python source file to document. If name is 'keywords', 'topics', or 'modules', a listing of these things is displayed.
def stopped(): print 'pydoc server stopped'
e83ab454f498bc3440faadf86f62b002191e1722 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e83ab454f498bc3440faadf86f62b002191e1722/pydoc.py
self.c_func_name = arg
self.c_func_name = repr(arg)
def trace_dispatch(self, frame, event, arg): timer = self.timer t = timer() t = t[0] + t[1] - self.t - self.bias
4bebed7f41d355b06ad80be190d79611a385cc7e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4bebed7f41d355b06ad80be190d79611a385cc7e/profile.py
self.c_func_name = arg
self.c_func_name = repr(arg)
def trace_dispatch_i(self, frame, event, arg): timer = self.timer t = timer() - self.t - self.bias
4bebed7f41d355b06ad80be190d79611a385cc7e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4bebed7f41d355b06ad80be190d79611a385cc7e/profile.py
self.c_func_name = arg
self.c_func_name = repr(arg)
def trace_dispatch_mac(self, frame, event, arg): timer = self.timer t = timer()/60.0 - self.t - self.bias
4bebed7f41d355b06ad80be190d79611a385cc7e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4bebed7f41d355b06ad80be190d79611a385cc7e/profile.py
self.c_func_name = arg
self.c_func_name = repr(arg)
def trace_dispatch_l(self, frame, event, arg): get_time = self.get_time t = get_time() - self.t - self.bias
4bebed7f41d355b06ad80be190d79611a385cc7e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4bebed7f41d355b06ad80be190d79611a385cc7e/profile.py
'Copyright: ' + self.distribution.get_license(),
'License: ' + self.distribution.get_license(),
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...
240e94eb9587bcf37cf89cb03f6c342e861c0392 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/240e94eb9587bcf37cf89cb03f6c342e861c0392/bdist_rpm.py
'include_dirs', if given, must be a list of strings, the directories to add to the default include file search path for this compilation only.
'include_dirs', if given, must be a list of strings, the directories to add to the default include file search path for this compilation only. 'debug' is a boolean; if true, the compiler will be instructed to output debug symbols in (or alongside) the object file(s).
def compile (self, sources, output_dir=None, macros=None, include_dirs=None, extra_preargs=None, extra_postargs=None): """Compile one or more C/C++ source files. 'sources' must be a list of strings, each one the name of a C/C++ source file. Return a list of the object filenames generated (one for each source filename...
ad52244351623d70cabe2a37810a940852ec67bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ad52244351623d70cabe2a37810a940852ec67bb/ccompiler.py
output_dir=None):
output_dir=None, debug=0):
def link_static_lib (self, objects, output_libname, output_dir=None): """Link a bunch of stuff together to create a static library file. The "bunch of stuff" consists of the list of object files supplied as 'objects', the extra object files supplied to 'add_link_object()' and/or 'set_link_objects()', the libraries sup...
ad52244351623d70cabe2a37810a940852ec67bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ad52244351623d70cabe2a37810a940852ec67bb/ccompiler.py
'output_libname' should be a library name, not a filename; the filename will be inferred from the library name.
'output_libname' should be a library name, not a filename; the filename will be inferred from the library name. 'output_dir' is the directory where the library file will be put. 'debug' is a boolean; if true, debugging information will be included in the library (note that on most platforms, it is the compile step wh...
def link_static_lib (self, objects, output_libname, output_dir=None): """Link a bunch of stuff together to create a static library file. The "bunch of stuff" consists of the list of object files supplied as 'objects', the extra object files supplied to 'add_link_object()' and/or 'set_link_objects()', the libraries sup...
ad52244351623d70cabe2a37810a940852ec67bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ad52244351623d70cabe2a37810a940852ec67bb/ccompiler.py
for the particular linker being used).""" pass def link_shared_lib (self, objects, output_libname, output_dir=None, libraries=None, library_dirs=None, extra_preargs=None, extra_postargs=None): """Link a bunch of stuff together to create a shared library file. Has the same effect as 'link_static_lib()' except that t...
for the particular linker being used)."""
def link_static_lib (self, objects, output_libname, output_dir=None): """Link a bunch of stuff together to create a static library file. The "bunch of stuff" consists of the list of object files supplied as 'objects', the extra object files supplied to 'add_link_object()' and/or 'set_link_objects()', the libraries sup...
ad52244351623d70cabe2a37810a940852ec67bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ad52244351623d70cabe2a37810a940852ec67bb/ccompiler.py
base = base.replace("/", ".")
base = base.replace(os.sep, ".") if os.altsep: base = base.replace(os.altsep, ".")
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...
83bab1a343de156fe75bec67d3be828dacfed2bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/83bab1a343de156fe75bec67d3be828dacfed2bf/trace.py
return
return 0, 0
def write_results_file(self, path, lines, lnotab, lines_hit): """Return a coverage results file in path."""
83bab1a343de156fe75bec67d3be828dacfed2bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/83bab1a343de156fe75bec67d3be828dacfed2bf/trace.py
RA("%s=%s;" % (self.key, self.coded_value))
RA("%s=%s" % (self.key, self.coded_value))
def OutputString(self, attrs=None): # Build up our result # result = [] RA = result.append
eebb4bbe4670c7d4c05857583386a55110f30b32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/eebb4bbe4670c7d4c05857583386a55110f30b32/Cookie.py
RA("%s=%s;" % (self._reserved[K], _getdate(V)))
RA("%s=%s" % (self._reserved[K], _getdate(V)))
def OutputString(self, attrs=None): # Build up our result # result = [] RA = result.append
eebb4bbe4670c7d4c05857583386a55110f30b32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/eebb4bbe4670c7d4c05857583386a55110f30b32/Cookie.py
RA("%s=%d;" % (self._reserved[K], V))
RA("%s=%d" % (self._reserved[K], V))
def OutputString(self, attrs=None): # Build up our result # result = [] RA = result.append
eebb4bbe4670c7d4c05857583386a55110f30b32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/eebb4bbe4670c7d4c05857583386a55110f30b32/Cookie.py
RA("%s;" % self._reserved[K])
RA(str(self._reserved[K]))
def OutputString(self, attrs=None): # Build up our result # result = [] RA = result.append
eebb4bbe4670c7d4c05857583386a55110f30b32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/eebb4bbe4670c7d4c05857583386a55110f30b32/Cookie.py
RA("%s=%s;" % (self._reserved[K], V))
RA("%s=%s" % (self._reserved[K], V))
def OutputString(self, attrs=None): # Build up our result # result = [] RA = result.append
eebb4bbe4670c7d4c05857583386a55110f30b32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/eebb4bbe4670c7d4c05857583386a55110f30b32/Cookie.py
return _spacejoin(result)
return _semispacejoin(result)
def OutputString(self, attrs=None): # Build up our result # result = [] RA = result.append
eebb4bbe4670c7d4c05857583386a55110f30b32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/eebb4bbe4670c7d4c05857583386a55110f30b32/Cookie.py
def output(self, attrs=None, header="Set-Cookie:", sep="\n"):
def output(self, attrs=None, header="Set-Cookie:", sep="\015\012"):
def output(self, attrs=None, header="Set-Cookie:", sep="\n"): """Return a string suitable for HTTP.""" result = [] items = self.items() items.sort() for K,V in items: result.append( V.output(attrs, header) ) return sep.join(result)
eebb4bbe4670c7d4c05857583386a55110f30b32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/eebb4bbe4670c7d4c05857583386a55110f30b32/Cookie.py
return '<%s: %s>' % (self.__class__.__name__, _spacejoin(L))
return '<%s: %s>' % (self.__class__.__name__, _semispacejoin(L))
def __repr__(self): L = [] items = self.items() items.sort() for K,V in items: L.append( '%s=%s' % (K,repr(V.value) ) ) return '<%s: %s>' % (self.__class__.__name__, _spacejoin(L))
eebb4bbe4670c7d4c05857583386a55110f30b32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/eebb4bbe4670c7d4c05857583386a55110f30b32/Cookie.py
self.socket = socket.socket(self.address_family, self.socket_type) self.server_bind() self.server_activate() def server_bind(self): """Called by constructor to bind the socket. May be overridden. """ if self.allow_reuse_address: self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) self.socket.bind(self....
def __init__(self, server_address, RequestHandlerClass): """Constructor. May be extended, do not override.""" self.server_address = server_address self.RequestHandlerClass = RequestHandlerClass self.socket = socket.socket(self.address_family, self.socket_type) self.server_bind() self.server_activate()
6ec81d9983655c1decc44a7d9d7195ed1148d6ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6ec81d9983655c1decc44a7d9d7195ed1148d6ba/SocketServer.py
self.socket.listen(self.request_queue_size) def fileno(self): """Return socket file number. Interface required by select(). """ return self.socket.fileno()
pass
def server_activate(self): """Called by constructor to activate the server.
6ec81d9983655c1decc44a7d9d7195ed1148d6ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6ec81d9983655c1decc44a7d9d7195ed1148d6ba/SocketServer.py
def get_request(self): """Get the request and client address from the socket. May be overridden. """ return self.socket.accept()
def get_request(self): """Get the request and client address from the socket.
6ec81d9983655c1decc44a7d9d7195ed1148d6ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6ec81d9983655c1decc44a7d9d7195ed1148d6ba/SocketServer.py