rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
f.close()
_sync_close(f)
def add(self, message): """Add message and return assigned key.""" keys = self.keys() if len(keys) == 0: new_key = 1 else: new_key = max(keys) + 1 new_path = os.path.join(self._path, str(new_key)) f = _create_carefully(new_path) try: if self._locked: _lock_file(f) try: self._dump_message(message, f) if isinstance(messa...
b5686da24f7cb7b4a7fb66d8263e5479653f5def /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b5686da24f7cb7b4a7fb66d8263e5479653f5def/mailbox.py
f.close()
_sync_close(f)
def __setitem__(self, key, message): """Replace the keyed message; raise KeyError if it doesn't exist.""" path = os.path.join(self._path, str(key)) try: f = open(path, 'rb+') except IOError, e: if e.errno == errno.ENOENT: raise KeyError('No message with key: %s' % key) else: raise try: if self._locked: _lock_file(f) tr...
b5686da24f7cb7b4a7fb66d8263e5479653f5def /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b5686da24f7cb7b4a7fb66d8263e5479653f5def/mailbox.py
self._file.close()
_sync_close(self._file)
def unlock(self): """Unlock the mailbox if it is locked.""" if self._locked: _unlock_file(self._file) self._file.close() del self._file self._locked = False
b5686da24f7cb7b4a7fb66d8263e5479653f5def /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b5686da24f7cb7b4a7fb66d8263e5479653f5def/mailbox.py
f.close()
_sync_close(f)
def set_sequences(self, sequences): """Set sequences using the given name-to-key-list dictionary.""" f = open(os.path.join(self._path, '.mh_sequences'), 'r+') try: os.close(os.open(f.name, os.O_WRONLY | os.O_TRUNC)) for name, keys in sequences.iteritems(): if len(keys) == 0: continue f.write('%s:' % name) prev = None c...
b5686da24f7cb7b4a7fb66d8263e5479653f5def /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b5686da24f7cb7b4a7fb66d8263e5479653f5def/mailbox.py
self.assertEqual(re.match('(x)*', 50000*'x').span(), (0, 50000))
try: re.match('(x)*', 50000*'x') except RuntimeError, v: self.assertEqual(str(v), "maximum recursion limit exceeded") else: self.fail("re.match('(x)*', 50000*'x') should have failed")
def test_limitations(self): # Try nasty case that overflows the straightforward recursive # implementation of repeated groups. self.assertEqual(re.match('(x)*', 50000*'x').span(), (0, 50000))
46144be02cbd6b8d6626c2e5048339364705c454 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46144be02cbd6b8d6626c2e5048339364705c454/test_re.py
def newgroups(self, date, time):
def newgroups(self, date, time, file=None):
def newgroups(self, date, time): """Process a NEWGROUPS command. Arguments: - date: string 'yymmdd' indicating the date - time: string 'hhmmss' indicating the time Return: - resp: server response if successful - list: list of newsgroup names"""
a26854095be67418bc89eff4874b32e33d7e5bf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a26854095be67418bc89eff4874b32e33d7e5bf6/nntplib.py
return self.longcmd('NEWGROUPS ' + date + ' ' + time) def newnews(self, group, date, time):
return self.longcmd('NEWGROUPS ' + date + ' ' + time, file) def newnews(self, group, date, time, file=None):
def newgroups(self, date, time): """Process a NEWGROUPS command. Arguments: - date: string 'yymmdd' indicating the date - time: string 'hhmmss' indicating the time Return: - resp: server response if successful - list: list of newsgroup names"""
a26854095be67418bc89eff4874b32e33d7e5bf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a26854095be67418bc89eff4874b32e33d7e5bf6/nntplib.py
return self.longcmd(cmd) def list(self):
return self.longcmd(cmd, file) def list(self, file=None):
def newnews(self, group, date, time): """Process a NEWNEWS command. Arguments: - group: group name or '*' - date: string 'yymmdd' indicating the date - time: string 'hhmmss' indicating the time Return: - resp: server response if successful - list: list of article ids"""
a26854095be67418bc89eff4874b32e33d7e5bf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a26854095be67418bc89eff4874b32e33d7e5bf6/nntplib.py
resp, list = self.longcmd('LIST')
resp, list = self.longcmd('LIST', file)
def list(self): """Process a LIST command. Return: - resp: server response if successful - list: list of (group, last, first, flag) (strings)"""
a26854095be67418bc89eff4874b32e33d7e5bf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a26854095be67418bc89eff4874b32e33d7e5bf6/nntplib.py
def help(self):
def help(self, file=None):
def help(self): """Process a HELP command. Returns: - resp: server response if successful - list: list of strings"""
a26854095be67418bc89eff4874b32e33d7e5bf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a26854095be67418bc89eff4874b32e33d7e5bf6/nntplib.py
return self.longcmd('HELP')
return self.longcmd('HELP',file)
def help(self): """Process a HELP command. Returns: - resp: server response if successful - list: list of strings"""
a26854095be67418bc89eff4874b32e33d7e5bf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a26854095be67418bc89eff4874b32e33d7e5bf6/nntplib.py
def xhdr(self, hdr, str):
def xhdr(self, hdr, str, file=None):
def xhdr(self, hdr, str): """Process an XHDR command (optional server extension). Arguments: - hdr: the header type (e.g. 'subject') - str: an article nr, a message id, or a range nr1-nr2 Returns: - resp: server response if successful - list: list of (nr, value) strings"""
a26854095be67418bc89eff4874b32e33d7e5bf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a26854095be67418bc89eff4874b32e33d7e5bf6/nntplib.py
resp, lines = self.longcmd('XHDR ' + hdr + ' ' + str)
resp, lines = self.longcmd('XHDR ' + hdr + ' ' + str, file)
def xhdr(self, hdr, str): """Process an XHDR command (optional server extension). Arguments: - hdr: the header type (e.g. 'subject') - str: an article nr, a message id, or a range nr1-nr2 Returns: - resp: server response if successful - list: list of (nr, value) strings"""
a26854095be67418bc89eff4874b32e33d7e5bf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a26854095be67418bc89eff4874b32e33d7e5bf6/nntplib.py
def xover(self,start,end):
def xover(self, start, end, file=None):
def xover(self,start,end): """Process an XOVER command (optional server extension) Arguments: - start: start of range - end: end of range Returns: - resp: server response if successful - list: list of (art-nr, subject, poster, date, id, references, size, lines)"""
a26854095be67418bc89eff4874b32e33d7e5bf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a26854095be67418bc89eff4874b32e33d7e5bf6/nntplib.py
resp, lines = self.longcmd('XOVER ' + start + '-' + end)
resp, lines = self.longcmd('XOVER ' + start + '-' + end, file)
def xover(self,start,end): """Process an XOVER command (optional server extension) Arguments: - start: start of range - end: end of range Returns: - resp: server response if successful - list: list of (art-nr, subject, poster, date, id, references, size, lines)"""
a26854095be67418bc89eff4874b32e33d7e5bf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a26854095be67418bc89eff4874b32e33d7e5bf6/nntplib.py
def xgtitle(self, group):
def xgtitle(self, group, file=None):
def xgtitle(self, group): """Process an XGTITLE command (optional server extension) Arguments: - group: group name wildcard (i.e. news.*) Returns: - resp: server response if successful - list: list of (name,title) strings"""
a26854095be67418bc89eff4874b32e33d7e5bf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a26854095be67418bc89eff4874b32e33d7e5bf6/nntplib.py
resp, raw_lines = self.longcmd('XGTITLE ' + group)
resp, raw_lines = self.longcmd('XGTITLE ' + group, file)
def xgtitle(self, group): """Process an XGTITLE command (optional server extension) Arguments: - group: group name wildcard (i.e. news.*) Returns: - resp: server response if successful - list: list of (name,title) strings"""
a26854095be67418bc89eff4874b32e33d7e5bf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a26854095be67418bc89eff4874b32e33d7e5bf6/nntplib.py
print '<dd>', escape(form[key])
print '<dd>', escape(`form[key]`)
def print_form( form ): skeys = form.keys() skeys.sort() print '<h3> The following name/value pairs ' \ 'were entered in the form: </h3>' print '<dl>' for key in skeys: print '<dt>', escape(key), ':', print '<i>', escape(`type(form[key])`), '</i>', print '<dd>', escape(form[key]) print '</dl>'
dcce73af48387531e0cef280e27b3689bf7d4b85 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/dcce73af48387531e0cef280e27b3689bf7d4b85/cgi.py
s = regsub.gsub('&', '&amp;') s = regsub.gsub('<', '&lt;') s = regsub.gsub('>', '&gt;')
s = regsub.gsub('&', '&amp;', s) s = regsub.gsub('<', '&lt;', s) s = regsub.gsub('>', '&gt;', s)
def escape( s ): s = regsub.gsub('&', '&amp;') # Must be done first s = regsub.gsub('<', '&lt;') s = regsub.gsub('>', '&gt;') return s
dcce73af48387531e0cef280e27b3689bf7d4b85 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/dcce73af48387531e0cef280e27b3689bf7d4b85/cgi.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...
e567114e472470554adda63ab39ca0850d51fd66 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e567114e472470554adda63ab39ca0850d51fd66/bdist_rpm.py
>>> msg = '''
>>> msg = '''\\
def sendmail(self, from_addr, to_addrs, msg, mail_options=[], rcpt_options=[]): """This command performs an entire mail transaction.
301b1cd1072423a2b424fff9307e94e75aeb82a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/301b1cd1072423a2b424fff9307e94e75aeb82a8/smtplib.py
SyntaxError: assignment to generator expression not possible (<doctest test.test_genexps.__test__.doctests[38]>, line 1)
SyntaxError: assignment to generator expression not possible (<doctest test.test_genexps.__test__.doctests[40]>, line 1)
>>> def f(n):
37c0844b35b9a4d68f7ddf3a8b38d3e013f17d78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/37c0844b35b9a4d68f7ddf3a8b38d3e013f17d78/test_genexps.py
SyntaxError: augmented assignment to generator expression not possible (<doctest test.test_genexps.__test__.doctests[39]>, line 1)
SyntaxError: augmented assignment to generator expression not possible (<doctest test.test_genexps.__test__.doctests[41]>, line 1)
>>> def f(n):
37c0844b35b9a4d68f7ddf3a8b38d3e013f17d78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/37c0844b35b9a4d68f7ddf3a8b38d3e013f17d78/test_genexps.py
usage: idle.py [-c command] [-d] [-e] [-s] [-t title] [arg] ... -c command run this command -d enable debugger -e edit mode; arguments are files to be edited -s run $IDLESTARTUP or $PYTHONSTARTUP before anything else -t title set title of shell window When neither -c nor -e is used, and...
usage: idle.py [-c command] [-d] [-i] [-r script] [-s] [-t title] [arg] ... idle file(s) (without options) edit the file(s) -c cmd run the command in a shell -d enable the debugger -i open an interactive shell -i file(s) open a shell and also an editor window for each file -r script run a file...
def isatty(self): return 1
96d88422373ffb32aef75157647e0575a0471c03 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96d88422373ffb32aef75157647e0575a0471c03/PyShell.py
opts, args = getopt.getopt(argv, "c:deist:")
opts, args = getopt.getopt(argv, "c:dir:st:")
def main(self, argv, noshell): cmd = None edit = 0 debug = 0 startup = 0 try: opts, args = getopt.getopt(argv, "c:deist:") except getopt.error, msg: sys.stderr.write("Error: %s\n" % str(msg)) sys.stderr.write(usage_msg) sys.exit(2) for o, a in opts: noshell = 0 if o == '-c': cmd = a if o == '-d': debug = 1 if o == '-...
96d88422373ffb32aef75157647e0575a0471c03 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96d88422373ffb32aef75157647e0575a0471c03/PyShell.py
noshell = 0
noshell = 0
def main(self, argv, noshell): cmd = None edit = 0 debug = 0 startup = 0 try: opts, args = getopt.getopt(argv, "c:deist:") except getopt.error, msg: sys.stderr.write("Error: %s\n" % str(msg)) sys.stderr.write(usage_msg) sys.exit(2) for o, a in opts: noshell = 0 if o == '-c': cmd = a if o == '-d': debug = 1 if o == '-...
96d88422373ffb32aef75157647e0575a0471c03 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96d88422373ffb32aef75157647e0575a0471c03/PyShell.py
if o == '-e': edit = 1
if o == '-i': interactive = 1 if o == '-r': script = a
def main(self, argv, noshell): cmd = None edit = 0 debug = 0 startup = 0 try: opts, args = getopt.getopt(argv, "c:deist:") except getopt.error, msg: sys.stderr.write("Error: %s\n" % str(msg)) sys.stderr.write(usage_msg) sys.exit(2) for o, a in opts: noshell = 0 if o == '-c': cmd = a if o == '-d': debug = 1 if o == '-...
96d88422373ffb32aef75157647e0575a0471c03 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96d88422373ffb32aef75157647e0575a0471c03/PyShell.py
elif not edit and args and args[0] != "-": interp.execfile(args[0])
elif script: if os.path.isfile(script): interp.execfile(script) else: print "No script file: ", script
def main(self, argv, noshell): cmd = None edit = 0 debug = 0 startup = 0 try: opts, args = getopt.getopt(argv, "c:deist:") except getopt.error, msg: sys.stderr.write("Error: %s\n" % str(msg)) sys.stderr.write(usage_msg) sys.exit(2) for o, a in opts: noshell = 0 if o == '-c': cmd = a if o == '-d': debug = 1 if o == '-...
96d88422373ffb32aef75157647e0575a0471c03 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96d88422373ffb32aef75157647e0575a0471c03/PyShell.py
compile(file)
compileFile(file)
def wrap_aug(node): return wrapper[node.__class__](node)
57911ae35a76276997fb51afb78f0a8dfeb684b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/57911ae35a76276997fb51afb78f0a8dfeb684b8/pycodegen.py
return '[Errno %d] %s: %s' % (self.errno, self.strerror,
return '[Errno %s] %s: %s' % (self.errno, self.strerror,
def __str__(self): if self.filename: return '[Errno %d] %s: %s' % (self.errno, self.strerror, self.filename) elif self.errno and self.strerror: return '[Errno %d] %s' % (self.errno, self.strerror) else: return StandardError.__str__(self)
ec8c8c2ef2cac83a12b249c4e6ba4c62c018bfdc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ec8c8c2ef2cac83a12b249c4e6ba4c62c018bfdc/exceptions.py
return '[Errno %d] %s' % (self.errno, self.strerror)
return '[Errno %s] %s' % (self.errno, self.strerror)
def __str__(self): if self.filename: return '[Errno %d] %s: %s' % (self.errno, self.strerror, self.filename) elif self.errno and self.strerror: return '[Errno %d] %s' % (self.errno, self.strerror) else: return StandardError.__str__(self)
ec8c8c2ef2cac83a12b249c4e6ba4c62c018bfdc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ec8c8c2ef2cac83a12b249c4e6ba4c62c018bfdc/exceptions.py
def __init__(self, counts=None, calledfuncs=None, infile=None, outfile=None):
def __init__(self, counts=None, calledfuncs=None, infile=None, outfile=None):
def __init__(self, counts=None, calledfuncs=None, infile=None, outfile=None): self.counts = counts if self.counts is None: self.counts = {} self.counter = self.counts.copy() # map (filename, lineno) to count self.calledfuncs = calledfuncs if self.calledfuncs is None: self.calledfuncs = {} self.calledfuncs = self.called...
6bf45c67523a8e81963ce645979ac85f4f75ef33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6bf45c67523a8e81963ce645979ac85f4f75ef33/trace.py
def __init__(self, counts=None, calledfuncs=None, infile=None, outfile=None): self.counts = counts if self.counts is None: self.counts = {} self.counter = self.counts.copy() # map (filename, lineno) to count self.calledfuncs = calledfuncs if self.calledfuncs is None: self.calledfuncs = {} self.calledfuncs = self.called...
6bf45c67523a8e81963ce645979ac85f4f75ef33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6bf45c67523a8e81963ce645979ac85f4f75ef33/trace.py
def __init__(self, counts=None, calledfuncs=None, infile=None, outfile=None): self.counts = counts if self.counts is None: self.counts = {} self.counter = self.counts.copy() # map (filename, lineno) to count self.calledfuncs = calledfuncs if self.calledfuncs is None: self.calledfuncs = {} self.calledfuncs = self.called...
6bf45c67523a8e81963ce645979ac85f4f75ef33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6bf45c67523a8e81963ce645979ac85f4f75ef33/trace.py
if key != 'calledfuncs':
if key != 'calledfuncs':
def update(self, other): """Merge in the data from another CoverageResults""" counts = self.counts calledfuncs = self.calledfuncs other_counts = other.counts other_calledfuncs = other.calledfuncs
6bf45c67523a8e81963ce645979ac85f4f75ef33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6bf45c67523a8e81963ce645979ac85f4f75ef33/trace.py
def __init__(self, count=1, trace=1, countfuncs=0, ignoremods=(), ignoredirs=(), infile=None, outfile=None):
def __init__(self, count=1, trace=1, countfuncs=0, ignoremods=(), ignoredirs=(), infile=None, outfile=None):
def __init__(self, count=1, trace=1, countfuncs=0, ignoremods=(), ignoredirs=(), infile=None, outfile=None): """ @param count true iff it should count number of times each line is executed @param trace true iff it should print out each line that is being counted @param countfuncs true iff it should just output a list o...
6bf45c67523a8e81963ce645979ac85f4f75ef33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6bf45c67523a8e81963ce645979ac85f4f75ef33/trace.py
@param count true iff it should count number of times each line is executed @param trace true iff it should print out each line that is being counted @param countfuncs true iff it should just output a list of (filename, modulename, funcname,) for functions that were called at least once; This overrides `count' and `tr...
@param count true iff it should count number of times each line is executed @param trace true iff it should print out each line that is being counted @param countfuncs true iff it should just output a list of (filename, modulename, funcname,) for functions that were called at least once; This overrides `count' and `tr...
def __init__(self, count=1, trace=1, countfuncs=0, ignoremods=(), ignoredirs=(), infile=None, outfile=None): """ @param count true iff it should count number of times each line is executed @param trace true iff it should print out each line that is being counted @param countfuncs true iff it should just output a list o...
6bf45c67523a8e81963ce645979ac85f4f75ef33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6bf45c67523a8e81963ce645979ac85f4f75ef33/trace.py
@param ignoredirs a list of the names of directories to ignore all of the (recursive) contents of @param infile file from which to read stored counts to be added into the results
@param ignoredirs a list of the names of directories to ignore all of the (recursive) contents of @param infile file from which to read stored counts to be added into the results
def __init__(self, count=1, trace=1, countfuncs=0, ignoremods=(), ignoredirs=(), infile=None, outfile=None): """ @param count true iff it should count number of times each line is executed @param trace true iff it should print out each line that is being counted @param countfuncs true iff it should just output a list o...
6bf45c67523a8e81963ce645979ac85f4f75ef33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6bf45c67523a8e81963ce645979ac85f4f75ef33/trace.py
key = (filename, lineno,)
key = filename, lineno
def localtrace_trace_and_count(self, frame, why, arg): if why == 'line': # record the file name and line number of every trace # XXX I wish inspect offered me an optimized # `getfilename(frame)' to use in place of the presumably # heavier `getframeinfo()'. --Zooko 2001-10-14 filename, lineno, funcname, context, linei...
6bf45c67523a8e81963ce645979ac85f4f75ef33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6bf45c67523a8e81963ce645979ac85f4f75ef33/trace.py
listfuncs = false
listfuncs = False
def main(argv=None): import getopt if argv is None: argv = sys.argv try: opts, prog_argv = getopt.getopt(argv[1:], "tcrRf:d:msC:l", ["help", "version", "trace", "count", "report", "no-report", "file=", "missing", "ignore-module=", "ignore-dir=", "coverdir=", "listfuncs",]) except getopt.error, msg: sys.stderr.write("...
6bf45c67523a8e81963ce645979ac85f4f75ef33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6bf45c67523a8e81963ce645979ac85f4f75ef33/trace.py
listfuncs = true
listfuncs = True
def main(argv=None): import getopt if argv is None: argv = sys.argv try: opts, prog_argv = getopt.getopt(argv[1:], "tcrRf:d:msC:l", ["help", "version", "trace", "count", "report", "no-report", "file=", "missing", "ignore-module=", "ignore-dir=", "coverdir=", "listfuncs",]) except getopt.error, msg: sys.stderr.write("...
6bf45c67523a8e81963ce645979ac85f4f75ef33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6bf45c67523a8e81963ce645979ac85f4f75ef33/trace.py
print "usage:", sys.argv[0], "file ..."
print "usage:", sys.argv[0], "[-t tabwidth] file ..."
def main(): tabsize = 8 try: opts, args = getopt.getopt(sys.argv[1:], "t:") if not args: raise getopt.error, "At least one file argument required" except getopt.error, msg: print msg print "usage:", sys.argv[0], "file ..." return for file in args: process(file, tabsize)
8fd0f147e74138b8046ba42c083e61e24dfecad2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8fd0f147e74138b8046ba42c083e61e24dfecad2/untabify.py
def urlparse(url, scheme = '', allow_framents = 1): key = url, scheme, allow_framents
def urlparse(url, scheme = '', allow_fragments = 1): key = url, scheme, allow_fragments
def urlparse(url, scheme = '', allow_framents = 1): key = url, scheme, allow_framents try: return _parse_cache[key] except KeyError: pass if len(_parse_cache) >= MAX_CACHE_SIZE: # avoid runaway growth clear_cache() netloc = path = params = query = fragment = '' i = string.find(url, ':') if i > 0: for c in url[:i]: if c...
4722da6ebf96cbe0e0699e935fecc717c04a4b42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4722da6ebf96cbe0e0699e935fecc717c04a4b42/urlparse.py
if allow_framents and scheme in uses_fragment:
if allow_fragments and scheme in uses_fragment:
def urlparse(url, scheme = '', allow_framents = 1): key = url, scheme, allow_framents try: return _parse_cache[key] except KeyError: pass if len(_parse_cache) >= MAX_CACHE_SIZE: # avoid runaway growth clear_cache() netloc = path = params = query = fragment = '' i = string.find(url, ':') if i > 0: for c in url[:i]: if c...
4722da6ebf96cbe0e0699e935fecc717c04a4b42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4722da6ebf96cbe0e0699e935fecc717c04a4b42/urlparse.py
def urljoin(base, url, allow_framents = 1):
def urljoin(base, url, allow_fragments = 1):
def urljoin(base, url, allow_framents = 1): if not base: return url bscheme, bnetloc, bpath, bparams, bquery, bfragment = \ urlparse(base, '', allow_framents) scheme, netloc, path, params, query, fragment = \ urlparse(url, bscheme, allow_framents) # XXX Unofficial hack: default netloc to bnetloc even if # schemes diffe...
4722da6ebf96cbe0e0699e935fecc717c04a4b42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4722da6ebf96cbe0e0699e935fecc717c04a4b42/urlparse.py
urlparse(base, '', allow_framents)
urlparse(base, '', allow_fragments)
def urljoin(base, url, allow_framents = 1): if not base: return url bscheme, bnetloc, bpath, bparams, bquery, bfragment = \ urlparse(base, '', allow_framents) scheme, netloc, path, params, query, fragment = \ urlparse(url, bscheme, allow_framents) # XXX Unofficial hack: default netloc to bnetloc even if # schemes diffe...
4722da6ebf96cbe0e0699e935fecc717c04a4b42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4722da6ebf96cbe0e0699e935fecc717c04a4b42/urlparse.py
urlparse(url, bscheme, allow_framents)
urlparse(url, bscheme, allow_fragments)
def urljoin(base, url, allow_framents = 1): if not base: return url bscheme, bnetloc, bpath, bparams, bquery, bfragment = \ urlparse(base, '', allow_framents) scheme, netloc, path, params, query, fragment = \ urlparse(url, bscheme, allow_framents) # XXX Unofficial hack: default netloc to bnetloc even if # schemes diffe...
4722da6ebf96cbe0e0699e935fecc717c04a4b42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4722da6ebf96cbe0e0699e935fecc717c04a4b42/urlparse.py
def main(): testtype('c', 'c') for type in (['b', 'h', 'i', 'l', 'f', 'd']): testtype(type, 1) unlink(TESTFN)
99866336094bd432860d32dd368f5934683939e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/99866336094bd432860d32dd368f5934683939e7/test_array.py
testtype('u', u'\u263a')
def main(): testtype('c', 'c') for type in (['b', 'h', 'i', 'l', 'f', 'd']): testtype(type, 1) unlink(TESTFN)
99866336094bd432860d32dd368f5934683939e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/99866336094bd432860d32dd368f5934683939e7/test_array.py
testunicode() testsubclassing()
def main(): testtype('c', 'c') for type in (['b', 'h', 'i', 'l', 'f', 'd']): testtype(type, 1) unlink(TESTFN)
99866336094bd432860d32dd368f5934683939e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/99866336094bd432860d32dd368f5934683939e7/test_array.py
contents = contents[:i-1] + contents[i:]
if event.char: contents = contents[:i-1] + contents[i:] icursor = icursor-1
def __normalize(self, event=None): ew = event.widget contents = ew.get() icursor = ew.index(INSERT) if contents == '': contents = '0' # figure out what the contents value is in the current base try: if self.__hexp.get(): v = string.atoi(contents, 16) else: v = string.atoi(contents) except ValueError: v = None # if valu...
8934af00d8a99e606729b96c34e8da6fb9c9123c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8934af00d8a99e606729b96c34e8da6fb9c9123c/TypeinViewer.py
icursor = icursor-1
def __normalize(self, event=None): ew = event.widget contents = ew.get() icursor = ew.index(INSERT) if contents == '': contents = '0' # figure out what the contents value is in the current base try: if self.__hexp.get(): v = string.atoi(contents, 16) else: v = string.atoi(contents) except ValueError: v = None # if valu...
8934af00d8a99e606729b96c34e8da6fb9c9123c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8934af00d8a99e606729b96c34e8da6fb9c9123c/TypeinViewer.py
self.__x.delete(0, END) self.__y.delete(0, END) self.__z.delete(0, END) self.__x.insert(0, redstr) self.__y.insert(0, greenstr) self.__z.insert(0, bluestr)
x, y, z = self.__x, self.__y, self.__z xicursor = x.index(INSERT) yicursor = y.index(INSERT) zicursor = z.index(INSERT) x.delete(0, END) y.delete(0, END) z.delete(0, END) x.insert(0, redstr) y.insert(0, greenstr) z.insert(0, bluestr) x.icursor(xicursor) y.icursor(yicursor) z.icursor(zicursor)
def update_yourself(self, red, green, blue): if self.__hexp.get(): redstr, greenstr, bluestr = map(hex, (red, green, blue)) else: redstr, greenstr, bluestr = red, green, blue self.__x.delete(0, END) self.__y.delete(0, END) self.__z.delete(0, END) self.__x.insert(0, redstr) self.__y.insert(0, greenstr) self.__z.insert(0...
8934af00d8a99e606729b96c34e8da6fb9c9123c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8934af00d8a99e606729b96c34e8da6fb9c9123c/TypeinViewer.py
import mimetools, StringIO headers = mimetools.Message(StringIO.StringIO( 'Content-Length: %d\n' % retrlen)) else: headers = noheaders()
headers += "Content-Length: %d\n" % retrlen headers = mimetools.Message(StringIO.StringIO(headers))
def open_ftp(self, url): """Use FTP protocol.""" host, path = splithost(url) if not host: raise IOError, ('ftp error', 'no host given') host, port = splitport(host) user, host = splituser(host) if user: user, passwd = splitpasswd(user) else: passwd = None host = unquote(host) user = unquote(user or '') passwd = unquote...
88e0b5bee0e69b628a9358c987bf49ac885d1c21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/88e0b5bee0e69b628a9358c987bf49ac885d1c21/urllib.py
new = Request(newurl, req.get_data())
new = Request(newurl, req.get_data(), req.headers)
def http_error_302(self, req, fp, code, msg, headers): if headers.has_key('location'): newurl = headers['location'] elif headers.has_key('uri'): newurl = headers['uri'] else: return newurl = urlparse.urljoin(req.get_full_url(), newurl)
2e250b4378dbfbd2892d215d6add14cc91e2482a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2e250b4378dbfbd2892d215d6add14cc91e2482a/urllib2.py
testme[:42] testme[:42] = "The Answer" del testme[:42]
import sys if sys.platform[:4] != 'java': testme[:42] testme[:42] = "The Answer" del testme[:42] else: print "__getitem__: (slice(0, 42, None),)" print "__setitem__: (slice(0, 42, None), 'The Answer')" print "__delitem__: (slice(0, 42, None),)"
exec """def __%(method)s__(self, *args): print "__%(method)s__:", args
07d8d6415fcddd1149981a9d8de9afd5d829178b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/07d8d6415fcddd1149981a9d8de9afd5d829178b/test_class.py
int(testme) long(testme) float(testme) oct(testme) hex(testme)
if sys.platform[:4] != 'java': int(testme) long(testme) float(testme) oct(testme) hex(testme) else: print "__int__: ()" print "__long__: ()" print "__float__: ()" print "__oct__: ()" print "__hex__: ()"
exec """def __%(method)s__(self, *args): print "__%(method)s__:", args
07d8d6415fcddd1149981a9d8de9afd5d829178b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/07d8d6415fcddd1149981a9d8de9afd5d829178b/test_class.py
if sys.platform[:4] == 'java': import java java.lang.System.gc()
exec """def __%(method)s__(self, *args): print "__%(method)s__:", args
07d8d6415fcddd1149981a9d8de9afd5d829178b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/07d8d6415fcddd1149981a9d8de9afd5d829178b/test_class.py
def fixupOrderForward(self, blocks, default_next): """Make sure all JUMP_FORWARDs jump forward""" index = {} chains = [] cur = [] for b in blocks: index[b] = len(chains) cur.append(b) if b.next and b.next[0] == default_next: chains.append(cur) cur = [] chains.append(cur)
138d90eb73415e48a0e7f09a7c9603b1164bcaed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/138d90eb73415e48a0e7f09a7c9603b1164bcaed/pyassem.py
self.stacksize = findDepth(self.insts)
def flattenGraph(self): """Arrange the blocks in order and resolve jumps""" assert self.stage == RAW self.insts = insts = [] pc = 0 begin = {} end = {} for b in self.getBlocksInOrder(): begin[b] = pc for inst in b.getInstructions(): insts.append(inst) if len(inst) == 1: pc = pc + 1 else: # arg takes 2 bytes pc = pc + 3...
138d90eb73415e48a0e7f09a7c9603b1164bcaed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/138d90eb73415e48a0e7f09a7c9603b1164bcaed/pyassem.py
def findDepth(self, insts):
def findDepth(self, insts, debug=0):
def findDepth(self, insts): depth = 0 maxDepth = 0 for i in insts: opname = i[0] delta = self.effect.get(opname, 0) if delta > 1: depth = depth + delta elif delta < 0: if depth > maxDepth: maxDepth = depth depth = depth + delta else: if depth > maxDepth: maxDepth = depth # now check patterns for pat, pat_delta in self....
138d90eb73415e48a0e7f09a7c9603b1164bcaed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/138d90eb73415e48a0e7f09a7c9603b1164bcaed/pyassem.py
delta = self.effect.get(opname, 0) if delta > 1: depth = depth + delta elif delta < 0: if depth > maxDepth: maxDepth = depth
if debug: print i, delta = self.effect.get(opname, None) if delta is not None:
def findDepth(self, insts): depth = 0 maxDepth = 0 for i in insts: opname = i[0] delta = self.effect.get(opname, 0) if delta > 1: depth = depth + delta elif delta < 0: if depth > maxDepth: maxDepth = depth depth = depth + delta else: if depth > maxDepth: maxDepth = depth # now check patterns for pat, pat_delta in self....
138d90eb73415e48a0e7f09a7c9603b1164bcaed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/138d90eb73415e48a0e7f09a7c9603b1164bcaed/pyassem.py
if depth > maxDepth: maxDepth = depth
def findDepth(self, insts): depth = 0 maxDepth = 0 for i in insts: opname = i[0] delta = self.effect.get(opname, 0) if delta > 1: depth = depth + delta elif delta < 0: if depth > maxDepth: maxDepth = depth depth = depth + delta else: if depth > maxDepth: maxDepth = depth # now check patterns for pat, pat_delta in self....
138d90eb73415e48a0e7f09a7c9603b1164bcaed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/138d90eb73415e48a0e7f09a7c9603b1164bcaed/pyassem.py
if delta == 0:
if delta is None:
def findDepth(self, insts): depth = 0 maxDepth = 0 for i in insts: opname = i[0] delta = self.effect.get(opname, 0) if delta > 1: depth = depth + delta elif delta < 0: if depth > maxDepth: maxDepth = depth depth = depth + delta else: if depth > maxDepth: maxDepth = depth # now check patterns for pat, pat_delta in self....
138d90eb73415e48a0e7f09a7c9603b1164bcaed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/138d90eb73415e48a0e7f09a7c9603b1164bcaed/pyassem.py
if depth < 0: depth = 0
if depth > maxDepth: maxDepth = depth if debug: print depth, maxDepth
def findDepth(self, insts): depth = 0 maxDepth = 0 for i in insts: opname = i[0] delta = self.effect.get(opname, 0) if delta > 1: depth = depth + delta elif delta < 0: if depth > maxDepth: maxDepth = depth depth = depth + delta else: if depth > maxDepth: maxDepth = depth # now check patterns for pat, pat_delta in self....
138d90eb73415e48a0e7f09a7c9603b1164bcaed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/138d90eb73415e48a0e7f09a7c9603b1164bcaed/pyassem.py
return lo + hi * 2
return -(lo + hi * 2)
def CALL_FUNCTION(self, argc): hi, lo = divmod(argc, 256) return lo + hi * 2
138d90eb73415e48a0e7f09a7c9603b1164bcaed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/138d90eb73415e48a0e7f09a7c9603b1164bcaed/pyassem.py
return self.CALL_FUNCTION(argc)+1
return self.CALL_FUNCTION(argc)-1
def CALL_FUNCTION_VAR(self, argc): return self.CALL_FUNCTION(argc)+1
138d90eb73415e48a0e7f09a7c9603b1164bcaed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/138d90eb73415e48a0e7f09a7c9603b1164bcaed/pyassem.py
return self.CALL_FUNCTION(argc)+1
return self.CALL_FUNCTION(argc)-1
def CALL_FUNCTION_KW(self, argc): return self.CALL_FUNCTION(argc)+1
138d90eb73415e48a0e7f09a7c9603b1164bcaed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/138d90eb73415e48a0e7f09a7c9603b1164bcaed/pyassem.py
return self.CALL_FUNCTION(argc)+2
return self.CALL_FUNCTION(argc)-2
def CALL_FUNCTION_VAR_KW(self, argc): return self.CALL_FUNCTION(argc)+2
138d90eb73415e48a0e7f09a7c9603b1164bcaed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/138d90eb73415e48a0e7f09a7c9603b1164bcaed/pyassem.py
def loop(timeout=30.0, use_poll=False, map=None):
def loop(timeout=30.0, use_poll=False, map=None, count=1e309):
def loop(timeout=30.0, use_poll=False, map=None): if map is None: map = socket_map if use_poll and hasattr(select, 'poll'): poll_fun = poll2 else: poll_fun = poll while map: poll_fun(timeout, map)
eac324b90bc76c5c8e305d567c40d53e3440593e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eac324b90bc76c5c8e305d567c40d53e3440593e/asyncore.py
while map:
while map and count >= 0:
def loop(timeout=30.0, use_poll=False, map=None): if map is None: map = socket_map if use_poll and hasattr(select, 'poll'): poll_fun = poll2 else: poll_fun = poll while map: poll_fun(timeout, map)
eac324b90bc76c5c8e305d567c40d53e3440593e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eac324b90bc76c5c8e305d567c40d53e3440593e/asyncore.py
self.passiveserver = 0
self.passiveserver = 1
def connect(self, host = '', port = 0): '''Connect to host. Arguments are: - host: hostname to connect to (string, default previous host) - port: port to connect to (integer, default previous port)''' if host: self.host = host if port: self.port = port self.passiveserver = 0 self.sock = socket.socket(socket.AF_INET, s...
e6ccf3ab966c37f25c3c0e4da58c3b0bc7c5a1f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e6ccf3ab966c37f25c3c0e4da58c3b0bc7c5a1f6/ftplib.py
return result = MenuKey(ord(c)) id = (result>>16) & 0xffff item = result & 0xffff if id: self.do_rawmenu(id, item, None, event) else: if DEBUG: print "Command-" +`c`
return
def do_key(self, event): (what, message, when, where, modifiers) = event c = chr(message & charCodeMask) if modifiers & cmdKey: if c == '.': raise self else: if not self.menubar: MacOS.HandleEvent(event) return result = MenuKey(ord(c)) id = (result>>16) & 0xffff # Hi word item = result & 0xffff # Lo word if id: self.d...
c15e43a2da0bee955d5e939e31c43f8dc6270fef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c15e43a2da0bee955d5e939e31c43f8dc6270fef/FrameWork.py
self.menu.SetMenuItem
self.menu.SetMenuItemKeyGlyph(item, shortcut[2])
def additem(self, label, shortcut=None, callback=None, kind=None): self.menu.AppendMenu('x') # add a dummy string self.items.append(label, shortcut, callback, kind) item = len(self.items) self.menu.SetMenuItemText(item, label) # set the actual text if shortcut and type(shortcut) == type(()): modifiers, char = shortcu...
c15e43a2da0bee955d5e939e31c43f8dc6270fef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c15e43a2da0bee955d5e939e31c43f8dc6270fef/FrameWork.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...
57179feec8b0b22a81ec70b4f4037a17f06fd415 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/57179feec8b0b22a81ec70b4f4037a17f06fd415/test_mutants.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=...
2aa09566c5b1b1ab84db195fd73a51747c1d5606 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2aa09566c5b1b1ab84db195fd73a51747c1d5606/bundlebuilder.py
if len(sys.argv) != 2: sys.stderr.write('usage: telnet hostname\n')
if len(sys.argv) < 2: sys.stderr.write('usage: telnet hostname [port]\n')
def main(): if len(sys.argv) != 2: sys.stderr.write('usage: telnet hostname\n') sys.exit(2) host = sys.argv[1] try: hostaddr = gethostbyname(host) except error: sys.stderr.write(sys.argv[1] + ': bad host name\n') sys.exit(2) # if len(sys.argv) > 2: servname = sys.argv[2] else: servname = 'telnet' # if '0' <= servname[:...
4550b00c80b064a3594d6d648fd7e164ffa59286 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4550b00c80b064a3594d6d648fd7e164ffa59286/telnet.py
s.connect(host, port)
s.connect((host, port))
def main(): if len(sys.argv) != 2: sys.stderr.write('usage: telnet hostname\n') sys.exit(2) host = sys.argv[1] try: hostaddr = gethostbyname(host) except error: sys.stderr.write(sys.argv[1] + ': bad host name\n') sys.exit(2) # if len(sys.argv) > 2: servname = sys.argv[2] else: servname = 'telnet' # if '0' <= servname[:...
4550b00c80b064a3594d6d648fd7e164ffa59286 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4550b00c80b064a3594d6d648fd7e164ffa59286/telnet.py
h.update(u''.join(data).encode('unicode-internal'))
h.update(u''.join(data).encode(encoding))
def test_methods(): h = sha.sha() for i in range(65536): char = unichr(i) data = [ # Predicates (single char) char.isalnum() and u'1' or u'0', char.isalpha() and u'1' or u'0', char.isdecimal() and u'1' or u'0', char.isdigit() and u'1' or u'0', char.islower() and u'1' or u'0', char.isnumeric() and u'1' or u'0', char.i...
67ceca7addbe6b202aa5043b065ac2e3c9749449 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/67ceca7addbe6b202aa5043b065ac2e3c9749449/test_unicodedata.py
exts.append( Extension('audioop', ['audioop.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')
8fbefe28745f980579620147dd0c0fdef94374de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8fbefe28745f980579620147dd0c0fdef94374de/setup.py
self._read(length, self.fp.read)
return self._read(length, self.fp.read)
def read(self, length = None): self._read(length, self.fp.read)
3414c1ceeebd6a0cc00df147cfd3146821010194 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3414c1ceeebd6a0cc00df147cfd3146821010194/mailbox.py
self._read(length, self.fp.readline)
return self._read(length, self.fp.readline)
def readline(self, length = None): self._read(length, self.fp.readline)
3414c1ceeebd6a0cc00df147cfd3146821010194 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3414c1ceeebd6a0cc00df147cfd3146821010194/mailbox.py
log.warn("'%s' does not exist -- can't clean it", self.build_temp)
log.debug("'%s' does not exist -- can't clean it", self.build_temp)
def run(self): # remove the build/temp.<plat> directory (unless it's already # gone) if os.path.exists(self.build_temp): remove_tree(self.build_temp, dry_run=self.dry_run) else: log.warn("'%s' does not exist -- can't clean it", self.build_temp)
a683233d87f5024b9eb944dd408c3a7c4ed3c1ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a683233d87f5024b9eb944dd408c3a7c4ed3c1ad/clean.py
self.lines = []
def __init__(self, fp=None, headers=None, outerboundary="", environ=os.environ, keep_blank_values=0, strict_parsing=0): """Constructor. Read multipart/* until last part.
7fed217515d060b065119f74eea3a024dfb00210 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7fed217515d060b065119f74eea3a024dfb00210/cgi.py
self.lines.append(line)
def read_lines_to_eof(self): """Internal: read lines until EOF.""" while 1: line = self.fp.readline() if not line: self.done = -1 break self.lines.append(line) self.file.write(line)
7fed217515d060b065119f74eea3a024dfb00210 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7fed217515d060b065119f74eea3a024dfb00210/cgi.py
self.lines.append(line)
def read_lines_to_outerboundary(self): """Internal: read lines until outerboundary.""" next = "--" + self.outerboundary last = next + "--" delim = "" while 1: line = self.fp.readline() if not line: self.done = -1 break self.lines.append(line) if line[:2] == "--": strippedline = string.strip(line) if strippedline == nex...
7fed217515d060b065119f74eea3a024dfb00210 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7fed217515d060b065119f74eea3a024dfb00210/cgi.py
self.lines.append(line)
def skip_lines(self): """Internal: skip lines until outer boundary if defined.""" if not self.outerboundary or self.done: return next = "--" + self.outerboundary last = next + "--" while 1: line = self.fp.readline() if not line: self.done = -1 break self.lines.append(line) if line[:2] == "--": strippedline = string.str...
7fed217515d060b065119f74eea3a024dfb00210 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7fed217515d060b065119f74eea3a024dfb00210/cgi.py
curses_libs = ['curses', 'termcap']
curses_libs = ['curses']
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')
0b27ff92d2127ed39f52d9987e4e96313937cbc8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0b27ff92d2127ed39f52d9987e4e96313937cbc8/setup.py
def nuke_release_tree (self, base_dir): try: self.execute (rmtree, (base_dir,), "removing %s" % base_dir) except (IOError, OSError), exc: if exc.filename: msg = "error removing %s: %s (%s)" % \ (base_dir, exc.strerror, exc.filename) else: msg = "error removing %s: %s" % (base_dir, exc.strerror) self.warn (msg)
def make_release_tree (self, base_dir, files):
2dc139cc914ec366e769e464270b8af8aa751b78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2dc139cc914ec366e769e464270b8af8aa751b78/sdist.py
self.nuke_release_tree (base_dir)
remove_tree (base_dir, self.verbose, self.dry_run)
def make_distribution (self):
2dc139cc914ec366e769e464270b8af8aa751b78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2dc139cc914ec366e769e464270b8af8aa751b78/sdist.py
if ModalDialog(self._filterfunc) == 1:
if ModalDialog(_ProgressBar_filterfunc) == 1:
def _update(self, value): tp, h, bar_rect = self.d.GetDialogItem(3) Qd.SetPort(self.d) Qd.FrameRect(bar_rect) # Draw outline inner_rect = Qd.InsetRect(bar_rect, 1, 1) Qd.ForeColor(QuickDraw.whiteColor) Qd.BackColor(QuickDraw.whiteColor) Qd.PaintRect(inner_rect) # Clear internal l, t, r, b = inner_rect r = int(l + (r...
30fe363fd8957d833aa913a2af375d275c581c15 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/30fe363fd8957d833aa913a2af375d275c581c15/EasyDialogs.py
def _filterfunc(self, d, e, *more): return 2
def _filterfunc(self, d, e, *more): return 2 # XXXX For now, this disables the cancel button
30fe363fd8957d833aa913a2af375d275c581c15 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/30fe363fd8957d833aa913a2af375d275c581c15/EasyDialogs.py
def _ProgressBar_filterfunc(*args): return 2
def set(self, value): if value < 0: value = 0 if value > self.maxval: value = self.maxval self._update(value)
30fe363fd8957d833aa913a2af375d275c581c15 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/30fe363fd8957d833aa913a2af375d275c581c15/EasyDialogs.py
self.text.insert(mark, str(s), tags)
self.text.insert(mark, s, tags)
def write(self, s, tags=(), mark="insert"): self.text.insert(mark, str(s), tags) self.text.see(mark) self.text.update()
dc1351758672caf5a3ff3c3f57ecf6f9d16a48f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/dc1351758672caf5a3ff3c3f57ecf6f9d16a48f2/OutputWindow.py
without effecting this threads data:
without affecting this thread's data:
... def squared(self):
3fc2fde7ffc7f94438a212592879e57520f01247 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3fc2fde7ffc7f94438a212592879e57520f01247/_threading_local.py
pass
pass
def __del__(self): key = __getattribute__(self, '_local__key')
3fc2fde7ffc7f94438a212592879e57520f01247 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3fc2fde7ffc7f94438a212592879e57520f01247/_threading_local.py
pth_file.cleanup()
pth_file.cleanup(prep=True)
def test_addpackage(self): # Make sure addpackage() imports if the line starts with 'import', # adds directories to sys.path for any line in the file that is not a # comment or import that is a valid directory name for where the .pth # file resides; invalid directories are not added pth_file = PthFile() pth_file.cleanu...
ee86a66dd87787e54772c93c961fa611311b1502 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ee86a66dd87787e54772c93c961fa611311b1502/test_site.py
unittest.FunctionTestCase(pth_file.test)
self.pth_file_tests(pth_file)
def test_addpackage(self): # Make sure addpackage() imports if the line starts with 'import', # adds directories to sys.path for any line in the file that is not a # comment or import that is a valid directory name for where the .pth # file resides; invalid directories are not added pth_file = PthFile() pth_file.cleanu...
ee86a66dd87787e54772c93c961fa611311b1502 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ee86a66dd87787e54772c93c961fa611311b1502/test_site.py
pth_file.cleanup()
pth_file.cleanup(prep=True)
def test_addsitedir(self): # Same tests for test_addpackage since addsitedir() essentially just # calls addpackage() for every .pth file in the directory pth_file = PthFile() pth_file.cleanup() # Make sure that nothing is pre-existing that is # tested for try: site.addsitedir(pth_file.base_dir, set()) unittest.Function...
ee86a66dd87787e54772c93c961fa611311b1502 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ee86a66dd87787e54772c93c961fa611311b1502/test_site.py
unittest.FunctionTestCase(pth_file.test)
self.pth_file_tests(pth_file)
def test_addsitedir(self): # Same tests for test_addpackage since addsitedir() essentially just # calls addpackage() for every .pth file in the directory pth_file = PthFile() pth_file.cleanup() # Make sure that nothing is pre-existing that is # tested for try: site.addsitedir(pth_file.base_dir, set()) unittest.Function...
ee86a66dd87787e54772c93c961fa611311b1502 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ee86a66dd87787e54772c93c961fa611311b1502/test_site.py