rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
class _dummyTList(TList, TixSubWidget): def __init__(self, master, name, destroy_physically=1): TixSubWidget.__init__(self, master, name, destroy_physically) class _dummyComboBox(ComboBox, TixSubWidget): def __init__(self, master, name, destroy_physically=1): TixSubWidget.__init__(self, master, name, destroy_physicall... | class _dummyScrolledHList(ScrolledHList, TixSubWidget): | def __init__(self, master, name, destroy_physically=1): TixSubWidget.__init__(self, master, name, destroy_physically) | 01c920b9b56baabd2e1dd945affd1c17c1669b20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/01c920b9b56baabd2e1dd945affd1c17c1669b20/Tix.py |
if self.libraries is None: self.libraries = [] if self.library_dirs is None: self.library_dirs = [] if self.rpath is None: self.rpath = [] if os.name == 'nt': self.library_dirs.append (os.path.join(sys.exec_prefix, 'libs')) if self.debug: self.build_temp = os.path.join (self.build_temp, "Debug") else: self.build_... | def finalize_options (self): from distutils import sysconfig | 613ee0cbb53f9b47f0fe5f660e8d2598aba63161 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/613ee0cbb53f9b47f0fe5f660e8d2598aba63161/build_ext.py | |
if self.libraries is None: self.libraries = [] if self.library_dirs is None: self.library_dirs = [] if self.rpath is None: self.rpath = [] | def run (self): | 613ee0cbb53f9b47f0fe5f660e8d2598aba63161 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/613ee0cbb53f9b47f0fe5f660e8d2598aba63161/build_ext.py | |
import string | def __init__(self, dirname): import string self.dirname = dirname | 5f6f521341bd317ab4b2b85b7768aad2184c3f88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5f6f521341bd317ab4b2b85b7768aad2184c3f88/mailbox.py | |
import string | def _test(): import time import sys import string import os args = sys.argv[1:] if not args: for key in 'MAILDIR', 'MAIL', 'LOGNAME', 'USER': if os.environ.has_key(key): mbox = os.environ[key] break else: print "$MAIL, $LOGNAME nor $USER set -- who are you?" return else: mbox = args[0] if mbox[:1] == '+': mbox = os.en... | 5f6f521341bd317ab4b2b85b7768aad2184c3f88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5f6f521341bd317ab4b2b85b7768aad2184c3f88/mailbox.py | |
num = string.atoi(args[1]) | num = int(args[1]) | def _test(): import time import sys import string import os args = sys.argv[1:] if not args: for key in 'MAILDIR', 'MAIL', 'LOGNAME', 'USER': if os.environ.has_key(key): mbox = os.environ[key] break else: print "$MAIL, $LOGNAME nor $USER set -- who are you?" return else: mbox = args[0] if mbox[:1] == '+': mbox = os.en... | 5f6f521341bd317ab4b2b85b7768aad2184c3f88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5f6f521341bd317ab4b2b85b7768aad2184c3f88/mailbox.py |
self.literal = message | self.literal = MapCRLF.sub(CRLF, message) | def append(self, mailbox, flags, date_time, message): """Append message to named mailbox. | 5fb36d5099c0651fea528429cf6772197fddba1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5fb36d5099c0651fea528429cf6772197fddba1b/imaplib.py |
test_mesg = 'From: %(user)s@localhost%(lf)sSubject: IMAP4 test%(lf)s%(lf)sdata...%(lf)s' % {'user':USER, 'lf':CRLF} | test_mesg = 'From: %(user)s@localhost%(lf)sSubject: IMAP4 test%(lf)s%(lf)sdata...%(lf)s' % {'user':USER, 'lf':'\n'} | def Time2Internaldate(date_time): """Convert 'date_time' to IMAP4 INTERNALDATE representation. Return string in form: '"DD-Mmm-YYYY HH:MM:SS +HHMM"' """ if isinstance(date_time, (int, float)): tt = time.localtime(date_time) elif isinstance(date_time, (tuple, time.struct_time)): tt = date_time elif isinstance(date_ti... | 5fb36d5099c0651fea528429cf6772197fddba1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5fb36d5099c0651fea528429cf6772197fddba1b/imaplib.py |
class IEEEOperationsTestCase(unittest.TestCase): if float.__getformat__("double").startswith("IEEE"): def test_double_infinity(self): big = 4.8e159 pro = big*big self.assertEquals(repr(pro), 'inf') sqr = big**2 self.assertEquals(repr(sqr), 'inf') | def test_float_specials_do_unpack(self): for fmt, data in [('>f', BE_FLOAT_INF), ('>f', BE_FLOAT_NAN), ('<f', LE_FLOAT_INF), ('<f', LE_FLOAT_NAN)]: struct.unpack(fmt, data) | eee3c397e118f98bfb8f1452925d5b6704545acb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/eee3c397e118f98bfb8f1452925d5b6704545acb/test_float.py | |
IEEEFormatTestCase, IEEEOperationsTestCase, ) | IEEEFormatTestCase) | def test_main(): test_support.run_unittest( FormatFunctionsTestCase, UnknownFormatTestCase, IEEEFormatTestCase, IEEEOperationsTestCase, ) | eee3c397e118f98bfb8f1452925d5b6704545acb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/eee3c397e118f98bfb8f1452925d5b6704545acb/test_float.py |
index = terminator.find (self.ac_in_buffer) | index = ac_in_buffer.find (self.terminator) | def handle_read (self): | 5896ceafb4da22d527a951522b7bd34cec8f394e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5896ceafb4da22d527a951522b7bd34cec8f394e/asynchat.py |
capability_name = _capability_names[ch] | capability_name = _capability_names.get(ch) if capability_name is None: return 0 | def has_key(ch): if type(ch) == type( '' ): ch = ord(ch) # Figure out the correct capability name for the keycode. capability_name = _capability_names[ch] #Check the current terminal description for that capability; #if present, return true, else return false. if _curses.tigetstr( capability_name ): return 1 else: re... | 38d31af3d9d9ba70c0b7dc3cc0c971b0c91607d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/38d31af3d9d9ba70c0b7dc3cc0c971b0c91607d9/has_key.py |
if lastcs is not None: if nextcs is None or nextcs == 'us-ascii': | if lastcs not in (None, 'us-ascii'): if nextcs in (None, 'us-ascii'): | def __unicode__(self): """Helper for the built-in unicode function.""" uchunks = [] lastcs = None for s, charset in self._chunks: # We must preserve spaces between encoded and non-encoded word # boundaries, which means for us we need to add a space when we go # from a charset to None/us-ascii, or from None/us-ascii to ... | 0446f0e6ca0a718d3c9dcdd030f56e2ec62e76d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0446f0e6ca0a718d3c9dcdd030f56e2ec62e76d6/Header.py |
elif nextcs is not None and nextcs <> 'us-ascii': | elif nextcs not in (None, 'us-ascii'): | def __unicode__(self): """Helper for the built-in unicode function.""" uchunks = [] lastcs = None for s, charset in self._chunks: # We must preserve spaces between encoded and non-encoded word # boundaries, which means for us we need to add a space when we go # from a charset to None/us-ascii, or from None/us-ascii to ... | 0446f0e6ca0a718d3c9dcdd030f56e2ec62e76d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0446f0e6ca0a718d3c9dcdd030f56e2ec62e76d6/Header.py |
(sys.platform.startswith('linux') and | ((sys.platform.startswith('linux') or sys.platform.startswith('gnu')) and | def finalize_options (self): from distutils import sysconfig | 04271f7ca14c177a447fe54bed086ddfab8a5bba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/04271f7ca14c177a447fe54bed086ddfab8a5bba/build_ext.py |
readermode=None): | readermode=None, usenetrc=True): | def __init__(self, host, port=NNTP_PORT, user=None, password=None, readermode=None): """Initialize an instance. Arguments: - host: hostname to connect to - port: port to connect to (default the standard NNTP port) - user: username to authenticate with - password: password to use with username - readermode: if true, se... | 0003656ff3bd932c7907f9ef42bc3f57a0daa5f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0003656ff3bd932c7907f9ef42bc3f57a0daa5f6/nntplib.py |
if not user: | if usenetrc and not user: | def __init__(self, host, port=NNTP_PORT, user=None, password=None, readermode=None): """Initialize an instance. Arguments: - host: hostname to connect to - port: port to connect to (default the standard NNTP port) - user: username to authenticate with - password: password to use with username - readermode: if true, se... | 0003656ff3bd932c7907f9ef42bc3f57a0daa5f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0003656ff3bd932c7907f9ef42bc3f57a0daa5f6/nntplib.py |
all, scheme, rfc, selfdot, name = match.groups() | all, scheme, rfc, pep, selfdot, name = match.groups() | def markup(self, text, escape=None, funcs={}, classes={}, methods={}): """Mark up some plain text, given a context of symbols to look for. Each context dictionary maps object names to anchor names.""" escape = escape or self.escape results = [] here = 0 pattern = re.compile(r'\b((http|ftp)://\S+[\w/]|' r'RFC[- ]?(\d+)|... | ba2fd5afdf80ef597de19078ea045e40b2b1540c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ba2fd5afdf80ef597de19078ea045e40b2b1540c/pydoc.py |
url = 'http://www.rfc-editor.org/rfc/rfc%s.txt' % rfc | url = 'http://www.rfc-editor.org/rfc/rfc%d.txt' % int(rfc) results.append('<a href="%s">%s</a>' % (url, escape(all))) elif pep: url = 'http://www.python.org/peps/pep-%04d.html' % int(pep) | def markup(self, text, escape=None, funcs={}, classes={}, methods={}): """Mark up some plain text, given a context of symbols to look for. Each context dictionary maps object names to anchor names.""" escape = escape or self.escape results = [] here = 0 pattern = re.compile(r'\b((http|ftp)://\S+[\w/]|' r'RFC[- ]?(\d+)|... | ba2fd5afdf80ef597de19078ea045e40b2b1540c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ba2fd5afdf80ef597de19078ea045e40b2b1540c/pydoc.py |
if cache.has_key(path) and cache[path] != info: module = reload(module) | if cache.get(path) == info: continue module = reload(module) | def freshimport(name, cache={}): """Import a module, reloading it if the source file has changed.""" topmodule = __import__(name) module = None for component in split(name, '.'): if module == None: module = topmodule path = split(name, '.')[0] else: module = getattr(module, component) path = path + '.' + component if h... | ba2fd5afdf80ef597de19078ea045e40b2b1540c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ba2fd5afdf80ef597de19078ea045e40b2b1540c/pydoc.py |
return '''To get help on a Python object, call help(object). | return '''Welcome to Python %s! To get help on a Python object, call help(object). | def __repr__(self): return '''To get help on a Python object, call help(object). | ba2fd5afdf80ef597de19078ea045e40b2b1540c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ba2fd5afdf80ef597de19078ea045e40b2b1540c/pydoc.py |
help(module) or call help('modulename').''' | help(module) or call help('modulename').''' % sys.version[:3] | def __repr__(self): return '''To get help on a Python object, call help(object). | ba2fd5afdf80ef597de19078ea045e40b2b1540c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ba2fd5afdf80ef597de19078ea045e40b2b1540c/pydoc.py |
(typ, [data]) = <instance>.create(mailbox, who, what) | (typ, [data]) = <instance>.setacl(mailbox, who, what) | def setacl(self, mailbox, who, what): """Set a mailbox acl. | 4485a06eb825c14dfa6d3caa6cf8aabbc99f1871 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4485a06eb825c14dfa6d3caa6cf8aabbc99f1871/imaplib.py |
def simple_err(func, *args): try: apply(func, args) except struct.error: pass else: raise TestFailed, "%s%s did not raise struct.error" % ( func.__name__, args) | 5b6255b59a4bfcd752059032bfb062689c9fef74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5b6255b59a4bfcd752059032bfb062689c9fef74/test_struct.py | ||
simple_err(struct.pack, "Q", -1) | any_err(struct.pack, "Q", -1) | def simple_err(func, *args): try: apply(func, args) except struct.error: pass else: raise TestFailed, "%s%s did not raise struct.error" % ( func.__name__, args) | 5b6255b59a4bfcd752059032bfb062689c9fef74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5b6255b59a4bfcd752059032bfb062689c9fef74/test_struct.py |
chars = list(value) chars.reverse() return "".join(chars) if has_native_qQ: | else: return string_reverse(value) def test_native_qQ(): | def bigendian_to_native(value): if isbigendian: return value chars = list(value) chars.reverse() return "".join(chars) | 5b6255b59a4bfcd752059032bfb062689c9fef74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5b6255b59a4bfcd752059032bfb062689c9fef74/test_struct.py |
print "before _get_package_data():" print "vendor =", self.vendor print "packager =", self.packager print "doc_files =", self.doc_files print "changelog =", self.changelog | if DEBUG: print "before _get_package_data():" print "vendor =", self.vendor print "packager =", self.packager print "doc_files =", self.doc_files print "changelog =", self.changelog | def run (self): | 69f4db58861f9c743d4c660bf36d1aabbbd04e92 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/69f4db58861f9c743d4c660bf36d1aabbbd04e92/bdist_rpm.py |
if line == '\037\014\n': | if line == '\037\014\n' or line == '\037': | def _search_end(self): while 1: pos = self.fp.tell() line = self.fp.readline() if not line: return if line == '\037\014\n': self.fp.seek(pos) return | bd0283e722f90d46cc94e0c161c8f31c35662144 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bd0283e722f90d46cc94e0c161c8f31c35662144/mailbox.py |
args = ('wm', 'colormapwindows', self._w) + _flatten(wlist) | if len(wlist) > 1: wlist = (wlist,) args = ('wm', 'colormapwindows', self._w) + wlist | def wm_colormapwindows(self, *wlist): args = ('wm', 'colormapwindows', self._w) + _flatten(wlist) return map(self._nametowidget, self.tk.call(args)) | 9476b1d025af871bcbb72ac9be1f5936048635a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9476b1d025af871bcbb72ac9be1f5936048635a3/Tkinter.py |
env['CONTENT_TYPE'] = self.headers.type | if self.headers.typeheader is None: env['CONTENT_TYPE'] = self.headers.type else: env['CONTENT_TYPE'] = self.headers.typeheader | def run_cgi(self): """Execute a CGI script.""" dir, rest = self.cgi_info i = string.rfind(rest, '?') if i >= 0: rest, query = rest[:i], rest[i+1:] else: query = '' i = string.find(rest, '/') if i >= 0: script, rest = rest[:i], rest[i:] else: script, rest = rest, '' scriptname = dir + '/' + script scriptfile = self.tran... | fb7480f7feb8b178ec1ff09a3daee6dee7aa6743 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fb7480f7feb8b178ec1ff09a3daee6dee7aa6743/CGIHTTPServer.py |
if self.debuglevel > 0: print 'connect:', (host, port) | if self.debuglevel > 0: print>>stderr, 'connect:', (host, port) | def connect(self, host='localhost', port = 0): """Connect to a host on a given port. | d64dd827e176b1be0829a81337da6773cce23b05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d64dd827e176b1be0829a81337da6773cce23b05/smtplib.py |
if self.debuglevel > 0: print 'connect:', (host, port) | if self.debuglevel > 0: print>>stderr, 'connect:', (host, port) | def connect(self, host='localhost', port = 0): """Connect to a host on a given port. | d64dd827e176b1be0829a81337da6773cce23b05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d64dd827e176b1be0829a81337da6773cce23b05/smtplib.py |
if self.debuglevel > 0: print 'connect fail:', (host, port) | if self.debuglevel > 0: print>>stderr, 'connect fail:', (host, port) | def connect(self, host='localhost', port = 0): """Connect to a host on a given port. | d64dd827e176b1be0829a81337da6773cce23b05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d64dd827e176b1be0829a81337da6773cce23b05/smtplib.py |
if self.debuglevel > 0: print "connect:", msg | if self.debuglevel > 0: print>>stderr, "connect:", msg | def connect(self, host='localhost', port = 0): """Connect to a host on a given port. | d64dd827e176b1be0829a81337da6773cce23b05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d64dd827e176b1be0829a81337da6773cce23b05/smtplib.py |
if self.debuglevel > 0: print 'send:', repr(str) | if self.debuglevel > 0: print>>stderr, 'send:', repr(str) | def send(self, str): """Send `str' to the server.""" if self.debuglevel > 0: print 'send:', repr(str) if self.sock: try: self.sock.sendall(str) except socket.error: self.close() raise SMTPServerDisconnected('Server not connected') else: raise SMTPServerDisconnected('please run connect() first') | d64dd827e176b1be0829a81337da6773cce23b05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d64dd827e176b1be0829a81337da6773cce23b05/smtplib.py |
if self.debuglevel > 0: print 'reply:', repr(line) | if self.debuglevel > 0: print>>stderr, 'reply:', repr(line) | def getreply(self): """Get a reply from the server. | d64dd827e176b1be0829a81337da6773cce23b05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d64dd827e176b1be0829a81337da6773cce23b05/smtplib.py |
print 'reply: retcode (%s); Msg: %s' % (errcode,errmsg) | print>>stderr, 'reply: retcode (%s); Msg: %s' % (errcode,errmsg) | def getreply(self): """Get a reply from the server. | d64dd827e176b1be0829a81337da6773cce23b05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d64dd827e176b1be0829a81337da6773cce23b05/smtplib.py |
if self.debuglevel >0 : print "data:", (code,repl) | if self.debuglevel >0 : print>>stderr, "data:", (code,repl) | def data(self,msg): """SMTP 'DATA' command -- sends message data to server. | d64dd827e176b1be0829a81337da6773cce23b05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d64dd827e176b1be0829a81337da6773cce23b05/smtplib.py |
if self.debuglevel >0 : print "data:", (code,msg) | if self.debuglevel >0 : print>>stderr, "data:", (code,msg) | def data(self,msg): """SMTP 'DATA' command -- sends message data to server. | d64dd827e176b1be0829a81337da6773cce23b05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d64dd827e176b1be0829a81337da6773cce23b05/smtplib.py |
... def f(): | ... def _f(): | ... def f(): | d15cfea8aa793029f37d6148bdc30a0be8b9a87f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d15cfea8aa793029f37d6148bdc30a0be8b9a87f/doctest.py |
>>> d = {"_f": m1.f, "g": m1.g, "h": m1.H, ... "f2": m2.f, "g2": m2.g, "h2": m2.H} | ... def bar(self): | d15cfea8aa793029f37d6148bdc30a0be8b9a87f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d15cfea8aa793029f37d6148bdc30a0be8b9a87f/doctest.py | |
>>> t.rundict(d, "rundict_test", m1) | >>> t.rundict(m1.__dict__, "rundict_test", m1) | ... def bar(self): | d15cfea8aa793029f37d6148bdc30a0be8b9a87f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d15cfea8aa793029f37d6148bdc30a0be8b9a87f/doctest.py |
>>> t.rundict(d, "rundict_test_pvt", m1) | >>> t.rundict(m1.__dict__, "rundict_test_pvt", m1) | ... def bar(self): | d15cfea8aa793029f37d6148bdc30a0be8b9a87f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d15cfea8aa793029f37d6148bdc30a0be8b9a87f/doctest.py |
>>> t.rundict(d, "rundict_test_pvt") | >>> t.rundict(m1.__dict__, "rundict_test_pvt") | ... def bar(self): | d15cfea8aa793029f37d6148bdc30a0be8b9a87f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d15cfea8aa793029f37d6148bdc30a0be8b9a87f/doctest.py |
f, t = tester.rundict(m.__dict__, name) | f, t = tester.rundict(m.__dict__, name, m) | def testmod(m, name=None, globs=None, verbose=None, isprivate=None, report=1): """m, name=None, globs=None, verbose=None, isprivate=None, report=1 Test examples in docstrings in functions and classes reachable from module m, starting with m.__doc__. Private names are skipped. Also test examples reachable from dict m... | d15cfea8aa793029f37d6148bdc30a0be8b9a87f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d15cfea8aa793029f37d6148bdc30a0be8b9a87f/doctest.py |
[("MyInBuffer", 'inDataPtr', "InMode")]) | [("MyInBuffer", 'inDataPtr', "InMode")]), ([("Boolean", 'ioWasInRgn', "OutMode")], [("Boolean", 'ioWasInRgn', "InOutMode")]), | def makerepairinstructions(self): return [ ([("UInt32", 'inSize', "InMode"), ("void_ptr", 'inDataPtr', "InMode")], [("MyInBuffer", 'inDataPtr', "InMode")]) ] | d0852a006811d8fa9ee5e9e2578c831d0ff162ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d0852a006811d8fa9ee5e9e2578c831d0ff162ec/CarbonEvtscan.py |
def makerepairinstructions(self): return [ ([("UInt32", 'inSize', "InMode"), ("void_ptr", 'inDataPtr', "InMode")], [("MyInBuffer", 'inDataPtr', "InMode")]) ] | d0852a006811d8fa9ee5e9e2578c831d0ff162ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d0852a006811d8fa9ee5e9e2578c831d0ff162ec/CarbonEvtscan.py | ||
print ("bdist.run: format=%s, command=%s, rest=%s" % (self.formats[i], cmd_name, commands[i+1:])) | def run (self): | 2740696ab7c1960812446dedea6d9dc7624392c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2740696ab7c1960812446dedea6d9dc7624392c7/bdist.py | |
os.fsync(f.fileno()) | if hasattr(os, 'fsync'): os.fsync(f.fileno()) | def _sync_flush(f): """Ensure changes to file f are physically on disk.""" f.flush() os.fsync(f.fileno()) | b5d92b15a43f6d1483739a0104fd8c710109f52a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b5d92b15a43f6d1483739a0104fd8c710109f52a/mailbox.py |
self.dict[headerseen] = string.strip(line[len(headerseen)+2:]) | self.dict[headerseen] = string.strip(line[len(headerseen)+1:]) | def readheaders(self): """Read header lines. Read header lines up to the entirely blank line that terminates them. The (normally blank) line that ends the headers is skipped, but not included in the returned list. If a non-header line ends the headers, (which is an error), an attempt is made to backspace over it; it ... | 5e00d6edb7a676fcabc7be546c42db726ef65394 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5e00d6edb7a676fcabc7be546c42db726ef65394/rfc822.py |
"""Signals the start of an element. | """Signals the start of an element in non-namespace mode. The name parameter contains the raw XML 1.0 name of the element type as a string and the attrs parameter holds an instance of the Attributes class containing the attributes of the element.""" def endElement(self, name): """Signals the end of an element in non-... | def startElement(self, name, attrs): """Signals the start of an element. | a3f4f1405a3beed95e2c40f72015af9060b19a99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a3f4f1405a3beed95e2c40f72015af9060b19a99/handler.py |
(uri ,localname) tuple, the qname parameter the raw XML 1.0 | (uri, localname) tuple, the qname parameter the raw XML 1.0 | def startElement(self, name, attrs): """Signals the start of an element. | a3f4f1405a3beed95e2c40f72015af9060b19a99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a3f4f1405a3beed95e2c40f72015af9060b19a99/handler.py |
def endElement(self, name ): """Signals the end of an element. | def endElementNS(self, name, qname): """Signals the end of an element in namespace mode. | def endElement(self, name ): """Signals the end of an element. | a3f4f1405a3beed95e2c40f72015af9060b19a99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a3f4f1405a3beed95e2c40f72015af9060b19a99/handler.py |
as with the startElement event.""" | as with the startElementNS event.""" | def endElement(self, name ): """Signals the end of an element. | a3f4f1405a3beed95e2c40f72015af9060b19a99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a3f4f1405a3beed95e2c40f72015af9060b19a99/handler.py |
{'code': code, 'message': message, 'explain': explain}) | {'code': code, 'message': _quote_html(message), 'explain': explain}) | def send_error(self, code, message=None): """Send and log an error reply. | b00b43e485d7e14b48a86b49744c71c830ef0050 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b00b43e485d7e14b48a86b49744c71c830ef0050/BaseHTTPServer.py |
def test_original_excepthook(self): savestderr = sys.stderr err = cStringIO.StringIO() sys.stderr = err | ac0e186e4d9b3845f6f0da1175af8b79461c7ced /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ac0e186e4d9b3845f6f0da1175af8b79461c7ced/test_sys.py | ||
child.id = None | child.my_id = None | def my_ringer(child): child.id = None stdwin.fleep() | 43cd7e837d69dc6ba28321625ed28e476a5f4a76 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/43cd7e837d69dc6ba28321625ed28e476a5f4a76/TestSched.py |
WindowSched.enter(child.my_number*1000, 0, my_ringer, child) | WindowSched.enter(child.my_number*1000, 0, my_ringer, (child,)) | def my_hook(child): # schedule for the bell to ring in N seconds; cancel previous if child.my_id: WindowSched.cancel(child.my_id) child.my_id = \ WindowSched.enter(child.my_number*1000, 0, my_ringer, child) | 43cd7e837d69dc6ba28321625ed28e476a5f4a76 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/43cd7e837d69dc6ba28321625ed28e476a5f4a76/TestSched.py |
spec_file.append('Source0: %{name}-%{version}.tar.bz2') | spec_file.append('Source0: %{name}-%{unmangled_version}.tar.bz2') | 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... | fb2640c3146d1cd7c3be1c238799e0f49a2764b3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fb2640c3146d1cd7c3be1c238799e0f49a2764b3/bdist_rpm.py |
spec_file.append('Source0: %{name}-%{version}.tar.gz') | spec_file.append('Source0: %{name}-%{unmangled_version}.tar.gz') | 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... | fb2640c3146d1cd7c3be1c238799e0f49a2764b3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fb2640c3146d1cd7c3be1c238799e0f49a2764b3/bdist_rpm.py |
('prep', 'prep_script', "%setup"), | ('prep', 'prep_script', "%setup -n %{name}-%{unmangled_version}"), | 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... | fb2640c3146d1cd7c3be1c238799e0f49a2764b3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fb2640c3146d1cd7c3be1c238799e0f49a2764b3/bdist_rpm.py |
self._parseheaders(root, fp) | firstbodyline = self._parseheaders(root, fp) | def parse(self, fp, headersonly=False): """Create a message structure from the data in a file. | fd75ad1c4ab511c4bd028c66a273ed9117440b57 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fd75ad1c4ab511c4bd028c66a273ed9117440b57/Parser.py |
self._parsebody(root, fp) | self._parsebody(root, fp, firstbodyline) | def parse(self, fp, headersonly=False): """Create a message structure from the data in a file. | fd75ad1c4ab511c4bd028c66a273ed9117440b57 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fd75ad1c4ab511c4bd028c66a273ed9117440b57/Parser.py |
"Not a header, not a continuation: ``%s''"%line) | "Not a header, not a continuation: ``%s''" % line) | def _parseheaders(self, container, fp): # Parse the headers, returning a list of header/value pairs. None as # the header means the Unix-From header. lastheader = '' lastvalue = [] lineno = 0 while True: # Don't strip the line before we test for the end condition, # because whitespace-only header lines are RFC complia... | fd75ad1c4ab511c4bd028c66a273ed9117440b57 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fd75ad1c4ab511c4bd028c66a273ed9117440b57/Parser.py |
raise Errors.HeaderParseError( "Not a header, not a continuation: ``%s''"%line) | firstbodyline = line break | def _parseheaders(self, container, fp): # Parse the headers, returning a list of header/value pairs. None as # the header means the Unix-From header. lastheader = '' lastvalue = [] lineno = 0 while True: # Don't strip the line before we test for the end condition, # because whitespace-only header lines are RFC complia... | fd75ad1c4ab511c4bd028c66a273ed9117440b57 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fd75ad1c4ab511c4bd028c66a273ed9117440b57/Parser.py |
def _parsebody(self, container, fp): | return firstbodyline def _parsebody(self, container, fp, firstbodyline=None): | def _parseheaders(self, container, fp): # Parse the headers, returning a list of header/value pairs. None as # the header means the Unix-From header. lastheader = '' lastvalue = [] lineno = 0 while True: # Don't strip the line before we test for the end condition, # because whitespace-only header lines are RFC complia... | fd75ad1c4ab511c4bd028c66a273ed9117440b57 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fd75ad1c4ab511c4bd028c66a273ed9117440b57/Parser.py |
container.set_payload(fp.read()) | text = fp.read() if firstbodyline is not None: text = firstbodyline + '\n' + text container.set_payload(text) | def _parsebody(self, container, fp): # Parse the body, but first split the payload on the content-type # boundary if present. boundary = container.get_boundary() isdigest = (container.get_content_type() == 'multipart/digest') # If there's a boundary, split the payload text into its constituent # parts and parse each se... | fd75ad1c4ab511c4bd028c66a273ed9117440b57 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fd75ad1c4ab511c4bd028c66a273ed9117440b57/Parser.py |
def __init__(self, root, flist, stack=None): self.top = top = ListedToplevel(root) top.protocol("WM_DELETE_WINDOW", self.close) top.bind("<Key-Escape>", self.close) top.wm_title("Stack viewer") top.wm_iconname("Stack") self.helplabel = Label(top, text="Click once to view variables; twice for source", borderwidth=2, re... | def __init__(self, flist=None): self.flist = flist self.stack = get_stack() self.text = get_exception() | def __init__(self, root, flist, stack=None): self.top = top = ListedToplevel(root) top.protocol("WM_DELETE_WINDOW", self.close) top.bind("<Key-Escape>", self.close) top.wm_title("Stack viewer") top.wm_iconname("Stack") # Create help label self.helplabel = Label(top, text="Click once to view variables; twice for source"... | db595cd40700f5e452c6e43b4a4422365567aba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/db595cd40700f5e452c6e43b4a4422365567aba7/StackViewer.py |
def close(self, event=None): self.top.destroy() | def GetText(self): return self.text | def close(self, event=None): self.top.destroy() | db595cd40700f5e452c6e43b4a4422365567aba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/db595cd40700f5e452c6e43b4a4422365567aba7/StackViewer.py |
localsframe = None localsviewer = None localsdict = None globalsframe = None globalsviewer = None globalsdict = None curframe = None | def GetSubList(self): sublist = [] for info in self.stack: item = FrameTreeItem(info, self.flist) sublist.append(item) return sublist | def close(self, event=None): self.top.destroy() | db595cd40700f5e452c6e43b4a4422365567aba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/db595cd40700f5e452c6e43b4a4422365567aba7/StackViewer.py |
def show_frame(self, (frame, lineno)): if frame is self.curframe: return self.curframe = None if frame.f_globals is not self.globalsdict: self.show_globals(frame) self.show_locals(frame) self.curframe = frame | class FrameTreeItem(TreeItem): | def show_frame(self, (frame, lineno)): if frame is self.curframe: return self.curframe = None if frame.f_globals is not self.globalsdict: self.show_globals(frame) self.show_locals(frame) self.curframe = frame | db595cd40700f5e452c6e43b4a4422365567aba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/db595cd40700f5e452c6e43b4a4422365567aba7/StackViewer.py |
def show_globals(self, frame): title = "Global Variables" if frame.f_globals.has_key("__name__"): try: name = str(frame.f_globals["__name__"]) + "" except: name = "" if name: title = title + " in module " + name self.globalsdict = None if self.globalsviewer: self.globalsviewer.close() self.globalsviewer = None if not s... | def __init__(self, info, flist): self.info = info self.flist = flist | def show_globals(self, frame): title = "Global Variables" if frame.f_globals.has_key("__name__"): try: name = str(frame.f_globals["__name__"]) + "" except: name = "" if name: title = title + " in module " + name self.globalsdict = None if self.globalsviewer: self.globalsviewer.close() self.globalsviewer = None if not s... | db595cd40700f5e452c6e43b4a4422365567aba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/db595cd40700f5e452c6e43b4a4422365567aba7/StackViewer.py |
def show_locals(self, frame): self.localsdict = None if self.localsviewer: self.localsviewer.close() self.localsviewer = None if frame.f_locals is not frame.f_globals: title = "Local Variables" code = frame.f_code funcname = code.co_name if funcname not in ("?", "", None): title = title + " in " + funcname if not self.... | def GetText(self): frame, lineno = self.info try: modname = frame.f_globals["__name__"] except: modname = "?" | def show_locals(self, frame): self.localsdict = None if self.localsviewer: self.localsviewer.close() self.localsviewer = None if frame.f_locals is not frame.f_globals: title = "Local Variables" code = frame.f_code funcname = code.co_name if funcname not in ("?", "", None): title = title + " in " + funcname if not self.... | db595cd40700f5e452c6e43b4a4422365567aba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/db595cd40700f5e452c6e43b4a4422365567aba7/StackViewer.py |
if os.path.isfile(filename): | funcname = code.co_name sourceline = linecache.getline(filename, lineno) sourceline = string.strip(sourceline) if funcname in ("?", "", None): item = "%s, line %d: %s" % (modname, lineno, sourceline) else: item = "%s.%s(...), line %d: %s" % (modname, funcname, lineno, sourceline) return item def GetSubList(self): fr... | def show_source(self, index): if not (0 <= index < len(self.stack)): return frame, lineno = self.stack[index] code = frame.f_code filename = code.co_filename if os.path.isfile(filename): edit = self.flist.open(filename) if edit: edit.gotoline(lineno) | db595cd40700f5e452c6e43b4a4422365567aba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/db595cd40700f5e452c6e43b4a4422365567aba7/StackViewer.py |
if edit: edit.gotoline(lineno) | edit.gotoline(lineno) | def show_source(self, index): if not (0 <= index < len(self.stack)): return frame, lineno = self.stack[index] code = frame.f_code filename = code.co_filename if os.path.isfile(filename): edit = self.flist.open(filename) if edit: edit.gotoline(lineno) | db595cd40700f5e452c6e43b4a4422365567aba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/db595cd40700f5e452c6e43b4a4422365567aba7/StackViewer.py |
def getexception(type=None, value=None): | def get_exception(type=None, value=None): | def get_stack(t=None, f=None): if t is None: t = sys.last_traceback stack = [] if t and t.tb_frame is f: t = t.tb_next while f is not None: stack.append((f, f.f_lineno)) if f is self.botframe: break f = f.f_back stack.reverse() while t is not None: stack.append((t.tb_frame, t.tb_lineno)) t = t.tb_next return stack | db595cd40700f5e452c6e43b4a4422365567aba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/db595cd40700f5e452c6e43b4a4422365567aba7/StackViewer.py |
class NamespaceViewer: def __init__(self, master, title, dict=None): width = 0 height = 40 if dict: height = 20*len(dict) self.master = master self.title = title self.repr = Repr() self.repr.maxstring = 60 self.repr.maxother = 60 self.frame = frame = Frame(master) self.frame.pack(expand=1, fill="both") self.label = L... | if __name__ == "__main__": root = Tk() root.withdraw() StackBrowser(root) | def getexception(type=None, value=None): if type is None: type = sys.last_type value = sys.last_value if hasattr(type, "__name__"): type = type.__name__ s = str(type) if value is not None: s = s + ": " + str(value) return s | db595cd40700f5e452c6e43b4a4422365567aba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/db595cd40700f5e452c6e43b4a4422365567aba7/StackViewer.py |
def send(self, str): """Send `str' to the server.""" if self.sock is None: if self.auto_open: self.connect() else: raise NotConnected() | 6658482bffe50ac7095d8d666e818dbe14e505ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6658482bffe50ac7095d8d666e818dbe14e505ee/httplib.py | ||
Aassumes that the line does *not* end with \r\n. | Assumes that the line does *not* end with \\r\\n. | def _output(self, s): """Add a line of output to the current request buffer. Aassumes that the line does *not* end with \r\n. """ self._buffer.append(s) | 6658482bffe50ac7095d8d666e818dbe14e505ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6658482bffe50ac7095d8d666e818dbe14e505ee/httplib.py |
Appends an extra \r\n to the buffer. | Appends an extra \\r\\n to the buffer. | def _send_output(self): """Send the currently buffered request and clear the buffer. | 6658482bffe50ac7095d8d666e818dbe14e505ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6658482bffe50ac7095d8d666e818dbe14e505ee/httplib.py |
self.compiler = new_compiler (verbose=self.verbose, | self.compiler = new_compiler (compiler=self.compiler, verbose=self.verbose, | def run (self): | 16df38f7872bc820a5352c2770dba2c80128c82f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/16df38f7872bc820a5352c2770dba2c80128c82f/build_ext.py |
while 1: | while formlength > 0: | def initfp(self, file): self._file = file self._version = 0 self._decomp = None self._markers = [] self._soundpos = 0 form = self._file.read(4) if form != 'FORM': raise Error, 'file does not start with FORM id' formlength = _read_long(self._file) if formlength <= 0: raise Error, 'invalid FORM chunk data size' formdata ... | 0485f1945fdf9b50deeb5fdd34ce2554f8c00a6a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0485f1945fdf9b50deeb5fdd34ce2554f8c00a6a/aifc.py |
try: chunk = Chunk().init(self._file) except EOFError: raise Error, 'COMM chunk and/or SSND chunk missing' | chunk = Chunk().init(self._file) | def initfp(self, file): self._file = file self._version = 0 self._decomp = None self._markers = [] self._soundpos = 0 form = self._file.read(4) if form != 'FORM': raise Error, 'file does not start with FORM id' formlength = _read_long(self._file) if formlength <= 0: raise Error, 'invalid FORM chunk data size' formdata ... | 0485f1945fdf9b50deeb5fdd34ce2554f8c00a6a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0485f1945fdf9b50deeb5fdd34ce2554f8c00a6a/aifc.py |
if formlength <= 0: if not self._comm_chunk_read: raise Error, 'COMM chunk missing' break | def initfp(self, file): self._file = file self._version = 0 self._decomp = None self._markers = [] self._soundpos = 0 form = self._file.read(4) if form != 'FORM': raise Error, 'file does not start with FORM id' formlength = _read_long(self._file) if formlength <= 0: raise Error, 'invalid FORM chunk data size' formdata ... | 0485f1945fdf9b50deeb5fdd34ce2554f8c00a6a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0485f1945fdf9b50deeb5fdd34ce2554f8c00a6a/aifc.py | |
def setmark(self, (id, pos, name)): | def setmark(self, id, pos, name): | def setmark(self, (id, pos, name)): if id <= 0: raise Error, 'marker ID must be > 0' if pos < 0: raise Error, 'marker position must be >= 0' if type(name) != type(''): raise Error, 'marker name must be a string' for i in range(len(self._markers)): if id == self._markers[i][0]: self._markers[i] = id, pos, name return se... | 0485f1945fdf9b50deeb5fdd34ce2554f8c00a6a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0485f1945fdf9b50deeb5fdd34ce2554f8c00a6a/aifc.py |
self._nframes == self._nframeswritten: | self._nframes == self._nframeswritten and \ self._marklength == 0: | def _patchheader(self): curpos = self._file.tell() if self._datawritten & 1: datalength = self._datawritten + 1 self._file.write(chr(0)) else: datalength = self._datawritten if datalength == self._datalength and \ self._nframes == self._nframeswritten: self._file.seek(curpos, 0) return self._file.seek(self._form_length... | 0485f1945fdf9b50deeb5fdd34ce2554f8c00a6a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0485f1945fdf9b50deeb5fdd34ce2554f8c00a6a/aifc.py |
_write_short(len(self._file, markers)) | _write_short(self._file, len(self._markers)) | def _writemarkers(self): if len(self._markers) == 0: return self._file.write('MARK') length = 2 for marker in self._markers: id, pos, name = marker length = length + len(name) + 1 + 6 if len(name) & 1 == 0: length = length + 1 _write_long(self._file, length) self._marklength = length + 8 _write_short(len(self._file, ma... | 0485f1945fdf9b50deeb5fdd34ce2554f8c00a6a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0485f1945fdf9b50deeb5fdd34ce2554f8c00a6a/aifc.py |
context = context.copy() | context = copy.deepcopy(context) context.clear_flags() | def setcontext(context): """Set this thread's context to context.""" if context in (DefaultContext, BasicContext, ExtendedContext): context = context.copy() threading.currentThread().__decimal_context__ = context | c300a6b4d71ff7369883ad5e79fbfaea1774653c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c300a6b4d71ff7369883ad5e79fbfaea1774653c/decimal.py |
context = context.copy() | context = copy.deepcopy(context) context.clear_flags() | def setcontext(context, _local=local): """Set this thread's context to context.""" if context in (DefaultContext, BasicContext, ExtendedContext): context = context.copy() _local.__decimal_context__ = context | c300a6b4d71ff7369883ad5e79fbfaea1774653c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c300a6b4d71ff7369883ad5e79fbfaea1774653c/decimal.py |
if self._int[prec-1] %2 == 0: | if self._int[prec-1] & 1 == 0: | def _round_half_even(self, prec, expdiff, context): """Round 5 to even, rest to nearest.""" | c300a6b4d71ff7369883ad5e79fbfaea1774653c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c300a6b4d71ff7369883ad5e79fbfaea1774653c/decimal.py |
if tmp._exp % 2 == 1: | if tmp._exp & 1: | def sqrt(self, context=None): """Return the square root of self. | c300a6b4d71ff7369883ad5e79fbfaea1774653c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c300a6b4d71ff7369883ad5e79fbfaea1774653c/decimal.py |
if tmp.adjusted() % 2 == 0: | if tmp.adjusted() & 1 == 0: | def sqrt(self, context=None): """Return the square root of self. | c300a6b4d71ff7369883ad5e79fbfaea1774653c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c300a6b4d71ff7369883ad5e79fbfaea1774653c/decimal.py |
return self._int[-1+self._exp] % 2 == 0 | return self._int[-1+self._exp] & 1 == 0 | def _iseven(self): """Returns 1 if self is even. Assumes self is an integer.""" if self._exp > 0: return 1 return self._int[-1+self._exp] % 2 == 0 | c300a6b4d71ff7369883ad5e79fbfaea1774653c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c300a6b4d71ff7369883ad5e79fbfaea1774653c/decimal.py |
zinfo.flag_bits = 0x08 | zinfo.flag_bits = 0x00 | def write(self, filename, arcname=None, compress_type=None): """Put the bytes from filename into the archive under the name arcname.""" st = os.stat(filename) mtime = time.localtime(st[8]) date_time = mtime[0:6] # Create ZipInfo instance to store file information if arcname is None: zinfo = ZipInfo(filename, date_time)... | 29346d9c058e140d544d54d82567913a1f5ad3fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29346d9c058e140d544d54d82567913a1f5ad3fd/zipfile.py |
CRC = 0 compress_size = 0 file_size = 0 | def write(self, filename, arcname=None, compress_type=None): """Put the bytes from filename into the archive under the name arcname.""" st = os.stat(filename) mtime = time.localtime(st[8]) date_time = mtime[0:6] # Create ZipInfo instance to store file information if arcname is None: zinfo = ZipInfo(filename, date_time)... | 29346d9c058e140d544d54d82567913a1f5ad3fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29346d9c058e140d544d54d82567913a1f5ad3fd/zipfile.py | |
position = self.fp.tell() self.fp.seek(zinfo.header_offset + 14, 0) | def write(self, filename, arcname=None, compress_type=None): """Put the bytes from filename into the archive under the name arcname.""" st = os.stat(filename) mtime = time.localtime(st[8]) date_time = mtime[0:6] # Create ZipInfo instance to store file information if arcname is None: zinfo = ZipInfo(filename, date_time)... | 29346d9c058e140d544d54d82567913a1f5ad3fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29346d9c058e140d544d54d82567913a1f5ad3fd/zipfile.py | |
def _isunicode(s): return isinstance(s, UnicodeType) | cca707091b40be17256f67ae739bb2d701b31ae8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cca707091b40be17256f67ae739bb2d701b31ae8/Charset.py | ||
'euc-jp': 'japanese.euc-jp', 'iso-2022-jp': 'japanese.iso-2022-jp', 'shift_jis': 'japanese.shift_jis', 'euc-kr': 'korean.euc-kr', 'ks_c_5601-1987': 'korean.cp949', 'iso-2022-kr': 'korean.iso-2022-kr', 'johab': 'korean.johab', 'gb2132': 'eucgb2312_cn', | 'gb2312': 'eucgb2312_cn', | def _isunicode(s): return isinstance(s, UnicodeType) | cca707091b40be17256f67ae739bb2d701b31ae8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cca707091b40be17256f67ae739bb2d701b31ae8/Charset.py |
'utf-8': 'utf-8', | def _isunicode(s): return isinstance(s, UnicodeType) | cca707091b40be17256f67ae739bb2d701b31ae8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cca707091b40be17256f67ae739bb2d701b31ae8/Charset.py | |
self.input_codec) | self.output_charset) | def __init__(self, input_charset=DEFAULT_CHARSET): # RFC 2046, $4.1.2 says charsets are not case sensitive input_charset = input_charset.lower() # Set the input charset after filtering through the aliases self.input_charset = ALIASES.get(input_charset, input_charset) # We can try to guess which encoding and conversion ... | cca707091b40be17256f67ae739bb2d701b31ae8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cca707091b40be17256f67ae739bb2d701b31ae8/Charset.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.