rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
{'fill': 'red', 'tags': 'box'}) | {'fill': 'blue', 'tags': 'box'}) | def __init__(self, master=None, cnf={}): Canvas.__init__(self, master, {'width': 100, 'height': 100}) Canvas.config(self, cnf) self.create_rectangle(30, 30, 70, 70, {'fill': 'red', 'tags': 'box'}) Canvas.bind(self, 'box', '<Enter>', self.enter) Canvas.bind(self, 'box', '<Leave>', self.leave) | e7571856f3f59c73527ceefcf01e8a6b6f42502b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e7571856f3f59c73527ceefcf01e8a6b6f42502b/tst.py |
df.Creator, df.Type, df.Flags = sf.Creator, sf.Type, sf.Flags | df.Creator, df.Type = sf.Creator, sf.Type df.Flags = (sf.Flags & (kIsStationary|kNameLocked|kHasBundle|kIsInvisible|kIsAlias)) | def copy(src, dst, createpath=0): """Copy a file, including finder info, resource fork, etc""" if createpath: mkdirs(os.path.split(dst)[0]) srcfss = macfs.FSSpec(src) dstfss = macfs.FSSpec(dst) ifp = open(srcfss.as_pathname(), 'rb') ofp = open(dstfss.as_pathname(), 'wb') d = ifp.read(BUFSIZ) while d: ofp.write(d) d = ... | a8a277cbdc32c06fe59465fc3f8bc260dc7d82ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a8a277cbdc32c06fe59465fc3f8bc260dc7d82ea/macostools.py |
if os.environ.get('TERM') in ('dumb', 'emacs'): return plainpager | def getpager(): """Decide what method to use for paging through text.""" if type(sys.stdout) is not types.FileType: return plainpager if not sys.stdin.isatty() or not sys.stdout.isatty(): return plainpager if os.environ.get('TERM') in ('dumb', 'emacs'): return plainpager if 'PAGER' in os.environ: if sys.platform == 'wi... | a487e4eb0599c1a0728ee5c82d515292ccf69456 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a487e4eb0599c1a0728ee5c82d515292ccf69456/pydoc.py | |
<body bgcolor=" <body bgcolor=" | <body bgcolor=" <body bgcolor=" | def reset(): """Return a string that resets the CGI and browser to a known state.""" return '''<!--: spam | 83205972a2d027517ebedd827d1c19a5b0264c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83205972a2d027517ebedd827d1c19a5b0264c0a/cgitb.py |
def html(etype, evalue, etb, context=5): """Return a nice HTML document describing the traceback.""" import sys, os, types, time, traceback import keyword, tokenize, linecache, inspect, pydoc | __UNDEF__ = [] def small(text): return '<small>' + text + '</small>' def strong(text): return '<strong>' + text + '</strong>' def grey(text): return '<font color=" def lookup(name, frame, locals): """Find the value for a given name in the given environment.""" if name in locals: return 'local', locals[name] if name in... | def html(etype, evalue, etb, context=5): """Return a nice HTML document describing the traceback.""" import sys, os, types, time, traceback import keyword, tokenize, linecache, inspect, pydoc if type(etype) is types.ClassType: etype = etype.__name__ pyver = 'Python ' + sys.version.split()[0] + ': ' + sys.executable da... | 83205972a2d027517ebedd827d1c19a5b0264c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83205972a2d027517ebedd827d1c19a5b0264c0a/cgitb.py |
head = '<body bgcolor=" | head = '<body bgcolor=" | def html(etype, evalue, etb, context=5): """Return a nice HTML document describing the traceback.""" import sys, os, types, time, traceback import keyword, tokenize, linecache, inspect, pydoc if type(etype) is types.ClassType: etype = etype.__name__ pyver = 'Python ' + sys.version.split()[0] + ': ' + sys.executable da... | 83205972a2d027517ebedd827d1c19a5b0264c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83205972a2d027517ebedd827d1c19a5b0264c0a/cgitb.py |
' <p>A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, with the most recent (innermost) call last.''' indent = '<tt><small>' + ' ' * 5 + '</small> </tt>' | ' <p>A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.''' indent = '<tt>' + small(' ' * 5) + ' </tt>' | def html(etype, evalue, etb, context=5): """Return a nice HTML document describing the traceback.""" import sys, os, types, time, traceback import keyword, tokenize, linecache, inspect, pydoc if type(etype) is types.ClassType: etype = etype.__name__ pyver = 'Python ' + sys.version.split()[0] + ': ' + sys.executable da... | 83205972a2d027517ebedd827d1c19a5b0264c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83205972a2d027517ebedd827d1c19a5b0264c0a/cgitb.py |
link = '<a href="file:%s">%s</a>' % (file, pydoc.html.escape(file)) | link = '<a href="file://%s">%s</a>' % (file, pydoc.html.escape(file)) | def html(etype, evalue, etb, context=5): """Return a nice HTML document describing the traceback.""" import sys, os, types, time, traceback import keyword, tokenize, linecache, inspect, pydoc if type(etype) is types.ClassType: etype = etype.__name__ pyver = 'Python ' + sys.version.split()[0] + ': ' + sys.executable da... | 83205972a2d027517ebedd827d1c19a5b0264c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83205972a2d027517ebedd827d1c19a5b0264c0a/cgitb.py |
if func == '?': call = '' else: def eqrepr(value): return '=' + pydoc.html.repr(value) call = 'in <strong>%s</strong>' % func + inspect.formatargvalues( args, varargs, varkw, locals, formatvalue=eqrepr) names = [] def tokeneater(type, token, start, end, line): if type == tokenize.NAME and token not in keyword.kwlist: ... | call = '' if func != '?': call = 'in ' + strong(func) + \ inspect.formatargvalues(args, varargs, varkw, locals, formatvalue=lambda value: '=' + pydoc.html.repr(value)) highlight = {} def reader(lnum=[lnum]): highlight[lnum[0]] = 1 try: return linecache.getline(file, lnum[0]) finally: lnum[0] += 1 vars = scanvars(reade... | def html(etype, evalue, etb, context=5): """Return a nice HTML document describing the traceback.""" import sys, os, types, time, traceback import keyword, tokenize, linecache, inspect, pydoc if type(etype) is types.ClassType: etype = etype.__name__ pyver = 'Python ' + sys.version.split()[0] + ': ' + sys.executable da... | 83205972a2d027517ebedd827d1c19a5b0264c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83205972a2d027517ebedd827d1c19a5b0264c0a/cgitb.py |
num = '<small><font color=" ' ' * (5-len(str(i))) + str(i)) line = '<tt>%s %s</tt>' % (num, pydoc.html.preformat(line)) if i == lnum: line = ''' <table width="100%%" bgcolor=" <tr><td>%s</td></tr></table>\n''' % line excerpt.append('\n' + line) if i == lnum: excerpt.append(lvals) i = i + 1 frames.append('<p>'... | num = small(' ' * (5-len(str(i))) + str(i)) + ' ' line = '<tt>%s%s</tt>' % (num, pydoc.html.preformat(line)) if i in highlight: rows.append('<tr><td bgcolor=" else: rows.append('<tr><td>%s</td></tr>' % grey(line)) i += 1 done, dump = {}, [] for name, where, value in vars: if name in done: continue done[name]... | def linereader(lnum=[lnum]): line = linecache.getline(file, lnum[0]) lnum[0] += 1 return line | 83205972a2d027517ebedd827d1c19a5b0264c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83205972a2d027517ebedd827d1c19a5b0264c0a/cgitb.py |
plaintrace = ''.join(traceback.format_exception(etype, evalue, etb)) | def linereader(lnum=[lnum]): line = linecache.getline(file, lnum[0]) lnum[0] += 1 return line | 83205972a2d027517ebedd827d1c19a5b0264c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83205972a2d027517ebedd827d1c19a5b0264c0a/cgitb.py | |
<!-- The above is a description of an error that occurred in a Python program. It is formatted for display in a Web browser because it appears that we are running in a CGI environment. In case you are viewing this message outside of a Web browser, here is the original error traceback: | <!-- The above is a description of an error in a Python program, formatted for a Web browser because the 'cgitb' module was enabled. In case you are not reading this in a Web browser, here is the original traceback: | def linereader(lnum=[lnum]): line = linecache.getline(file, lnum[0]) lnum[0] += 1 return line | 83205972a2d027517ebedd827d1c19a5b0264c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83205972a2d027517ebedd827d1c19a5b0264c0a/cgitb.py |
''' % plaintrace | ''' % ''.join(traceback.format_exception(etype, evalue, etb)) | def linereader(lnum=[lnum]): line = linecache.getline(file, lnum[0]) lnum[0] += 1 return line | 83205972a2d027517ebedd827d1c19a5b0264c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83205972a2d027517ebedd827d1c19a5b0264c0a/cgitb.py |
def __init__(self, display=1, logdir=None): | """A hook to replace sys.excepthook that shows tracebacks in HTML.""" def __init__(self, display=1, logdir=None, context=5): | def __init__(self, display=1, logdir=None): self.display = display # send tracebacks to browser if true self.logdir = logdir # log tracebacks to files if not None | 83205972a2d027517ebedd827d1c19a5b0264c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83205972a2d027517ebedd827d1c19a5b0264c0a/cgitb.py |
"""This hook can replace sys.excepthook (for Python 2.1 or higher).""" | def __call__(self, etype, evalue, etb): """This hook can replace sys.excepthook (for Python 2.1 or higher).""" self.handle((etype, evalue, etb)) | 83205972a2d027517ebedd827d1c19a5b0264c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83205972a2d027517ebedd827d1c19a5b0264c0a/cgitb.py | |
import sys, os | import sys | def handle(self, info=None): import sys, os info = info or sys.exc_info() text = 0 print reset() | 83205972a2d027517ebedd827d1c19a5b0264c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83205972a2d027517ebedd827d1c19a5b0264c0a/cgitb.py |
text = 0 | def handle(self, info=None): import sys, os info = info or sys.exc_info() text = 0 print reset() | 83205972a2d027517ebedd827d1c19a5b0264c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83205972a2d027517ebedd827d1c19a5b0264c0a/cgitb.py | |
doc = html(*info) | text, doc = 0, html(info, self.context) | def handle(self, info=None): import sys, os info = info or sys.exc_info() text = 0 print reset() | 83205972a2d027517ebedd827d1c19a5b0264c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83205972a2d027517ebedd827d1c19a5b0264c0a/cgitb.py |
doc = ''.join(traceback.format_exception(*info)) text = 1 | text, doc = 1, ''.join(traceback.format_exception(*info)) | def handle(self, info=None): import sys, os info = info or sys.exc_info() text = 0 print reset() | 83205972a2d027517ebedd827d1c19a5b0264c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83205972a2d027517ebedd827d1c19a5b0264c0a/cgitb.py |
print '<pre>', doc, '</pre>' | print '<pre>' + doc + '</pre>' | def handle(self, info=None): import sys, os info = info or sys.exc_info() text = 0 print reset() | 83205972a2d027517ebedd827d1c19a5b0264c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83205972a2d027517ebedd827d1c19a5b0264c0a/cgitb.py |
import tempfile | import os, tempfile | def handle(self, info=None): import sys, os info = info or sys.exc_info() text = 0 print reset() | 83205972a2d027517ebedd827d1c19a5b0264c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83205972a2d027517ebedd827d1c19a5b0264c0a/cgitb.py |
print '<p>%s contains the description of this error.' % path | print '<p> %s contains the description of this error.' % path | def handle(self, info=None): import sys, os info = info or sys.exc_info() text = 0 print reset() | 83205972a2d027517ebedd827d1c19a5b0264c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83205972a2d027517ebedd827d1c19a5b0264c0a/cgitb.py |
print '<p>Tried to write to %s, but failed.' % path | print '<p> Tried to save traceback to %s, but failed.' % path | def handle(self, info=None): import sys, os info = info or sys.exc_info() text = 0 print reset() | 83205972a2d027517ebedd827d1c19a5b0264c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83205972a2d027517ebedd827d1c19a5b0264c0a/cgitb.py |
if not port: port = SMTP_PORT | if not port: port = self.default_port | def connect(self, host='localhost', port = 0): """Connect to a host on a given port. | ee82c0e6b727515b54ce2f1dfff2e6ff330f88f1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ee82c0e6b727515b54ce2f1dfff2e6ff330f88f1/smtplib.py |
self.sock = socket.socket(af, socktype, proto) if self.debuglevel > 0: print>>stderr, 'connect:', sa self.sock.connect(sa) | self._get_socket(af,socktype,proto,sa) | def connect(self, host='localhost', port = 0): """Connect to a host on a given port. | ee82c0e6b727515b54ce2f1dfff2e6ff330f88f1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ee82c0e6b727515b54ce2f1dfff2e6ff330f88f1/smtplib.py |
"n" * newtabwith) | "n" * newtabwidth) | def set_tabwidth(self, newtabwidth): text = self.text if self.get_tabwidth() != newtabwidth: pixels = text.tk.call("font", "measure", text["font"], "-displayof", text.master, "n" * newtabwith) text.configure(tabs=pixels) | bdd901714d5c1e5e2012d91f87633845cc270be5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bdd901714d5c1e5e2012d91f87633845cc270be5/EditorWindow.py |
if type(cmd) == type(''): cmd = ['/bin/sh', '-c', cmd] | _cleanup() | def __init__(self, cmd, capturestderr=0, bufsize=-1): """The parameter 'cmd' is the shell command to execute in a sub-process. The 'capturestderr' flag, if true, specifies that the object should capture standard error output of the child process. The default is false. If the 'bufsize' parameter is specified, it speci... | d75e63a865b451c24e1a0516744a98d59691b4ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d75e63a865b451c24e1a0516744a98d59691b4ff/popen2.py |
os.close(0) os.close(1) if os.dup(p2cread) <> 0: sys.stderr.write('popen2: bad read dup\n') if os.dup(c2pwrite) <> 1: sys.stderr.write('popen2: bad write dup\n') | os.dup2(p2cread, 0) os.dup2(c2pwrite, 1) | def __init__(self, cmd, capturestderr=0, bufsize=-1): """The parameter 'cmd' is the shell command to execute in a sub-process. The 'capturestderr' flag, if true, specifies that the object should capture standard error output of the child process. The default is false. If the 'bufsize' parameter is specified, it speci... | d75e63a865b451c24e1a0516744a98d59691b4ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d75e63a865b451c24e1a0516744a98d59691b4ff/popen2.py |
os.close(2) if os.dup(errin) <> 2: pass for i in range(3, MAXFD): try: os.close(i) except: pass try: os.execvp(cmd[0], cmd) finally: os._exit(1) os._exit(1) | os.dup2(errin, 2) self._run_child(cmd) | def __init__(self, cmd, capturestderr=0, bufsize=-1): """The parameter 'cmd' is the shell command to execute in a sub-process. The 'capturestderr' flag, if true, specifies that the object should capture standard error output of the child process. The default is false. If the 'bufsize' parameter is specified, it speci... | d75e63a865b451c24e1a0516744a98d59691b4ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d75e63a865b451c24e1a0516744a98d59691b4ff/popen2.py |
self.sts = -1 | def __init__(self, cmd, capturestderr=0, bufsize=-1): """The parameter 'cmd' is the shell command to execute in a sub-process. The 'capturestderr' flag, if true, specifies that the object should capture standard error output of the child process. The default is false. If the 'bufsize' parameter is specified, it speci... | d75e63a865b451c24e1a0516744a98d59691b4ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d75e63a865b451c24e1a0516744a98d59691b4ff/popen2.py | |
def popen2(cmd, mode='t', bufsize=-1): | del Popen3, Popen4, _active, _cleanup def popen2(cmd, bufsize=-1, mode='t'): | def popen2(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin) are returned.""" w, r = os.popen2(cmd, mode, bufsize) return r, w | d75e63a865b451c24e1a0516744a98d59691b4ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d75e63a865b451c24e1a0516744a98d59691b4ff/popen2.py |
else: def popen2(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin) are returned.""" if type(mode) is type(0) and bufsize == -1: bufsize = mode mode = 't' assert mode in ('t... | def popen2(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin) are returned.""" w, r = os.popen2(cmd, mode, bufsize) return r, w | d75e63a865b451c24e1a0516744a98d59691b4ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d75e63a865b451c24e1a0516744a98d59691b4ff/popen2.py | |
if sys.platform[:3] == "win": def popen3(cmd, mode='t', bufsize=-1): | def popen3(cmd, bufsize=-1, mode='t'): | def popen2(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin) are returned.""" if type(mode) is type(0) and bufsize == -1: bufsize = mode mode = 't' assert mode in ('t', 'b'... | d75e63a865b451c24e1a0516744a98d59691b4ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d75e63a865b451c24e1a0516744a98d59691b4ff/popen2.py |
else: def popen3(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin, child_stderr) are returned.""" if type(mode) is type(0) and bufsize == -1: bufsize = mode mode = 't' asse... | def popen3(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin, child_stderr) are returned.""" w, r, e = os.popen3(cmd, mode, bufsize) return r, w, e | d75e63a865b451c24e1a0516744a98d59691b4ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d75e63a865b451c24e1a0516744a98d59691b4ff/popen2.py | |
if sys.platform[:3] == "win": def popen4(cmd, mode='t', bufsize=-1): | def popen4(cmd, bufsize=-1, mode='t'): | def popen3(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin, child_stderr) are returned.""" if type(mode) is type(0) and bufsize == -1: bufsize = mode mode = 't' assert mod... | d75e63a865b451c24e1a0516744a98d59691b4ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d75e63a865b451c24e1a0516744a98d59691b4ff/popen2.py |
pass | def popen2(cmd, bufsize=-1, mode='t'): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin) are returned.""" inst = Popen3(cmd, 0, bufsize) return inst.fromchild, inst.tochild def popen3(cmd, bufsize=-1... | def popen4(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout_stderr, child_stdin) are returned.""" w, r = os.popen4(cmd, mode, bufsize) return r, w | d75e63a865b451c24e1a0516744a98d59691b4ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d75e63a865b451c24e1a0516744a98d59691b4ff/popen2.py |
'initial value %r' % (maxcount,)) | 'initial value %r' % self.maxcount | def v(self): self.nonzero.acquire() if self.count == self.maxcount: raise ValueError, '.v() tried to raise semaphore count above ' \ 'initial value %r' % (maxcount,)) self.count = self.count + 1 self.nonzero.signal() self.nonzero.release() | 09659fbe690adf6d022daed7d02016b8ff756d41 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/09659fbe690adf6d022daed7d02016b8ff756d41/sync.py |
debian_tcl_include = ( '/usr/include/tcl' + version ) debian_tk_include = ( '/usr/include/tk' + version ) tcl_includes = find_file('tcl.h', inc_dirs, [debian_tcl_include] ) tk_includes = find_file('tk.h', inc_dirs, [debian_tk_include] ) | debian_tcl_include = [ '/usr/include/tcl' + version ] debian_tk_include = [ '/usr/include/tk' + version ] + debian_tcl_include tcl_includes = find_file('tcl.h', inc_dirs, debian_tcl_include) tk_includes = find_file('tk.h', inc_dirs, debian_tk_include) | def detect_tkinter(self, inc_dirs, lib_dirs): # The _tkinter module. # # The command for _tkinter is long and site specific. Please # uncomment and/or edit those parts as indicated. If you don't have a # specific extension (e.g. Tix or BLT), leave the corresponding line # commented out. (Leave the trailing backslash... | 9a3fd8c82f010d12fd2e59ddc47e7236dbb2aef8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9a3fd8c82f010d12fd2e59ddc47e7236dbb2aef8/setup.py |
def writexml(self, writer): writer.write("<" + self.tagName) | def writexml(self, writer, indent="", addindent="", newl=""): writer.write(indent+"<" + self.tagName) | def writexml(self, writer): writer.write("<" + self.tagName) | 46fa39ab1d1e2f14c1b44c5e81c34c5f6cfb9a58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46fa39ab1d1e2f14c1b44c5e81c34c5f6cfb9a58/minidom.py |
writer.write(">") | writer.write(">%s"%(newl)) | def writexml(self, writer): writer.write("<" + self.tagName) | 46fa39ab1d1e2f14c1b44c5e81c34c5f6cfb9a58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46fa39ab1d1e2f14c1b44c5e81c34c5f6cfb9a58/minidom.py |
node.writexml(writer) writer.write("</%s>" % self.tagName) else: writer.write("/>") | node.writexml(writer,indent+addindent,addindent,newl) writer.write("%s</%s>%s" % (indent,self.tagName,newl)) else: writer.write("/>%s"%(newl)) | def writexml(self, writer): writer.write("<" + self.tagName) | 46fa39ab1d1e2f14c1b44c5e81c34c5f6cfb9a58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46fa39ab1d1e2f14c1b44c5e81c34c5f6cfb9a58/minidom.py |
def writexml(self, writer): writer.write("<!--%s-->" % self.data) | def writexml(self, writer, indent="", addindent="", newl=""): writer.write("%s<!--%s-->%s" % (indent,self.data,newl)) | def writexml(self, writer): writer.write("<!--%s-->" % self.data) | 46fa39ab1d1e2f14c1b44c5e81c34c5f6cfb9a58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46fa39ab1d1e2f14c1b44c5e81c34c5f6cfb9a58/minidom.py |
def writexml(self, writer): writer.write("<?%s %s?>" % (self.target, self.data)) | def writexml(self, writer, indent="", addindent="", newl=""): writer.write("%s<?%s %s?>%s" % (indent,self.target, self.data, newl)) | def writexml(self, writer): writer.write("<?%s %s?>" % (self.target, self.data)) | 46fa39ab1d1e2f14c1b44c5e81c34c5f6cfb9a58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46fa39ab1d1e2f14c1b44c5e81c34c5f6cfb9a58/minidom.py |
def writexml(self, writer): _write_data(writer, self.data) | def writexml(self, writer, indent="", addindent="", newl=""): _write_data(writer, "%s%s%s"%(indent, self.data, newl)) | def writexml(self, writer): _write_data(writer, self.data) | 46fa39ab1d1e2f14c1b44c5e81c34c5f6cfb9a58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46fa39ab1d1e2f14c1b44c5e81c34c5f6cfb9a58/minidom.py |
def writexml(self, writer): | def writexml(self, writer, indent="", addindent="", newl=""): | def writexml(self, writer): writer.write('<?xml version="1.0" ?>\n') for node in self.childNodes: node.writexml(writer) | 46fa39ab1d1e2f14c1b44c5e81c34c5f6cfb9a58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46fa39ab1d1e2f14c1b44c5e81c34c5f6cfb9a58/minidom.py |
node.writexml(writer) | node.writexml(writer, indent, addindent, newl) | def writexml(self, writer): writer.write('<?xml version="1.0" ?>\n') for node in self.childNodes: node.writexml(writer) | 46fa39ab1d1e2f14c1b44c5e81c34c5f6cfb9a58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46fa39ab1d1e2f14c1b44c5e81c34c5f6cfb9a58/minidom.py |
print "open", askopenfilename(filetypes=[("all filez", "*")]) print "saveas", asksaveasfilename() | enc = "utf-8" try: import locale enc = locale.nl_langinfo(locale.CODESET) except (ImportError, AttributeError): pass print "open", askopenfilename(filetypes=[("all filez", "*")]).encode(enc) print "saveas", asksaveasfilename().encode(enc) | def askdirectory (**options): "Ask for a directory, and return the file name" return Directory(**options).show() | 85f98143b7860dbbe791535450e5c94b67cb1bc9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/85f98143b7860dbbe791535450e5c94b67cb1bc9/tkFileDialog.py |
elif sys.version < '2.1': if sys.platform == 'aix4': python_lib = get_python_lib(standard_lib=1) ld_so_aix = os.path.join(python_lib, 'config', 'ld_so_aix') python_exp = os.path.join(python_lib, 'config', 'python.exp') g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp) elif sys.platform == 'beos': ... | def _init_posix(): """Initialize the module as appropriate for POSIX systems.""" g = {} # load the installed Makefile: try: filename = get_makefile_filename() parse_makefile(filename, g) except IOError, msg: my_msg = "invalid Python installation: unable to open %s" % filename if hasattr(msg, "strerror"): my_msg = my_ms... | 045af6f8d8c6e362db6ca616d9d3f85e7f8c6180 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/045af6f8d8c6e362db6ca616d9d3f85e7f8c6180/sysconfig.py | |
u = u'\U00010001\U00020002\U00030003\U00040004\U00050005' for encoding in ('utf-8', 'utf-16', 'utf-16-le', 'utf-16-be', 'unicode_escape', 'unicode_internal'): verify(unicode(u.encode(encoding),encoding) == u) | def __str__(self): return self.x | bd3be8f0ca4fd70d53d9330489ba565f83530b3b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bd3be8f0ca4fd70d53d9330489ba565f83530b3b/test_unicode.py | |
status.append ('%s:%d' % self.addr) return '<%s %s at %x>' % ( self.__class__.__name__, ' '.join (status), id(self) ) | if self.addr == types.TupleType: status.append ('%s:%d' % self.addr) else: status.append (self.addr) return '<%s %s at %x>' % (self.__class__.__name__, ' '.join (status), id (self)) | def __repr__ (self): try: status = [] if self.accepting and self.addr: status.append ('listening') elif self.connected: status.append ('connected') if self.addr: status.append ('%s:%d' % self.addr) return '<%s %s at %x>' % ( self.__class__.__name__, ' '.join (status), id(self) ) except: try: ar = repr(self.addr) except... | 12e73bb2f08db45fb92bf2aa57992424351be03d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/12e73bb2f08db45fb92bf2aa57992424351be03d/asyncore.py |
try: ar = repr(self.addr) except: ar = 'no self.addr!' return '<__repr__ (self) failed for object at %x (addr=%s)>' % (id(self),ar) | pass try: ar = repr (self.addr) except AttributeError: ar = 'no self.addr!' return '<__repr__() failed for %s instance at %x (addr=%s)>' % \ (self.__class__.__name__, id (self), ar) | def __repr__ (self): try: status = [] if self.accepting and self.addr: status.append ('listening') elif self.connected: status.append ('connected') if self.addr: status.append ('%s:%d' % self.addr) return '<%s %s at %x>' % ( self.__class__.__name__, ' '.join (status), id(self) ) except: try: ar = repr(self.addr) except... | 12e73bb2f08db45fb92bf2aa57992424351be03d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/12e73bb2f08db45fb92bf2aa57992424351be03d/asyncore.py |
src = sys.modules[key] | src = sys.modules[name] | def load_dynamic(self, name, filename, file): | 3ada87a5088d095dc72250a7eb95f21dcd85809d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3ada87a5088d095dc72250a7eb95f21dcd85809d/rexec.py |
existed = sectdict.has_key(key) | existed = sectdict.has_key(option) | def remove_option(self, section, option): """Remove an option.""" if not section or section == "DEFAULT": sectdict = self.__defaults else: try: sectdict = self.__sections[section] except KeyError: raise NoSectionError(section) existed = sectdict.has_key(key) if existed: del sectdict[key] return existed | ff4a23bbcb08e7dbb48fa8b5cfbafaea11e1f8c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ff4a23bbcb08e7dbb48fa8b5cfbafaea11e1f8c7/ConfigParser.py |
del sectdict[key] | del sectdict[option] | def remove_option(self, section, option): """Remove an option.""" if not section or section == "DEFAULT": sectdict = self.__defaults else: try: sectdict = self.__sections[section] except KeyError: raise NoSectionError(section) existed = sectdict.has_key(key) if existed: del sectdict[key] return existed | ff4a23bbcb08e7dbb48fa8b5cfbafaea11e1f8c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ff4a23bbcb08e7dbb48fa8b5cfbafaea11e1f8c7/ConfigParser.py |
def buildapplet(top, dummy, list): """Create python applets""" template = buildtools.findtemplate() for src, dst in list: if src[-3:] != '.py': raise 'Should end in .py', src base = os.path.basename(src) #dst = os.path.join(top, base)[:-3] src = os.path.join(top, src) dst = os.path.join(top, dst) try: os.unlink(dst) ex... | e1fb04f694dbd19c3c5d587f734bc6e7337e602e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e1fb04f694dbd19c3c5d587f734bc6e7337e602e/fullbuild.py | ||
def __init__(self, _subtype='mixed', boundary=None, *_subparts, **_params): | def __init__(self, _subtype='mixed', boundary=None, _subparts=None, **_params): | def __init__(self, _subtype='mixed', boundary=None, *_subparts, **_params): """Creates a multipart/* type message. | d2856008839aa2dd06893701db6be2333eef5f24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d2856008839aa2dd06893701db6be2333eef5f24/MIMEMultipart.py |
must be possible to convert this sequence to a list. You can always | must be an iterable object, such as a list. You can always | def __init__(self, _subtype='mixed', boundary=None, *_subparts, **_params): """Creates a multipart/* type message. | d2856008839aa2dd06893701db6be2333eef5f24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d2856008839aa2dd06893701db6be2333eef5f24/MIMEMultipart.py |
self.attach(*list(_subparts)) | for p in _subparts: self.attach(p) | def __init__(self, _subtype='mixed', boundary=None, *_subparts, **_params): """Creates a multipart/* type message. | d2856008839aa2dd06893701db6be2333eef5f24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d2856008839aa2dd06893701db6be2333eef5f24/MIMEMultipart.py |
return whatever**2 | return arg**2 | def m1(self, arg): return whatever**2 | 425a8ec05e2b14ee2738d4930b1776a01305d023 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/425a8ec05e2b14ee2738d4930b1776a01305d023/Eiffel.py |
def close(f): | def close(self): | def close(f): self.flush() | e7b9fde1b8461b389f2bcc21350eb132a287f14b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e7b9fde1b8461b389f2bcc21350eb132a287f14b/rexec.py |
ok_builtin_modules = ('array', 'binascii', 'audioop', 'imageop', 'marshal', 'math', 'md5', 'parser', 'regex', 'rotor', 'select', | ok_builtin_modules = ('audioop', 'array', 'binascii', 'cmath', 'errno', 'imageop', 'marshal', 'math', 'md5', 'operator', 'parser', 'regex', 'rotor', 'select', | 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) | e7b9fde1b8461b389f2bcc21350eb132a287f14b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e7b9fde1b8461b389f2bcc21350eb132a287f14b/rexec.py |
def s_apply(self, func, *args, **kw): | def s_apply(self, func, args=(), kw=None): | def s_apply(self, func, *args, **kw): | e7b9fde1b8461b389f2bcc21350eb132a287f14b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e7b9fde1b8461b389f2bcc21350eb132a287f14b/rexec.py |
r = apply(func, args, kw) | if kw: r = apply(func, args, kw) else: r = apply(func, args) | def s_apply(self, func, *args, **kw): | e7b9fde1b8461b389f2bcc21350eb132a287f14b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e7b9fde1b8461b389f2bcc21350eb132a287f14b/rexec.py |
if __debug__: print "colorizing already scheduled" | if DEBUG: print "colorizing already scheduled" | def notify_range(self, index1, index2=None): self.tag_add("TODO", index1, index2) if self.after_id: if __debug__: print "colorizing already scheduled" return if self.colorizing: self.stop_colorizing = 1 if __debug__: print "stop colorizing" if self.allow_colorizing: if __debug__: print "schedule colorizing" self.after_... | 3cc1250f168209f3333e4f60e71f65efb1e8f18b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3cc1250f168209f3333e4f60e71f65efb1e8f18b/ColorDelegator.py |
if __debug__: print "stop colorizing" | if DEBUG: print "stop colorizing" | def notify_range(self, index1, index2=None): self.tag_add("TODO", index1, index2) if self.after_id: if __debug__: print "colorizing already scheduled" return if self.colorizing: self.stop_colorizing = 1 if __debug__: print "stop colorizing" if self.allow_colorizing: if __debug__: print "schedule colorizing" self.after_... | 3cc1250f168209f3333e4f60e71f65efb1e8f18b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3cc1250f168209f3333e4f60e71f65efb1e8f18b/ColorDelegator.py |
if __debug__: print "schedule colorizing" | if DEBUG: print "schedule colorizing" | def notify_range(self, index1, index2=None): self.tag_add("TODO", index1, index2) if self.after_id: if __debug__: print "colorizing already scheduled" return if self.colorizing: self.stop_colorizing = 1 if __debug__: print "stop colorizing" if self.allow_colorizing: if __debug__: print "schedule colorizing" self.after_... | 3cc1250f168209f3333e4f60e71f65efb1e8f18b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3cc1250f168209f3333e4f60e71f65efb1e8f18b/ColorDelegator.py |
if __debug__: print "cancel scheduled recolorizer" | if DEBUG: print "cancel scheduled recolorizer" | def close(self, close_when_done=None): if self.after_id: after_id = self.after_id self.after_id = None if __debug__: print "cancel scheduled recolorizer" self.after_cancel(after_id) self.allow_colorizing = 0 self.stop_colorizing = 1 if close_when_done: if not self.colorizing: close_when_done.destroy() else: self.close_... | 3cc1250f168209f3333e4f60e71f65efb1e8f18b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3cc1250f168209f3333e4f60e71f65efb1e8f18b/ColorDelegator.py |
if __debug__: print "cancel scheduled recolorizer" | if DEBUG: print "cancel scheduled recolorizer" | def toggle_colorize_event(self, event): if self.after_id: after_id = self.after_id self.after_id = None if __debug__: print "cancel scheduled recolorizer" self.after_cancel(after_id) if self.allow_colorizing and self.colorizing: if __debug__: print "stop colorizing" self.stop_colorizing = 1 self.allow_colorizing = not ... | 3cc1250f168209f3333e4f60e71f65efb1e8f18b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3cc1250f168209f3333e4f60e71f65efb1e8f18b/ColorDelegator.py |
if __debug__: print "stop colorizing" | if DEBUG: print "stop colorizing" | def toggle_colorize_event(self, event): if self.after_id: after_id = self.after_id self.after_id = None if __debug__: print "cancel scheduled recolorizer" self.after_cancel(after_id) if self.allow_colorizing and self.colorizing: if __debug__: print "stop colorizing" self.stop_colorizing = 1 self.allow_colorizing = not ... | 3cc1250f168209f3333e4f60e71f65efb1e8f18b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3cc1250f168209f3333e4f60e71f65efb1e8f18b/ColorDelegator.py |
if __debug__: | if DEBUG: | def toggle_colorize_event(self, event): if self.after_id: after_id = self.after_id self.after_id = None if __debug__: print "cancel scheduled recolorizer" self.after_cancel(after_id) if self.allow_colorizing and self.colorizing: if __debug__: print "stop colorizing" self.stop_colorizing = 1 self.allow_colorizing = not ... | 3cc1250f168209f3333e4f60e71f65efb1e8f18b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3cc1250f168209f3333e4f60e71f65efb1e8f18b/ColorDelegator.py |
if __debug__: print "no delegate" | if DEBUG: print "no delegate" | def recolorize(self): self.after_id = None if not self.delegate: if __debug__: print "no delegate" return if not self.allow_colorizing: if __debug__: print "auto colorizing is off" return if self.colorizing: if __debug__: print "already colorizing" return try: self.stop_colorizing = 0 self.colorizing = 1 if __debug__: ... | 3cc1250f168209f3333e4f60e71f65efb1e8f18b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3cc1250f168209f3333e4f60e71f65efb1e8f18b/ColorDelegator.py |
if __debug__: print "auto colorizing is off" | if DEBUG: print "auto colorizing is off" | def recolorize(self): self.after_id = None if not self.delegate: if __debug__: print "no delegate" return if not self.allow_colorizing: if __debug__: print "auto colorizing is off" return if self.colorizing: if __debug__: print "already colorizing" return try: self.stop_colorizing = 0 self.colorizing = 1 if __debug__: ... | 3cc1250f168209f3333e4f60e71f65efb1e8f18b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3cc1250f168209f3333e4f60e71f65efb1e8f18b/ColorDelegator.py |
if __debug__: print "already colorizing" | if DEBUG: print "already colorizing" | def recolorize(self): self.after_id = None if not self.delegate: if __debug__: print "no delegate" return if not self.allow_colorizing: if __debug__: print "auto colorizing is off" return if self.colorizing: if __debug__: print "already colorizing" return try: self.stop_colorizing = 0 self.colorizing = 1 if __debug__: ... | 3cc1250f168209f3333e4f60e71f65efb1e8f18b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3cc1250f168209f3333e4f60e71f65efb1e8f18b/ColorDelegator.py |
if __debug__: print "colorizing..." | if DEBUG: print "colorizing..." | def recolorize(self): self.after_id = None if not self.delegate: if __debug__: print "no delegate" return if not self.allow_colorizing: if __debug__: print "auto colorizing is off" return if self.colorizing: if __debug__: print "already colorizing" return try: self.stop_colorizing = 0 self.colorizing = 1 if __debug__: ... | 3cc1250f168209f3333e4f60e71f65efb1e8f18b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3cc1250f168209f3333e4f60e71f65efb1e8f18b/ColorDelegator.py |
if __debug__: print "%.3f seconds" % (t1-t0) | if DEBUG: print "%.3f seconds" % (t1-t0) | def recolorize(self): self.after_id = None if not self.delegate: if __debug__: print "no delegate" return if not self.allow_colorizing: if __debug__: print "auto colorizing is off" return if self.colorizing: if __debug__: print "already colorizing" return try: self.stop_colorizing = 0 self.colorizing = 1 if __debug__: ... | 3cc1250f168209f3333e4f60e71f65efb1e8f18b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3cc1250f168209f3333e4f60e71f65efb1e8f18b/ColorDelegator.py |
if __debug__: print "reschedule colorizing" | if DEBUG: print "reschedule colorizing" | def recolorize(self): self.after_id = None if not self.delegate: if __debug__: print "no delegate" return if not self.allow_colorizing: if __debug__: print "auto colorizing is off" return if self.colorizing: if __debug__: print "already colorizing" return try: self.stop_colorizing = 0 self.colorizing = 1 if __debug__: ... | 3cc1250f168209f3333e4f60e71f65efb1e8f18b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3cc1250f168209f3333e4f60e71f65efb1e8f18b/ColorDelegator.py |
if __debug__: print "colorizing stopped" | if DEBUG: print "colorizing stopped" | def recolorize_main(self): next = "1.0" while 1: item = self.tag_nextrange("TODO", next) if not item: break head, tail = item self.tag_remove("SYNC", head, tail) item = self.tag_prevrange("SYNC", head) if item: head = item[1] else: head = "1.0" | 3cc1250f168209f3333e4f60e71f65efb1e8f18b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3cc1250f168209f3333e4f60e71f65efb1e8f18b/ColorDelegator.py |
if self.debuglevel > 0: print>>stderr, 'connect:', (host, port) | if self.debuglevel > 0: print>>stderr, 'connect:', sa | def connect(self, host='localhost', port = 0): """Connect to a host on a given port. | 5954623bc052ab17799a6b3ffcaaec8d99d977f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5954623bc052ab17799a6b3ffcaaec8d99d977f5/smtplib.py |
if self.debuglevel > 0: print>>stderr, 'connect fail:', (host, port) | if self.debuglevel > 0: print>>stderr, 'connect fail:', msg | def connect(self, host='localhost', port = 0): """Connect to a host on a given port. | 5954623bc052ab17799a6b3ffcaaec8d99d977f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5954623bc052ab17799a6b3ffcaaec8d99d977f5/smtplib.py |
mime_header = re.compile('([ \t(]|^)([-a-zA-Z0-9_+]*[\177-\377][-a-zA-Z0-9_+\177-\377]*)([ \t)]|\n)') | mime_header = re.compile('([ \t(]|^)([-a-zA-Z0-9_+]*[\177-\377][-a-zA-Z0-9_+\177-\377]*)(?=[ \t)]|\n)') | def mime_encode(line, header): """Code a single line as quoted-printable. If header is set, quote some extra characters.""" if header: reg = mime_header_char else: reg = mime_char newline = '' pos = 0 if len(line) >= 5 and line[:5] == 'From ': # quote 'From ' at the start of a line for stupid mailers newline = ('=%02x'... | fee75ac4e5322546065d8d21c23a66fa1c2a926e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fee75ac4e5322546065d8d21c23a66fa1c2a926e/mimify.py |
newline = '%s%s%s=?%s?Q?%s?=%s' % \ | newline = '%s%s%s=?%s?Q?%s?=' % \ | def mime_encode_header(line): """Code a single header line as quoted-printable.""" newline = '' pos = 0 while 1: res = mime_header.search(line, pos) if res is None: break newline = '%s%s%s=?%s?Q?%s?=%s' % \ (newline, line[pos:res.start(0)], res.group(1), CHARSET, mime_encode(res.group(2), 1), res.group(3)) pos = res.en... | fee75ac4e5322546065d8d21c23a66fa1c2a926e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fee75ac4e5322546065d8d21c23a66fa1c2a926e/mimify.py |
CHARSET, mime_encode(res.group(2), 1), res.group(3)) | CHARSET, mime_encode(res.group(2), 1)) | def mime_encode_header(line): """Code a single header line as quoted-printable.""" newline = '' pos = 0 while 1: res = mime_header.search(line, pos) if res is None: break newline = '%s%s%s=?%s?Q?%s?=%s' % \ (newline, line[pos:res.start(0)], res.group(1), CHARSET, mime_encode(res.group(2), 1), res.group(3)) pos = res.en... | fee75ac4e5322546065d8d21c23a66fa1c2a926e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fee75ac4e5322546065d8d21c23a66fa1c2a926e/mimify.py |
path = module.__path__ | try: path = module.__path__ except AttributeError: raise ImportError, 'No source for module ' + module.__name__ | def _find_module(fullname, path=None): """Version of imp.find_module() that handles hierarchical module names""" file = None for tgt in fullname.split('.'): if file is not None: file.close() # close intermediate files (file, filename, descr) = imp.find_module(tgt, path) if descr[2] == imp.PY_SOURCE: break ... | a9cfa5501ff956197e011361cbd8b04d47adcfa8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a9cfa5501ff956197e011361cbd8b04d47adcfa8/EditorWindow.py |
import sys | def test_main(verbose=None): import sys from test import test_sets test_classes = ( TestSet, TestSetSubclass, TestFrozenSet, TestFrozenSetSubclass, TestSetOfSets, TestExceptionPropagation, TestBasicOpsEmpty, TestBasicOpsSingleton, TestBasicOpsTuple, TestBasicOpsTriple, TestBinaryOps, TestUpdateOps, TestMutate, TestSubs... | c47e01d02021253dd9f8fd4ced6eb663436431bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c47e01d02021253dd9f8fd4ced6eb663436431bb/test_set.py | |
def get_inidata (self): # Return data describing the installation. | ee6fd06ecf8c81e72272be8866029987cac5a483 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ee6fd06ecf8c81e72272be8866029987cac5a483/bdist_wininst.py | ||
(string.capitalize(name), data)) lines.append("%s=%s" % (name, repr(data)[1:-1])) | (string.capitalize(name), escape(data))) lines.append("%s=%s" % (name, escape(data))) | def get_inidata (self): # Return data describing the installation. | ee6fd06ecf8c81e72272be8866029987cac5a483 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ee6fd06ecf8c81e72272be8866029987cac5a483/bdist_wininst.py |
lines.append("info=%s" % repr(info)[1:-1]) | lines.append("info=%s" % escape(info)) | def get_inidata (self): # Return data describing the installation. | ee6fd06ecf8c81e72272be8866029987cac5a483 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ee6fd06ecf8c81e72272be8866029987cac5a483/bdist_wininst.py |
lines.append("title=%s" % repr(title)[1:-1]) | lines.append("title=%s" % escape(title)) | def get_inidata (self): # Return data describing the installation. | ee6fd06ecf8c81e72272be8866029987cac5a483 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ee6fd06ecf8c81e72272be8866029987cac5a483/bdist_wininst.py |
def opendbm(filename, mode, perm): return Dbm().init(filename, mode, perm) | def opendbm(filename, mode, perm): return Dbm().init(filename, mode, perm) | becec31f170e656bc49163f7a50b30238218876a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/becec31f170e656bc49163f7a50b30238218876a/Dbm.py | |
def init(self, filename, mode, perm): | def __init__(self, filename, mode, perm): | def init(self, filename, mode, perm): import dbm self.db = dbm.open(filename, mode, perm) return self | becec31f170e656bc49163f7a50b30238218876a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/becec31f170e656bc49163f7a50b30238218876a/Dbm.py |
return self | def init(self, filename, mode, perm): import dbm self.db = dbm.open(filename, mode, perm) return self | becec31f170e656bc49163f7a50b30238218876a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/becec31f170e656bc49163f7a50b30238218876a/Dbm.py | |
if s: t = t + ', ' | if s: t = ', ' + t | def __repr__(self): s = '' for key in self.keys(): t = `key` + ': ' + `self[key]` if s: t = t + ', ' s = s + t return '{' + s + '}' | becec31f170e656bc49163f7a50b30238218876a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/becec31f170e656bc49163f7a50b30238218876a/Dbm.py |
new = re.pcre_expand(m, repl) | new = self._expand(m, repl) | def replace_all(self, event=None): prog = self.engine.getprog() if not prog: return repl = self.replvar.get() text = self.text res = self.engine.search_text(text, prog) if not res: text.bell() return text.tag_remove("sel", "1.0", "end") text.tag_remove("hit", "1.0", "end") line = res[0] col = res[1].start() if self.eng... | f8d071332a485ede280675a55e3319e136826dd0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f8d071332a485ede280675a55e3319e136826dd0/ReplaceDialog.py |
new = re.pcre_expand(m, self.replvar.get()) | new = self._expand(m, self.replvar.get()) | def do_replace(self): prog = self.engine.getprog() if not prog: return 0 text = self.text try: first = pos = text.index("sel.first") last = text.index("sel.last") except TclError: pos = None if not pos: first = last = pos = text.index("insert") line, col = SearchEngine.get_line_col(pos) chars = text.get("%d.0" % line, ... | f8d071332a485ede280675a55e3319e136826dd0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f8d071332a485ede280675a55e3319e136826dd0/ReplaceDialog.py |
exts.append( Extension('_CF', ['cf/_CFmodule.c'], | exts.append( Extension('_CF', ['cf/_CFmodule.c', 'cf/pycfbridge.c'], | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 0b06be7b0be87bd78707a939cb9964f634f392d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0b06be7b0be87bd78707a939cb9964f634f392d4/setup.py |
waste_incs = find_file("WASTE.h", [], ["../waste/C_C++ Headers"]) | waste_incs = find_file("WASTE.h", [], ['../'*n + 'waste/C_C++ Headers' for n in (0,1,2,3,4)]) | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 0b06be7b0be87bd78707a939cb9964f634f392d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0b06be7b0be87bd78707a939cb9964f634f392d4/setup.py |
["../waste/Static Libraries"]) | ["../"*n + "waste/Static Libraries" for n in (0,1,2,3,4)]) | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 0b06be7b0be87bd78707a939cb9964f634f392d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0b06be7b0be87bd78707a939cb9964f634f392d4/setup.py |
['waste/wastemodule.c', | ['waste/wastemodule.c'] + [ os.path.join(srcdir, d) for d in | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 0b06be7b0be87bd78707a939cb9964f634f392d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0b06be7b0be87bd78707a939cb9964f634f392d4/setup.py |
include_dirs = waste_incs + ['Mac/Wastemods'], | include_dirs = waste_incs + [os.path.join(srcdir, 'Mac/Wastemods')], | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 0b06be7b0be87bd78707a939cb9964f634f392d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0b06be7b0be87bd78707a939cb9964f634f392d4/setup.py |
def detect_tkinter_darwin(self, inc_dirs, lib_dirs): from os.path import join, exists framework_dirs = [ '/System/Library/Frameworks/', '/Library/Frameworks', join(os.getenv('HOME'), '/Library/Frameworks') ] for F in framework_dirs: for fw in 'Tcl', 'Tk': if not exists(join(F, fw + '.framework')): break else: ... | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 0b06be7b0be87bd78707a939cb9964f634f392d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0b06be7b0be87bd78707a939cb9964f634f392d4/setup.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.