rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
def test(): | def main(): | def test(): import sys import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'td') except getopt.error, msg: sys.stdout = sys.stderr print msg print "usage: quopri [-t | -d] [file] ..." print "-t: quote tabs" print "-d: decode; default encode" sys.exit(2) deco = 0 tabs = 0 for o, a in opts: if o == '-t': tabs = 1... | 9b630a50200e44e16acfe3dee4052b3d0b0677e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9b630a50200e44e16acfe3dee4052b3d0b0677e4/quopri.py |
test() | main() | def test(): import sys import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'td') except getopt.error, msg: sys.stdout = sys.stderr print msg print "usage: quopri [-t | -d] [file] ..." print "-t: quote tabs" print "-d: decode; default encode" sys.exit(2) deco = 0 tabs = 0 for o, a in opts: if o == '-t': tabs = 1... | 9b630a50200e44e16acfe3dee4052b3d0b0677e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9b630a50200e44e16acfe3dee4052b3d0b0677e4/quopri.py |
def run (self): | 018cbb15c04aa544708430bb5b91aebe3e808923 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/018cbb15c04aa544708430bb5b91aebe3e808923/bdist_wininst.py | ||
info = metadata.long_description + '\n' | info = metadata.long_description or '' + '\n' | def create_inifile (self): # Create an inifile containing data describing the installation. # This could be done without creating a real file, but # a file is (at least) useful for debugging bdist_wininst. | 018cbb15c04aa544708430bb5b91aebe3e808923 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/018cbb15c04aa544708430bb5b91aebe3e808923/bdist_wininst.py |
inifile.write ("pyc_compile=%d\n" % self.target_compile) inifile.write ("pyo_compile=%d\n" % self.target_optimize) | def create_inifile (self): # Create an inifile containing data describing the installation. # This could be done without creating a real file, but # a file is (at least) useful for debugging bdist_wininst. | 018cbb15c04aa544708430bb5b91aebe3e808923 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/018cbb15c04aa544708430bb5b91aebe3e808923/bdist_wininst.py | |
vers_minor = string.split (self.target_version, '.')[1] inifile.write ("vers_minor=%s\n" % vers_minor) | inifile.write ("target_version=%s\n" % self.target_version) | def create_inifile (self): # Create an inifile containing data describing the installation. # This could be done without creating a real file, but # a file is (at least) useful for debugging bdist_wininst. | 018cbb15c04aa544708430bb5b91aebe3e808923 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/018cbb15c04aa544708430bb5b91aebe3e808923/bdist_wininst.py |
import struct, zlib | import struct | def create_exe (self, arcname, fullname): import struct, zlib | 018cbb15c04aa544708430bb5b91aebe3e808923 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/018cbb15c04aa544708430bb5b91aebe3e808923/bdist_wininst.py |
comp_method = zlib.DEFLATED co = zlib.compressobj (zlib.Z_DEFAULT_COMPRESSION, comp_method, -15) zcfgdata = co.compress (cfgdata) + co.flush() | def create_exe (self, arcname, fullname): import struct, zlib | 018cbb15c04aa544708430bb5b91aebe3e808923 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/018cbb15c04aa544708430bb5b91aebe3e808923/bdist_wininst.py | |
file.write (zcfgdata) crc32 = zlib.crc32 (cfgdata) header = struct.pack ("<iiiiiiii", 0x12345678, comp_method, crc32, len (cfgdata), len (zcfgdata), 0, 0, 0) | file.write (cfgdata) header = struct.pack ("<ii", 0x12345679, len (cfgdata)) | def create_exe (self, arcname, fullname): import struct, zlib | 018cbb15c04aa544708430bb5b91aebe3e808923 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/018cbb15c04aa544708430bb5b91aebe3e808923/bdist_wininst.py |
import zlib, base64 return zlib.decompress (base64.decodestring (EXEDATA)) | import base64 return base64.decodestring (EXEDATA) | def get_exe_bytes (self): import zlib, base64 return zlib.decompress (base64.decodestring (EXEDATA)) | 018cbb15c04aa544708430bb5b91aebe3e808923 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/018cbb15c04aa544708430bb5b91aebe3e808923/bdist_wininst.py |
import zlib, base64 file = r"c:\wininst\wininst.exe" | import base64 file = r"..\..\misc\wininst.exe" | def get_exe_bytes (self): import zlib, base64 return zlib.decompress (base64.decodestring (EXEDATA)) | 018cbb15c04aa544708430bb5b91aebe3e808923 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/018cbb15c04aa544708430bb5b91aebe3e808923/bdist_wininst.py |
cdata = zlib.compress (data, 9) bdata = base64.encodestring (cdata) | bdata = base64.encodestring (data) | def get_exe_bytes (self): import zlib, base64 return zlib.decompress (base64.decodestring (EXEDATA)) | 018cbb15c04aa544708430bb5b91aebe3e808923 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/018cbb15c04aa544708430bb5b91aebe3e808923/bdist_wininst.py |
print "%d %d %d" % (len (data), len (cdata), len (bdata)) EXEDATA = """ eNrtfQt4U9eV7pEl28IIJIJNlMRJlCBaN3JcE5uMiYDK2HJMsI1s2TIkDsbYMrLwK9IRj4akENkT DhvlMU06aW/bSZp2pnMnM5OZ5jY0bYONSQzkwcMp0JJpIO1NZQyEJATMU/df+2z5BalnvszMN/f7 fPi29jl7r7X2WmuvvdbaW0em9P6nJK0kSTqUWEyStknq5ZDGv46iTL31tanSK5PeuW2bpuSd2yp9 TUFLe6BtVaCuxVJf... | print "%d %d" % (len (data), len (bdata)) EXEDATA = """\ TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAA4AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v ZGUuDQ0KJAAAAAAAAADq0pWMrrP7366z+9+us/vf1a/336+z+98tr/XfrLP731GT/9+ss/vfzKzo 36az+9+us/rf9rP7366z+9+js/vfUZP... | def get_exe_bytes (self): import zlib, base64 return zlib.decompress (base64.decodestring (EXEDATA)) | 018cbb15c04aa544708430bb5b91aebe3e808923 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/018cbb15c04aa544708430bb5b91aebe3e808923/bdist_wininst.py |
self.file.write(delim + line) | self.file.write(odelim + line) | def read_lines_to_outerboundary(self): | e5e46e0d298be92faf19b069846cb8d039b23884 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e5e46e0d298be92faf19b069846cb8d039b23884/cgi.py |
msg['Content-Transfer-Encoding'] = '8bit' | charset = msg.get_charset() output_cset = charset and charset.output_charset if output_cset and output_cset.lower().startswith('iso-2202-'): msg['Content-Transfer-Encoding'] = '7bit' else: msg['Content-Transfer-Encoding'] = '8bit' | def encode_7or8bit(msg): """Set the Content-Transfer-Encoding header to 7bit or 8bit.""" orig = msg.get_payload() if orig is None: # There's no payload. For backwards compatibility we use 7bit msg['Content-Transfer-Encoding'] = '7bit' return # We play a trick to make this go fast. If encoding to ASCII succeeds, we # ... | 61e5616d746811a763633c6fc71c2f35ba601915 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/61e5616d746811a763633c6fc71c2f35ba601915/Encoders.py |
def splitbins(bins): bytes = sys.maxint for shift in range(16): bin1 = [] bin2 = [] | def splitbins(t, trace=0): """t, trace=0 -> (t1, t2, shift). Split a table to save space. t is a sequence of ints. This function can be useful to save space if many of the ints are the same. t1 and t2 are lists of ints, and shift is an int, chosen to minimize the combined size of t1 and t2 (in C code), and where fo... | def splitbins(bins): # split a sparse integer table into two tables, such as: # value = t2[(t1[char>>shift]<<shift)+(char&mask)] # and value == 0 means no data bytes = sys.maxint for shift in range(16): bin1 = [] bin2 = [] size = 2**shift bincache = {} for i in range(0, len(bins), size): bin = bins[i:i+size] index = ... | 2101348830ff0d65cebd4caf886011f45bcc7618 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2101348830ff0d65cebd4caf886011f45bcc7618/makeunicodedata.py |
for i in range(0, len(bins), size): bin = bins[i:i+size] index = bincache.get(tuple(bin)) | for i in range(0, len(t), size): bin = t[i:i+size] index = bincache.get(bin) | def splitbins(bins): # split a sparse integer table into two tables, such as: # value = t2[(t1[char>>shift]<<shift)+(char&mask)] # and value == 0 means no data bytes = sys.maxint for shift in range(16): bin1 = [] bin2 = [] size = 2**shift bincache = {} for i in range(0, len(bins), size): bin = bins[i:i+size] index = ... | 2101348830ff0d65cebd4caf886011f45bcc7618 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2101348830ff0d65cebd4caf886011f45bcc7618/makeunicodedata.py |
index = len(bin2) bincache[tuple(bin)] = index for v in bin: if v is None: bin2.append(0) else: bin2.append(v) bin1.append(index>>shift) | index = len(t2) bincache[bin] = index t2.extend(bin) t1.append(index >> shift) | def splitbins(bins): # split a sparse integer table into two tables, such as: # value = t2[(t1[char>>shift]<<shift)+(char&mask)] # and value == 0 means no data bytes = sys.maxint for shift in range(16): bin1 = [] bin2 = [] size = 2**shift bincache = {} for i in range(0, len(bins), size): bin = bins[i:i+size] index = ... | 2101348830ff0d65cebd4caf886011f45bcc7618 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2101348830ff0d65cebd4caf886011f45bcc7618/makeunicodedata.py |
b = len(bin1)*getsize(bin1) + len(bin2)*getsize(bin2) | b = len(t1)*getsize(t1) + len(t2)*getsize(t2) if trace: dump(t1, t2, shift, b) | def splitbins(bins): # split a sparse integer table into two tables, such as: # value = t2[(t1[char>>shift]<<shift)+(char&mask)] # and value == 0 means no data bytes = sys.maxint for shift in range(16): bin1 = [] bin2 = [] size = 2**shift bincache = {} for i in range(0, len(bins), size): bin = bins[i:i+size] index = ... | 2101348830ff0d65cebd4caf886011f45bcc7618 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2101348830ff0d65cebd4caf886011f45bcc7618/makeunicodedata.py |
best = shift, bin1, bin2 | best = t1, t2, shift | def splitbins(bins): # split a sparse integer table into two tables, such as: # value = t2[(t1[char>>shift]<<shift)+(char&mask)] # and value == 0 means no data bytes = sys.maxint for shift in range(16): bin1 = [] bin2 = [] size = 2**shift bincache = {} for i in range(0, len(bins), size): bin = bins[i:i+size] index = ... | 2101348830ff0d65cebd4caf886011f45bcc7618 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2101348830ff0d65cebd4caf886011f45bcc7618/makeunicodedata.py |
shift, bin1, bin2 = best return bin1, bin2, shift | t1, t2, shift = best if trace: print >>sys.stderr, "Best:", dump(t1, t2, shift, bytes) if __debug__: mask = ~((~0) << shift) for i in xrange(len(t)): assert t[i] == t2[(t1[i >> shift] << shift) + (i & mask)] return best | def splitbins(bins): # split a sparse integer table into two tables, such as: # value = t2[(t1[char>>shift]<<shift)+(char&mask)] # and value == 0 means no data bytes = sys.maxint for shift in range(16): bin1 = [] bin2 = [] size = 2**shift bincache = {} for i in range(0, len(bins), size): bin = bins[i:i+size] index = ... | 2101348830ff0d65cebd4caf886011f45bcc7618 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2101348830ff0d65cebd4caf886011f45bcc7618/makeunicodedata.py |
print >> self.stream, "Welcome to the profile statistics browser." | def postcmd(self, stop, line): if stop: return stop return None | e588c2ba9716a81358438b4e7cd23724dcef2ba9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e588c2ba9716a81358438b4e7cd23724dcef2ba9/pstats.py | |
ProfileBrowser(initprofile).cmdloop() print >> self.stream, "Goodbye." | browser = ProfileBrowser(initprofile) print >> browser.stream, "Welcome to the profile statistics browser." browser.cmdloop() print >> browser.stream, "Goodbye." | def postcmd(self, stop, line): if stop: return stop return None | e588c2ba9716a81358438b4e7cd23724dcef2ba9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e588c2ba9716a81358438b4e7cd23724dcef2ba9/pstats.py |
if tarinfo.chksum not in calc_chksums(buf): self._dbg(1, "tarfile: Bad Checksum %r" % tarinfo.name) | def next(self): """Return the next member of the archive as a TarInfo object, when TarFile is opened for reading. Return None if there is no more available. """ self._check("ra") if self.firstmember is not None: m = self.firstmember self.firstmember = None return m | 4a5fbda66d3132af761e32e164ed398977f51694 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4a5fbda66d3132af761e32e164ed398977f51694/tarfile.py | |
elif type(arg) == type(""): | elif isinstance(arg, basestring): | def load_stats(self, arg): if not arg: self.stats = {} elif type(arg) == type(""): f = open(arg, 'rb') self.stats = marshal.load(f) f.close() try: file_stats = os.stat(arg) arg = time.ctime(file_stats.st_mtime) + " " + arg except: # in case this is not unix pass self.files = [ arg ] elif hasattr(arg, 'create_stats... | 21d900f1d68fe4668388634408e84a5e610baa16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/21d900f1d68fe4668388634408e84a5e610baa16/pstats.py |
def _center(str, width): """Center a string in a field.""" n = width - len(str) if n <= 0: return str return ' '*((n+1)/2) + str + ' '*((n)/2) | def _center(str, width): """Center a string in a field.""" n = width - len(str) if n <= 0: return str return ' '*((n+1)/2) + str + ' '*((n)/2) | 9ecf9ce161bf3c1eafebe3c7f6d06b4f2458ff4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9ecf9ce161bf3c1eafebe3c7f6d06b4f2458ff4e/calendar.py | |
days.append(_center(s, width)) | days.append(s.center(width)) | def week(theweek, width): """Returns a single week in a string (no newline).""" days = [] for day in theweek: if day == 0: s = '' else: s = '%2i' % day # right-align single-digit days days.append(_center(s, width)) return ' '.join(days) | 9ecf9ce161bf3c1eafebe3c7f6d06b4f2458ff4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9ecf9ce161bf3c1eafebe3c7f6d06b4f2458ff4e/calendar.py |
days.append(_center(names[i%7][:width], width)) | days.append(names[i%7][:width].center(width)) | def weekheader(width): """Return a header for a week.""" if width >= 9: names = day_name else: names = day_abbr days = [] for i in range(_firstweekday, _firstweekday + 7): days.append(_center(names[i%7][:width], width)) return ' '.join(days) | 9ecf9ce161bf3c1eafebe3c7f6d06b4f2458ff4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9ecf9ce161bf3c1eafebe3c7f6d06b4f2458ff4e/calendar.py |
s = (_center(month_name[themonth] + ' ' + `theyear`, | s = ((month_name[themonth] + ' ' + `theyear`).center( | def month(theyear, themonth, w=0, l=0): """Return a month's calendar string (multi-line).""" w = max(2, w) l = max(1, l) s = (_center(month_name[themonth] + ' ' + `theyear`, 7 * (w + 1) - 1).rstrip() + '\n' * l + weekheader(w).rstrip() + '\n' * l) for aweek in monthcalendar(theyear, themonth): s = s + week(aweek, w).rs... | 9ecf9ce161bf3c1eafebe3c7f6d06b4f2458ff4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9ecf9ce161bf3c1eafebe3c7f6d06b4f2458ff4e/calendar.py |
return (_center(a, colwidth) + ' ' * spacing + _center(b, colwidth) + ' ' * spacing + _center(c, colwidth)) | return (a.center(colwidth) + ' ' * spacing + b.center(colwidth) + ' ' * spacing + c.center(colwidth)) | def format3cstring(a, b, c, colwidth=_colwidth, spacing=_spacing): """Returns a string formatted from 3 strings, centered within 3 columns.""" return (_center(a, colwidth) + ' ' * spacing + _center(b, colwidth) + ' ' * spacing + _center(c, colwidth)) | 9ecf9ce161bf3c1eafebe3c7f6d06b4f2458ff4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9ecf9ce161bf3c1eafebe3c7f6d06b4f2458ff4e/calendar.py |
s = _center(`year`, colwidth * 3 + c * 2).rstrip() + '\n' * l | s = `year`.center(colwidth * 3 + c * 2).rstrip() + '\n' * l | def calendar(year, w=0, l=0, c=_spacing): """Returns a year's calendar as a multi-line string.""" w = max(2, w) l = max(1, l) c = max(2, c) colwidth = (w + 1) * 7 - 1 s = _center(`year`, colwidth * 3 + c * 2).rstrip() + '\n' * l header = weekheader(w) header = format3cstring(header, header, header, colwidth, c).rstrip(... | 9ecf9ce161bf3c1eafebe3c7f6d06b4f2458ff4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9ecf9ce161bf3c1eafebe3c7f6d06b4f2458ff4e/calendar.py |
def add_header(self, _name, _value, **_params): """Extended header setting. | 229727fa0738562c22b7bdc672a8762886020eac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/229727fa0738562c22b7bdc672a8762886020eac/Message.py | ||
for k in value.keys(): | for k, v in value.items(): | def dump_struct(self, value, write, escape=escape): i = id(value) if self.memo.has_key(i): raise TypeError, "cannot marshal recursive dictionaries" self.memo[i] = None dump = self.__dump write("<value><struct>\n") for k in value.keys(): write("<member>\n") if type(k) is not StringType: raise TypeError, "dictionary key ... | 5962f457b48997dbfb8bcb0769b57cd3fab96148 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5962f457b48997dbfb8bcb0769b57cd3fab96148/xmlrpclib.py |
raise TypeError, "dictionary key must be string" | if unicode and type(k) is UnicodeType: k = k.encode(self.encoding) else: raise TypeError, "dictionary key must be string" | def dump_struct(self, value, write, escape=escape): i = id(value) if self.memo.has_key(i): raise TypeError, "cannot marshal recursive dictionaries" self.memo[i] = None dump = self.__dump write("<value><struct>\n") for k in value.keys(): write("<member>\n") if type(k) is not StringType: raise TypeError, "dictionary key ... | 5962f457b48997dbfb8bcb0769b57cd3fab96148 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5962f457b48997dbfb8bcb0769b57cd3fab96148/xmlrpclib.py |
dump(value[k], write) | dump(v, write) | def dump_struct(self, value, write, escape=escape): i = id(value) if self.memo.has_key(i): raise TypeError, "cannot marshal recursive dictionaries" self.memo[i] = None dump = self.__dump write("<value><struct>\n") for k in value.keys(): write("<member>\n") if type(k) is not StringType: raise TypeError, "dictionary key ... | 5962f457b48997dbfb8bcb0769b57cd3fab96148 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5962f457b48997dbfb8bcb0769b57cd3fab96148/xmlrpclib.py |
def_build = "%s setup.py build" % self.python | def_setup_call = "%s %s" % (self.python,os.path.basename(sys.argv[0])) def_build = "%s build" % def_setup_call | 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().replace('-','_'), '%define release ' + self.release.repl... | 4548239e2b171ea9fa175744f17a32a884ab514a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4548239e2b171ea9fa175744f17a32a884ab514a/bdist_rpm.py |
("%s setup.py install " | ("%s install " | 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().replace('-','_'), '%define release ' + self.release.repl... | 4548239e2b171ea9fa175744f17a32a884ab514a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4548239e2b171ea9fa175744f17a32a884ab514a/bdist_rpm.py |
"--record=INSTALLED_FILES") % self.python), | "--record=INSTALLED_FILES") % def_setup_call), | 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().replace('-','_'), '%define release ' + self.release.repl... | 4548239e2b171ea9fa175744f17a32a884ab514a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4548239e2b171ea9fa175744f17a32a884ab514a/bdist_rpm.py |
self.msg('IAC %d not recognized' % ord(opt)) | self.msg('IAC %d not recognized' % ord(c)) | def process_rawq(self): """Transfer from raw queue to cooked queue. | 6a1bd39d8ee0155df47557f4fb5db0913e59468f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6a1bd39d8ee0155df47557f4fb5db0913e59468f/telnetlib.py |
def end_fill(): _getpen.end_fill() | def end_fill(): _getpen().end_fill() | def end_fill(): _getpen.end_fill() | 1be63af41d3a21f98b8514cfd059df453afb7039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1be63af41d3a21f98b8514cfd059df453afb7039/turtle.py |
return scheme, url[len(scheme) + 1:] | return scheme.lower(), url[len(scheme) + 1:] | def splittype(url): """splittype('type:opaquestring') --> 'type', 'opaquestring'.""" global _typeprog if _typeprog is None: import re _typeprog = re.compile('^([^/:]+):') match = _typeprog.match(url) if match: scheme = match.group(1) return scheme, url[len(scheme) + 1:] return None, url | 9e94afd18daec70460ff52b4a75bde31e60347b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9e94afd18daec70460ff52b4a75bde31e60347b4/urllib.py |
>>> old = _unittest_reportflags >>> set_unittest_reportflags(REPORT_NDIFF | | >>> import doctest >>> old = doctest._unittest_reportflags >>> doctest.set_unittest_reportflags(REPORT_NDIFF | | def set_unittest_reportflags(flags): """Sets the unittest option flags. The old flag is returned so that a runner could restore the old value if it wished to: >>> old = _unittest_reportflags >>> set_unittest_reportflags(REPORT_NDIFF | ... REPORT_ONLY_FIRST_FAILURE) == old True >>> import doc... | b7e99b642f75ce2b4f31af26b693feda00c9da7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7e99b642f75ce2b4f31af26b693feda00c9da7c/doctest.py |
>>> import doctest | def set_unittest_reportflags(flags): """Sets the unittest option flags. The old flag is returned so that a runner could restore the old value if it wished to: >>> old = _unittest_reportflags >>> set_unittest_reportflags(REPORT_NDIFF | ... REPORT_ONLY_FIRST_FAILURE) == old True >>> import doc... | b7e99b642f75ce2b4f31af26b693feda00c9da7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7e99b642f75ce2b4f31af26b693feda00c9da7c/doctest.py | |
>>> set_unittest_reportflags(ELLIPSIS) | >>> doctest.set_unittest_reportflags(ELLIPSIS) | def set_unittest_reportflags(flags): """Sets the unittest option flags. The old flag is returned so that a runner could restore the old value if it wished to: >>> old = _unittest_reportflags >>> set_unittest_reportflags(REPORT_NDIFF | ... REPORT_ONLY_FIRST_FAILURE) == old True >>> import doc... | b7e99b642f75ce2b4f31af26b693feda00c9da7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7e99b642f75ce2b4f31af26b693feda00c9da7c/doctest.py |
>>> set_unittest_reportflags(old) == (REPORT_NDIFF | | >>> doctest.set_unittest_reportflags(old) == (REPORT_NDIFF | | def set_unittest_reportflags(flags): """Sets the unittest option flags. The old flag is returned so that a runner could restore the old value if it wished to: >>> old = _unittest_reportflags >>> set_unittest_reportflags(REPORT_NDIFF | ... REPORT_ONLY_FIRST_FAILURE) == old True >>> import doc... | b7e99b642f75ce2b4f31af26b693feda00c9da7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7e99b642f75ce2b4f31af26b693feda00c9da7c/doctest.py |
compile_dir(dir, maxlevels, None, force) | success = success and compile_dir(dir, maxlevels, None, force) return success | def compile_path(skip_curdir=1, maxlevels=0, force=0): """Byte-compile all module on sys.path. Arguments (all optional): skip_curdir: if true, skip current directory (default true) maxlevels: max recursion level (default 0) force: as for compile_dir() (default 0) """ for dir in sys.path: if (not dir or dir == os.c... | 9065ea36deb5812654c1959413a92cfb18ad3b5a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9065ea36deb5812654c1959413a92cfb18ad3b5a/compileall.py |
compile_dir(dir, maxlevels, ddir, force) | success = success and compile_dir(dir, maxlevels, ddir, force) | def main(): """Script main program.""" import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'lfd:') except getopt.error, msg: print msg print "usage: compileall [-l] [-f] [-d destdir] [directory ...]" print "-l: don't recurse down" print "-f: force rebuild even if timestamps are up-to-date" print "-d destdir: pu... | 9065ea36deb5812654c1959413a92cfb18ad3b5a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9065ea36deb5812654c1959413a92cfb18ad3b5a/compileall.py |
compile_path() | success = compile_path() | def main(): """Script main program.""" import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'lfd:') except getopt.error, msg: print msg print "usage: compileall [-l] [-f] [-d destdir] [directory ...]" print "-l: don't recurse down" print "-f: force rebuild even if timestamps are up-to-date" print "-d destdir: pu... | 9065ea36deb5812654c1959413a92cfb18ad3b5a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9065ea36deb5812654c1959413a92cfb18ad3b5a/compileall.py |
main() | sys.exit(not main()) | def main(): """Script main program.""" import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'lfd:') except getopt.error, msg: print msg print "usage: compileall [-l] [-f] [-d destdir] [directory ...]" print "-l: don't recurse down" print "-f: force rebuild even if timestamps are up-to-date" print "-d destdir: pu... | 9065ea36deb5812654c1959413a92cfb18ad3b5a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9065ea36deb5812654c1959413a92cfb18ad3b5a/compileall.py |
print '%s started at %s\n\tLocal addr: %s\n\tRemote addr:%s' % ( | print >> DEBUGSTREAM, \ '%s started at %s\n\tLocal addr: %s\n\tRemote addr:%s' % ( | def __init__(self, localaddr, remoteaddr): self._localaddr = localaddr self._remoteaddr = remoteaddr asyncore.dispatcher.__init__(self) self.create_socket(socket.AF_INET, socket.SOCK_STREAM) # try to re-use a server port if possible self.socket.setsockopt( socket.SOL_SOCKET, socket.SO_REUSEADDR, self.socket.getsockopt(... | 4a8e9f4e4215cc9bc9499ebda2017263b85c06f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4a8e9f4e4215cc9bc9499ebda2017263b85c06f0/smtpd.py |
self.literal = 0 | def goahead(self, end): rawdata = self.rawdata i = 0 n = len(rawdata) while i < n: if i > 0: self.__at_start = 0 if self.nomoretags: data = rawdata[i:n] self.handle_data(data) self.lineno = self.lineno + string.count(data, '\n') i = n break res = interesting.search(rawdata, i) if res: j = res.start(0) else: j = n if i ... | f484a3366b2e0e40b0577d652407f9b84a0ec208 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f484a3366b2e0e40b0577d652407f9b84a0ec208/xmllib.py | |
tag = self._command(name, mailbox, flags, date_time, message) return self._command_complete(name, tag) | return self._simple_command(name, mailbox, flags, date_time, message) | def append(self, mailbox, flags, date_time, message): """Append message to named mailbox. | 46586822058b54c93e36247f31b13b4d7286f0a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46586822058b54c93e36247f31b13b4d7286f0a2/imaplib.py |
return code, self.untagged_responses.get(code, [None]) | return self._untagged_response(code, code) | def response(self, code): """Return data for response 'code' if received, or None. | 46586822058b54c93e36247f31b13b4d7286f0a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46586822058b54c93e36247f31b13b4d7286f0a2/imaplib.py |
for r in ('EXISTS', 'READ-WRITE'): if self.untagged_responses.has_key(r): del self.untagged_responses[r] | self.untagged_responses = {} | def select(self, mailbox='INBOX', readonly=None): """Select a mailbox. | 46586822058b54c93e36247f31b13b4d7286f0a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46586822058b54c93e36247f31b13b4d7286f0a2/imaplib.py |
command = '%s %s' % (command, flag_list) typ, dat = self._simple_command('STORE', message_set, command) | typ, dat = self._simple_command('STORE', message_set, command, flag_list) | def store(self, message_set, command, flag_list): """Alters flag dispositions for messages in mailbox. | 46586822058b54c93e36247f31b13b4d7286f0a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46586822058b54c93e36247f31b13b4d7286f0a2/imaplib.py |
def uid(self, command, args): """Execute "command args" with messages identified by UID, | def uid(self, command, *args): """Execute "command arg ..." with messages identified by UID, | def uid(self, command, args): """Execute "command args" with messages identified by UID, rather than message number. | 46586822058b54c93e36247f31b13b4d7286f0a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46586822058b54c93e36247f31b13b4d7286f0a2/imaplib.py |
(typ, [data]) = <instance>.uid(command, args) | (typ, [data]) = <instance>.uid(command, arg1, arg2, ...) | def uid(self, command, args): """Execute "command args" with messages identified by UID, rather than message number. | 46586822058b54c93e36247f31b13b4d7286f0a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46586822058b54c93e36247f31b13b4d7286f0a2/imaplib.py |
typ, dat = self._simple_command('UID', command, args) | typ, dat = apply(self._simple_command, ('UID', command) + args) | def uid(self, command, args): """Execute "command args" with messages identified by UID, rather than message number. | 46586822058b54c93e36247f31b13b4d7286f0a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46586822058b54c93e36247f31b13b4d7286f0a2/imaplib.py |
def xatom(self, name, arg1=None, arg2=None): | def xatom(self, name, *args): | def xatom(self, name, arg1=None, arg2=None): """Allow simple extension commands notified by server in CAPABILITY response. | 46586822058b54c93e36247f31b13b4d7286f0a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46586822058b54c93e36247f31b13b4d7286f0a2/imaplib.py |
(typ, [data]) = <instance>.xatom(name, arg1=None, arg2=None) | (typ, [data]) = <instance>.xatom(name, arg, ...) | def xatom(self, name, arg1=None, arg2=None): """Allow simple extension commands notified by server in CAPABILITY response. | 46586822058b54c93e36247f31b13b4d7286f0a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46586822058b54c93e36247f31b13b4d7286f0a2/imaplib.py |
return self._simple_command(name, arg1, arg2) | return apply(self._simple_command, (name,) + args) | def xatom(self, name, arg1=None, arg2=None): """Allow simple extension commands notified by server in CAPABILITY response. | 46586822058b54c93e36247f31b13b4d7286f0a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46586822058b54c93e36247f31b13b4d7286f0a2/imaplib.py |
if d is not None: data = '%s %s' % (data, d) | if d is None: continue if type(d) is type(''): l = len(string.split(d)) else: l = 1 if l == 0 or l > 1 and (d[0],d[-1]) not in (('(',')'),('"','"')): data = '%s "%s"' % (data, d) else: data = '%s %s' % (data, d) | def _command(self, name, dat1=None, dat2=None, dat3=None, literal=None): | 46586822058b54c93e36247f31b13b4d7286f0a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46586822058b54c93e36247f31b13b4d7286f0a2/imaplib.py |
resp = self._get_line()[:-2] | resp = self._get_line() | def _get_response(self): | 46586822058b54c93e36247f31b13b4d7286f0a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46586822058b54c93e36247f31b13b4d7286f0a2/imaplib.py |
dat = self._get_line()[:-2] | dat = self._get_line() | def _get_response(self): | 46586822058b54c93e36247f31b13b4d7286f0a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46586822058b54c93e36247f31b13b4d7286f0a2/imaplib.py |
print '\t< %s' % line[:-2] | print '\t< %s' % line | def _get_line(self): | 46586822058b54c93e36247f31b13b4d7286f0a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46586822058b54c93e36247f31b13b4d7286f0a2/imaplib.py |
def _simple_command(self, name, dat1=None, dat2=None): return self._command_complete(name, self._command(name, dat1, dat2)) | def _simple_command(self, name, *args): return self._command_complete(name, apply(self._command, (name,) + args)) | def _simple_command(self, name, dat1=None, dat2=None): | 46586822058b54c93e36247f31b13b4d7286f0a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46586822058b54c93e36247f31b13b4d7286f0a2/imaplib.py |
('create', ('/tmp/xxx',)), ('rename', ('/tmp/xxx', '/tmp/yyy')), ('CREATE', ('/tmp/yyz',)), ('append', ('/tmp/yyz', None, None, 'From: anon@x.y.z\n\ndata...')), ('select', ('/tmp/yyz',)), ('recent', ()), | ('create', ('/tmp/xxx 1',)), ('rename', ('/tmp/xxx 1', '/tmp/yyy')), ('CREATE', ('/tmp/yyz 2',)), ('append', ('/tmp/yyz 2', None, None, 'From: anon@x.y.z\n\ndata...')), ('select', ('/tmp/yyz 2',)), | def Time2Internaldate(date_time): """Convert 'date_time' to IMAP4 INTERNALDATE representation. Return string in form: '"DD-Mmm-YYYY HH:MM:SS +HHMM"' """ dttype = type(date_time) if dttype is type(1): tt = time.localtime(date_time) elif dttype is type(()): tt = date_time elif dttype is type(""): return date_time # As... | 46586822058b54c93e36247f31b13b4d7286f0a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46586822058b54c93e36247f31b13b4d7286f0a2/imaplib.py |
('response', ('EXISTS',)), | def Time2Internaldate(date_time): """Convert 'date_time' to IMAP4 INTERNALDATE representation. Return string in form: '"DD-Mmm-YYYY HH:MM:SS +HHMM"' """ dttype = type(date_time) if dttype is type(1): tt = time.localtime(date_time) elif dttype is type(()): tt = date_time elif dttype is type(""): return date_time # As... | 46586822058b54c93e36247f31b13b4d7286f0a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46586822058b54c93e36247f31b13b4d7286f0a2/imaplib.py | |
path = string.split(ml)[-1] | mo = re.match(r'.*"([^"]+)"$', ml) if mo: path = mo.group(1) else: path = string.split(ml)[-1] | def run(cmd, args): typ, dat = apply(eval('M.%s' % cmd), args) print ' %s %s\n => %s %s' % (cmd, args, typ, dat) return dat | 46586822058b54c93e36247f31b13b4d7286f0a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46586822058b54c93e36247f31b13b4d7286f0a2/imaplib.py |
run('uid', ('FETCH', '%s (FLAGS INTERNALDATE RFC822.SIZE RFC822.HEADER RFC822)' % uid)) | run('uid', ('FETCH', '%s' % uid, '(FLAGS INTERNALDATE RFC822.SIZE RFC822.HEADER RFC822)')) | def run(cmd, args): typ, dat = apply(eval('M.%s' % cmd), args) print ' %s %s\n => %s %s' % (cmd, args, typ, dat) return dat | 46586822058b54c93e36247f31b13b4d7286f0a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46586822058b54c93e36247f31b13b4d7286f0a2/imaplib.py |
__import__(ext.name) | imp.load_dynamic(ext.name, ext_filename) | def build_extension(self, ext): | af14289c5426743015dbbe0567e2c2677f1bff0c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/af14289c5426743015dbbe0567e2c2677f1bff0c/setup.py |
self.format_all(map(lambda (mtime, file): file, list)) | self.format_all(map(lambda (mtime, file): file, list), headers=0) | def do_recent(self): | 1f04772347177cdbedfcaed2511f380f4ed6eb3a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1f04772347177cdbedfcaed2511f380f4ed6eb3a/faqwiz.py |
else: | elif tokentype in (NAME, OP) and level == 1: | def _readmodule(module, path, inpackage=None): '''Do the hard work for readmodule[_ex].''' # Compute the full module name (prepending inpackage if set) if inpackage: fullmodule = "%s.%s" % (inpackage, module) else: fullmodule = module # Check in the cache if fullmodule in _modules: return _modules[fullmodule] # Initi... | 47dc1182470a5479025e654b173cdd4bb983e450 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/47dc1182470a5479025e654b173cdd4bb983e450/pyclbr.py |
fp.write(' | fp.write(' | def link (self, target_desc, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None): # First examine a couple of options for things that aren't implemented yet if not target_desc in ... | 92c5bdbc194f0533ceee7492afc8a2bfdf5d5da8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/92c5bdbc194f0533ceee7492afc8a2bfdf5d5da8/mwerkscompiler.py |
codecs.StreamReader.__init__(self,strict,errors) | codecs.StreamReader.__init__(self,stream,errors) | def __init__(self,stream,errors='strict',mapping=None): | e1a0391b4963a079aeaddb45307907cae82e460e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e1a0391b4963a079aeaddb45307907cae82e460e/charmap.py |
ctype = string.lower(info['content-type']) | ctype = string.lower(cgi.parse_header(info['content-type'])[0]) | def checkforhtml(self, info, url): if info.has_key('content-type'): ctype = string.lower(info['content-type']) else: if url[-1:] == "/": return 1 ctype, encoding = mimetypes.guess_type(url) if ctype == 'text/html': return 1 else: self.note(1, " Not HTML, mime type %s", ctype) return 0 | 88a20baa77493d2a432f1636d2933001f083f0e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/88a20baa77493d2a432f1636d2933001f083f0e8/webchecker.py |
id(data), | id(data)+12, | def mk16pixmap(w, h, data): """kludge a pixmap together""" rv = struct.pack("lhhhhhhhlllhhhhlll", id(data), w*2 + 0x8000, 0, 0, h, w, 0, 0, 0, # XXXX? 72<<16, 72<<16, 16, 16, # XXXX 3, 5, 0, 0, 0) print 'Our pixmap, size %d:'%len(rv) dumppixmap(rv) return Qd.RawBitMap(rv) | f4875af09c1c2dc2ad76329560ce4345b0fe4cd9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f4875af09c1c2dc2ad76329560ce4345b0fe4cd9/imgbrowse.py |
currect, QuickDraw.srcCopy, None) | currect, QuickDraw.srcCopy+QuickDraw.ditherCopy, None) | def do_update(self, *args): pass currect = self.fitrect() print 'PICT:', self.pictrect print 'WIND:', currect print 'ARGS:', (self.pixmap, self.wid.GetWindowPort().portBits, self.pictrect, currect, QuickDraw.srcCopy, None) self.info() Qd.CopyBits(self.pixmap, self.wid.GetWindowPort().portBits, self.pictrect, currect, Q... | f4875af09c1c2dc2ad76329560ce4345b0fe4cd9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f4875af09c1c2dc2ad76329560ce4345b0fe4cd9/imgbrowse.py |
self.write("Unsupported characters in input") | self.write("Unsupported characters in input\n") | def runsource(self, source): "Extend base class method: Stuff the source in the line cache first" filename = self.stuffsource(source) self.more = 0 self.save_warnings_filters = warnings.filters[:] warnings.filterwarnings(action="error", category=SyntaxWarning) if isinstance(source, types.UnicodeType): import IOBinding ... | cd3d8bee022cda55c43c2130122d092f5059d115 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cd3d8bee022cda55c43c2130122d092f5059d115/PyShell.py |
s = s.strip() lines = s.split('\n') prefix = self.text.get("insert linestart","insert").rstrip() if prefix and prefix[-1]==':': | prefix = self.text.get("insert linestart", "insert") if prefix.rstrip().endswith(':'): | def recall(self, s, event): self.text.undo_block_start() try: self.text.tag_remove("sel", "1.0", "end") self.text.mark_set("insert", "end-1c") s = s.strip() lines = s.split('\n') prefix = self.text.get("insert linestart","insert").rstrip() if prefix and prefix[-1]==':': self.newline_and_indent_event(event) self.text.in... | cd3d8bee022cda55c43c2130122d092f5059d115 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cd3d8bee022cda55c43c2130122d092f5059d115/PyShell.py |
self.text.insert("insert",lines[0].strip()) | prefix = self.text.get("insert linestart", "insert") self.text.insert("insert", lines[0].strip()) | def recall(self, s, event): self.text.undo_block_start() try: self.text.tag_remove("sel", "1.0", "end") self.text.mark_set("insert", "end-1c") s = s.strip() lines = s.split('\n') prefix = self.text.get("insert linestart","insert").rstrip() if prefix and prefix[-1]==':': self.newline_and_indent_event(event) self.text.in... | cd3d8bee022cda55c43c2130122d092f5059d115 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cd3d8bee022cda55c43c2130122d092f5059d115/PyShell.py |
self.newline_and_indent_event(event) | orig_base_indent = re.search(r'^([ \t]*)', lines[0]).group(0) new_base_indent = re.search(r'^([ \t]*)', prefix).group(0) | def recall(self, s, event): self.text.undo_block_start() try: self.text.tag_remove("sel", "1.0", "end") self.text.mark_set("insert", "end-1c") s = s.strip() lines = s.split('\n') prefix = self.text.get("insert linestart","insert").rstrip() if prefix and prefix[-1]==':': self.newline_and_indent_event(event) self.text.in... | cd3d8bee022cda55c43c2130122d092f5059d115 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cd3d8bee022cda55c43c2130122d092f5059d115/PyShell.py |
self.text.insert("insert", line.strip()) self.newline_and_indent_event(event) | if line.startswith(orig_base_indent): line = new_base_indent + line[len(orig_base_indent):] self.text.insert('insert', '\n'+line.rstrip()) | def recall(self, s, event): self.text.undo_block_start() try: self.text.tag_remove("sel", "1.0", "end") self.text.mark_set("insert", "end-1c") s = s.strip() lines = s.split('\n') prefix = self.text.get("insert linestart","insert").rstrip() if prefix and prefix[-1]==':': self.newline_and_indent_event(event) self.text.in... | cd3d8bee022cda55c43c2130122d092f5059d115 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cd3d8bee022cda55c43c2130122d092f5059d115/PyShell.py |
print "font=%r" % font | def __init__(self, root=None, font=None, name=None, exists=False, **options): if not root: root = Tkinter._default_root if font: # get actual settings corresponding to the given font font = root.tk.splitlist(root.tk.call("font", "actual", font)) else: font = self._set(options) if not name: name = "font" + str(id(self))... | cd4d297a239b3f1eb7f7b9e4d54733a8905a3a67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cd4d297a239b3f1eb7f7b9e4d54733a8905a3a67/tkFont.py | |
while 1: res = mime_code.search(line) | pos = 0 while 1: res = mime_code.search(line, pos) | def mime_decode(line): '''Decode a single line of quoted-printable text to 8bit.''' newline = '' while 1: res = mime_code.search(line) if res is None: break newline = newline + line[:res.start(0)] + \ chr(string.atoi(res.group(1), 16)) line = line[res.end(0):] return newline + line | 613418aa09107c6b751e0a1d7e299fb985b85c91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/613418aa09107c6b751e0a1d7e299fb985b85c91/mimify.py |
newline = newline + line[:res.start(0)] + \ | newline = newline + line[pos:res.start(0)] + \ | def mime_decode(line): '''Decode a single line of quoted-printable text to 8bit.''' newline = '' while 1: res = mime_code.search(line) if res is None: break newline = newline + line[:res.start(0)] + \ chr(string.atoi(res.group(1), 16)) line = line[res.end(0):] return newline + line | 613418aa09107c6b751e0a1d7e299fb985b85c91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/613418aa09107c6b751e0a1d7e299fb985b85c91/mimify.py |
line = line[res.end(0):] return newline + line | pos = res.end(0) return newline + line[pos:] | def mime_decode(line): '''Decode a single line of quoted-printable text to 8bit.''' newline = '' while 1: res = mime_code.search(line) if res is None: break newline = newline + line[:res.start(0)] + \ chr(string.atoi(res.group(1), 16)) line = line[res.end(0):] return newline + line | 613418aa09107c6b751e0a1d7e299fb985b85c91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/613418aa09107c6b751e0a1d7e299fb985b85c91/mimify.py |
while 1: res = mime_head.search(line) | pos = 0 while 1: res = mime_head.search(line, pos) | def mime_decode_header(line): '''Decode a header line to 8bit.''' newline = '' while 1: res = mime_head.search(line) if res is None: break match = res.group(1) # convert underscores to spaces (before =XX conversion!) match = string.join(string.split(match, '_'), ' ') newline = newline + line[:res.start(0)] + mime_decod... | 613418aa09107c6b751e0a1d7e299fb985b85c91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/613418aa09107c6b751e0a1d7e299fb985b85c91/mimify.py |
newline = newline + line[:res.start(0)] + mime_decode(match) line = line[res.end(0):] return newline + line | newline = newline + line[pos:res.start(0)] + mime_decode(match) pos = res.end(0) return newline + line[pos:] | def mime_decode_header(line): '''Decode a header line to 8bit.''' newline = '' while 1: res = mime_head.search(line) if res is None: break match = res.group(1) # convert underscores to spaces (before =XX conversion!) match = string.join(string.split(match, '_'), ' ') newline = newline + line[:res.start(0)] + mime_decod... | 613418aa09107c6b751e0a1d7e299fb985b85c91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/613418aa09107c6b751e0a1d7e299fb985b85c91/mimify.py |
line = line[1:] while 1: res = reg.search(line) | pos = 1 while 1: res = reg.search(line, pos) | 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 = '' if len(line) >= 5 and line[:5] == 'From ': # quote 'From ' at the start of a line for stupid mailers newline = string.upper('=%... | 613418aa09107c6b751e0a1d7e299fb985b85c91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/613418aa09107c6b751e0a1d7e299fb985b85c91/mimify.py |
newline = newline + line[:res.start(0)] + \ string.upper('=%02x' % ord(line[res.group(0)])) line = line[res.end(0):] line = newline + line | newline = newline + line[pos:res.start(0)] + \ string.upper('=%02x' % ord(res.group(0))) pos = res.end(0) line = newline + line[pos:] | 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 = '' if len(line) >= 5 and line[:5] == 'From ': # quote 'From ' at the start of a line for stupid mailers newline = string.upper('=%... | 613418aa09107c6b751e0a1d7e299fb985b85c91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/613418aa09107c6b751e0a1d7e299fb985b85c91/mimify.py |
while 1: res = mime_header.search(line) | pos = 0 while 1: res = mime_header.search(line, pos) | def mime_encode_header(line): '''Code a single header line as quoted-printable.''' newline = '' while 1: res = mime_header.search(line) if res is None: break newline = newline + line[:res.start(0)] + res.group(1) + \ '=?' + CHARSET + '?Q?' + \ mime_encode(res.group(2), 1) + \ '?=' + res.group(3) line = line[res.end(0):... | 613418aa09107c6b751e0a1d7e299fb985b85c91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/613418aa09107c6b751e0a1d7e299fb985b85c91/mimify.py |
newline = newline + line[:res.start(0)] + res.group(1) + \ '=?' + CHARSET + '?Q?' + \ mime_encode(res.group(2), 1) + \ '?=' + res.group(3) line = line[res.end(0):] return newline + line | 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.end(0) return newline + line[pos:] | def mime_encode_header(line): '''Code a single header line as quoted-printable.''' newline = '' while 1: res = mime_header.search(line) if res is None: break newline = newline + line[:res.start(0)] + res.group(1) + \ '=?' + CHARSET + '?Q?' + \ mime_encode(res.group(2), 1) + \ '?=' + res.group(3) line = line[res.end(0):... | 613418aa09107c6b751e0a1d7e299fb985b85c91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/613418aa09107c6b751e0a1d7e299fb985b85c91/mimify.py |
line = chrset_res.group(1) + \ CHARSET + chrset_res.group(3) | line = '%s%s%s' % (chrset_res.group(1), CHARSET, chrset_res.group(3)) | def mimify_part(ifile, ofile, is_mime): '''Convert an 8bit part of a MIME mail message to quoted-printable.''' has_cte = is_qp = is_base64 = 0 multipart = None must_quote_body = must_quote_header = has_iso_chars = 0 header = [] header_end = '' message = [] message_end = '' # read header hfile = HeaderFile(ifile) while... | 613418aa09107c6b751e0a1d7e299fb985b85c91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/613418aa09107c6b751e0a1d7e299fb985b85c91/mimify.py |
line = chrset_res.group(1) + 'us-ascii' + chrset_res.group(3) | line = '%sus-ascii%s' % chrset_res.group(1, 3) | def mimify_part(ifile, ofile, is_mime): '''Convert an 8bit part of a MIME mail message to quoted-printable.''' has_cte = is_qp = is_base64 = 0 multipart = None must_quote_body = must_quote_header = has_iso_chars = 0 header = [] header_end = '' message = [] message_end = '' # read header hfile = HeaderFile(ifile) while... | 613418aa09107c6b751e0a1d7e299fb985b85c91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/613418aa09107c6b751e0a1d7e299fb985b85c91/mimify.py |
return ExpatParser() | return xml.sax.make_parser() | def _getParser(): return ExpatParser() | b798c0109f56dc077bdd7d24fefb7b2c44afe98b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b798c0109f56dc077bdd7d24fefb7b2c44afe98b/pulldom.py |
pass | __dynamic__ = 0 | def dynamics(): if verbose: print "Testing __dynamic__..." verify(object.__dynamic__ == 0) verify(list.__dynamic__ == 0) class S1: __metaclass__ = type verify(S1.__dynamic__ == 0) class S(object): pass verify(S.__dynamic__ == 0) class D(object): __dynamic__ = 1 verify(D.__dynamic__ == 1) class E(D, S): pass verify(E.__... | 751c4c864c5fbdc316d0237243bed1620101e2b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/751c4c864c5fbdc316d0237243bed1620101e2b5/test_descr.py |
pass | __dynamic__ = 0 | def rich_comparisons(): if verbose: print "Testing rich comparisons..." class Z(complex): pass z = Z(1) verify(z == 1+0j) verify(1+0j == z) class ZZ(complex): def __eq__(self, other): try: return abs(self - other) <= 1e-6 except: return NotImplemented zz = ZZ(1.0000003) verify(zz == 1+0j) verify(1+0j == zz) class clas... | 751c4c864c5fbdc316d0237243bed1620101e2b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/751c4c864c5fbdc316d0237243bed1620101e2b5/test_descr.py |
class C(complex): pass | class C(complex): __dynamic__ = 0 | def coercions(): if verbose: print "Testing coercions..." class I(int): pass coerce(I(0), 0) coerce(0, I(0)) class L(long): pass coerce(L(0), 0) coerce(L(0), 0L) coerce(0, L(0)) coerce(0L, L(0)) class F(float): pass coerce(F(0), 0) coerce(F(0), 0L) coerce(F(0), 0.) coerce(0, F(0)) coerce(0L, F(0)) coerce(0., F(0)) clas... | 751c4c864c5fbdc316d0237243bed1620101e2b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/751c4c864c5fbdc316d0237243bed1620101e2b5/test_descr.py |
self.reset() | def feed(self, data, isFinal = 0): if not self._parsing: self._parsing = 1 self.reset() self._cont_handler.startDocument() | 55b4efd034780a069c9bbf5b080a62df32f51441 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/55b4efd034780a069c9bbf5b080a62df32f51441/expatreader.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.