bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def close(self): try: if isinstance(self.socket, ssl.SSLSocket): if self.socket._sslobj is not None: self.socket.unwrap() finally: super(SSLConnection, self).close() | def close(self): try: if isinstance(self.socket, ssl.SSLSocket): if self.socket._sslobj is not None: try: self.socket.unwrap() except ssl.SSLError, err: if err.args[0] in (ssl.SSL_ERROR_WANT_READ, ssl.SSL_ERROR_WANT_WRITE): ssl_want_read_or_write = True else: raise finally: super(SSLConnection, self).close() | 456,700 |
def close(self): try: if isinstance(self.socket, ssl.SSLSocket): if self.socket._sslobj is not None: self.socket.unwrap() finally: super(SSLConnection, self).close() | def close(self): try: if isinstance(self.socket, ssl.SSLSocket): if self.socket._sslobj is not None: self.socket.unwrap() finally: super(SSLConnection, self).close() | 456,701 |
def can_symlink(): global _can_symlink if _can_symlink is not None: return _can_symlink try: os.symlink(TESTFN, TESTFN + "can_symlink") can = True except OSError: can = False _can_symlink = can return can | def can_symlink(): global _can_symlink if _can_symlink is not None: return _can_symlink try: os.symlink(TESTFN, TESTFN + "can_symlink") can = True except (OSError, NotImplementedError): can = False _can_symlink = can return can | 456,702 |
def test_weird_formcontentdict(self): # Test the weird FormContentDict classes env = {'QUERY_STRING': "x=1&y=2.0&z=2-3.%2b0&1=1abc"} expect = {'x': 1, 'y': 2.0, 'z': '2-3.+0', '1': '1abc'} d = cgi.InterpFormContentDict(env) for k, v in expect.items(): self.assertEqual(d[k], v) for k, v in d.items(): self.assertEqual(ex... | def test_weird_formcontentdict(self): # Test the weird FormContentDict classes env = {'QUERY_STRING': "x=1&y=2.0&z=2-3.%2b0&1=1abc"} expect = {'x': 1, 'y': 2.0, 'z': '2-3.+0', '1': '1abc'} d = cgi.InterpFormContentDict(env) for k, v in expect.items(): self.assertEqual(d[k], v) for k, v in d.items(): self.assertEqual(ex... | 456,703 |
def setUp(self): self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.addr_remote = ('www.python.org.', 80) self.addr_local = ('127.0.0.1', 25339) | def setUp(self): self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.addr_remote = ('www.python.org.', 80) self.addr_local = ('127.0.0.1', 25339) | 456,704 |
def testAcceptTimeout(self): # Test accept() timeout _timeout = 2 self.sock.settimeout(_timeout) self.sock.bind(self.addr_local) self.sock.listen(5) | def testAcceptTimeout(self): # Test accept() timeout _timeout = 2 self.sock.settimeout(_timeout) test_support.bind_port(self.sock, self.localhost) self.sock.listen(5) | 456,705 |
def testRecvfromTimeout(self): # Test recvfrom() timeout _timeout = 2 self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) self.sock.settimeout(_timeout) self.sock.bind(self.addr_local) | def testRecvfromTimeout(self): # Test recvfrom() timeout _timeout = 2 self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) self.sock.settimeout(_timeout) self.sock.bind(self.addr_local) | 456,706 |
def fact(n): result = 1 for i in range(1, int(n)+1): result *= i return result | def fact(n): result = 1 for i in range(1, int(n)+1): result *= i return result | 456,707 |
def open_local_file(self, req): import email.utils import mimetypes host = req.get_host() file = req.get_selector() localfile = url2pathname(file) try: stats = os.stat(localfile) size = stats.st_size modified = email.utils.formatdate(stats.st_mtime, usegmt=True) mtype = mimetypes.guess_type(file)[0] headers = mimetools... | def open_local_file(self, req): import email.utils import mimetypes host = req.get_host() filename = req.get_selector() localfile = url2pathname(filename) try: stats = os.stat(localfile) size = stats.st_size modified = email.utils.formatdate(stats.st_mtime, usegmt=True) mtype = mimetypes.guess_type(file)[0] headers = m... | 456,708 |
def open_local_file(self, req): import email.utils import mimetypes host = req.get_host() file = req.get_selector() localfile = url2pathname(file) try: stats = os.stat(localfile) size = stats.st_size modified = email.utils.formatdate(stats.st_mtime, usegmt=True) mtype = mimetypes.guess_type(file)[0] headers = mimetools... | def open_local_file(self, req): import email.utils import mimetypes host = req.get_host() file = req.get_selector() localfile = url2pathname(file) try: stats = os.stat(localfile) size = stats.st_size modified = email.utils.formatdate(stats.st_mtime, usegmt=True) mtype = mimetypes.guess_type(filename)[0] headers = mimet... | 456,709 |
def open_local_file(self, req): import email.utils import mimetypes host = req.get_host() file = req.get_selector() localfile = url2pathname(file) try: stats = os.stat(localfile) size = stats.st_size modified = email.utils.formatdate(stats.st_mtime, usegmt=True) mtype = mimetypes.guess_type(file)[0] headers = mimetools... | def open_local_file(self, req): import email.utils import mimetypes host = req.get_host() file = req.get_selector() localfile = url2pathname(file) try: stats = os.stat(localfile) size = stats.st_size modified = email.utils.formatdate(stats.st_mtime, usegmt=True) mtype = mimetypes.guess_type(file)[0] headers = mimetools... | 456,710 |
def testGetServBy(self): eq = self.assertEqual # Find one service that exists, then check all the related interfaces. # I've ordered this by protocols that have both a tcp and udp # protocol, at least for modern Linuxes. if sys.platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8', 'darwin')... | def testGetServBy(self): eq = self.assertEqual # Find one service that exists, then check all the related interfaces. # I've ordered this by protocols that have both a tcp and udp # protocol, at least for modern Linuxes. if (sys.platform.startswith('linux') or sys.platform.startswith('freebsd') or sys.platform.startswi... | 456,711 |
def _removeHandlerRef(wr): """ Remove a handler reference from the internal cleanup list. """ _acquireLock() try: if wr in _handlerList: _handlerList.remove(wr) finally: _releaseLock() | def _removeHandlerRef(wr): """ Remove a handler reference from the internal cleanup list. """ if _acquireLock is not None: _acquireLock() try: if wr in _handlerList: _handlerList.remove(wr) finally: _releaseLock() | 456,712 |
def shutdown(handlerList=_handlerList): """ Perform any cleanup actions in the logging system (e.g. flushing buffers). Should be called at application exit. """ for wr in reversed(handlerList[:]): #errors might occur, for example, if files are locked #we just ignore them if raiseExceptions is not set try: h = wr() h.f... | def shutdown(handlerList=_handlerList): """ Perform any cleanup actions in the logging system (e.g. flushing buffers). Should be called at application exit. """ for wr in reversed(handlerList[:]): #errors might occur, for example, if files are locked #we just ignore them if raiseExceptions is not set try: h = wr() if ... | 456,713 |
def _find_mac(command, args, hw_identifiers, get_index): import os for dir in ['', '/sbin/', '/usr/sbin']: executable = os.path.join(dir, command) if not os.path.exists(executable): continue try: # LC_ALL to get English output, 2>/dev/null to # prevent output on stderr cmd = 'LC_ALL=C %s %s 2>/dev/null' % (executable,... | def _find_mac(command, args, hw_identifiers, get_index): import os for dir in ['', '/sbin/', '/usr/sbin']: executable = os.path.join(dir, command) if not os.path.exists(executable): continue try: # LC_ALL to get English output, 2>/dev/null to # prevent output on stderr cmd = 'LC_ALL=C %s %s 2>/dev/null' % (executable,... | 456,714 |
def _find_mac(command, args, hw_identifiers, get_index): import os for dir in ['', '/sbin/', '/usr/sbin']: executable = os.path.join(dir, command) if not os.path.exists(executable): continue try: # LC_ALL to get English output, 2>/dev/null to # prevent output on stderr cmd = 'LC_ALL=C %s %s 2>/dev/null' % (executable,... | def _find_mac(command, args, hw_identifiers, get_index): import os for dir in ['', '/sbin/', '/usr/sbin']: executable = os.path.join(dir, command) if not os.path.exists(executable): continue try: # LC_ALL to get English output, 2>/dev/null to # prevent output on stderr cmd = 'LC_ALL=C %s %s 2>/dev/null' % (executable,... | 456,715 |
def checkline(self, filename, lineno): """Check whether specified line seems to be executable. | def checkline(self, filename, lineno): """Check whether specified line seems to be executable. | 456,716 |
def main(): if not sys.argv[1:] or sys.argv[1] in ("--help", "-h"): print("usage: pdb.py scriptfile [arg] ...") sys.exit(2) mainpyfile = sys.argv[1] # Get script filename if not os.path.exists(mainpyfile): print('Error:', mainpyfile, 'does not exist') sys.exit(1) del sys.argv[0] # Hide "pdb.py" from argu... | def main(): if not sys.argv[1:] or sys.argv[1] in ("--help", "-h"): print("usage: pdb.py scriptfile [arg] ...") sys.exit(2) mainpyfile = sys.argv[1] # Get script filename if not os.path.exists(mainpyfile): print('Error:', mainpyfile, 'does not exist') sys.exit(1) del sys.argv[0] # Hide "pdb.py" from argu... | 456,717 |
def test_format_testfile(self): for line in open(format_testfile): if line.startswith('--'): continue line = line.strip() if not line: continue | def test_format_testfile(self): for line in open(format_testfile): if line.startswith('--'): continue line = line.strip() if not line: continue | 456,718 |
def _call_external_zip(directory, verbose=False): # XXX see if we want to keep an external call here if verbose: zipoptions = "-r" else: zipoptions = "-rq" from distutils.errors import DistutilsExecError from distutils.spawn import spawn try: spawn(["zip", zipoptions, zip_filename, base_dir], dry_run=dry_run) except Di... | def _call_external_zip(base_dir, zip_filename, verbose=False, dry_run=False): # XXX see if we want to keep an external call here if verbose: zipoptions = "-r" else: zipoptions = "-rq" from distutils.errors import DistutilsExecError from distutils.spawn import spawn try: spawn(["zip", zipoptions, zip_filename, base_dir]... | 456,719 |
def _make_zipfile(base_name, base_dir, verbose=0, dry_run=0, logger=None): """Create a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".zip". Uses either the "zipfile" Python module (if available) or the InfoZIP "zip" utility (if installed and found on the default search ... | def _make_zipfile(base_name, base_dir, verbose=0, dry_run=0, logger=None): """Create a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".zip". Uses either the "zipfile" Python module (if available) or the InfoZIP "zip" utility (if installed and found on the default search ... | 456,720 |
def abort(self): '''Abort a file transfer. Uses out-of-band data. This does not follow the procedure from the RFC to send Telnet IP and Synch; that doesn't seem to work with the servers I've tried. Instead, just send the ABOR command as OOB data.''' line = 'ABOR' + CRLF if self.debugging > 1: print '*put urgent*', se... | def abort(self): '''Abort a file transfer. Uses out-of-band data. This does not follow the procedure from the RFC to send Telnet IP and Synch; that doesn't seem to work with the servers I've tried. Instead, just send the ABOR command as OOB data.''' line = 'ABOR' + CRLF if self.debugging > 1: print '*put urgent*', se... | 456,721 |
def test_compile_badunicode(self): st = parser.suite('a = "\\U12345678"') self.assertRaises(SyntaxError, parser.compilest, st) st = parser.suite('a = "\\u1"') self.assertRaises(SyntaxError, parser.compilest, st) | def test_compile_badunicode(self): st = parser.suite('a = "\\U12345678"') self.assertRaises(SyntaxError, parser.compilest, st) st = parser.suite('a = "\\u1"') self.assertRaises(SyntaxError, parser.compilest, st) | 456,722 |
def print_summary(self): if self.is_evalframeex(): pyop = self.get_pyop() if pyop: sys.stdout.write('#%i %s\n' % (self.get_index(), pyop.get_truncated_repr(MAX_OUTPUT_LEN))) sys.stdout.write(pyop.current_line()) else: sys.stdout.write('#%i (unable to read python frame information)\n' % self.get_index()) else: sys.stdou... | def print_summary(self): if self.is_evalframeex(): pyop = self.get_pyop() if pyop: sys.stdout.write('#%i %s\n' % (self.get_index(), pyop.get_truncated_repr(MAX_OUTPUT_LEN))) sys.stdout.write(pyop.current_line()) else: sys.stdout.write('#%i (unable to read python frame information)\n' % self.get_index()) else: sys.stdou... | 456,723 |
def pytify(body): # replace ignored patterns by spaces for p in ignores: body = p.sub(' ', body) # replace char literals by ord(...) body = p_char.sub('ord(\\0)', body) # Compute negative hexadecimal constants start = 0 UMAX = 2*(sys.maxsize+1) while 1: m = p_hex.search(body, start) if not m: break s,e = m.span() val =... | def pytify(body): # replace ignored patterns by spaces for p in ignores: body = p.sub(' ', body) # replace char literals by ord(...) body = p_char.sub("ord('\\1')", body) # Compute negative hexadecimal constants start = 0 UMAX = 2*(sys.maxsize+1) while 1: m = p_hex.search(body, start) if not m: break s,e = m.span() val... | 456,724 |
def play_sound_file(self, data, rate, ssize, nchannels): try: dsp = ossaudiodev.open('w') except IOError as msg: if msg.args[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY): raise unittest.SkipTest(msg) raise | def play_sound_file(self, data, rate, ssize, nchannels): try: dsp = ossaudiodev.open('w') except IOError as msg: if msg.args[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY): raise unittest.SkipTest(msg) raise | 456,725 |
def test_functions(self): # Check presence of all functions funcs = [] for suffix in "base64", "hqx", "uu", "hex": prefixes = ["a2b_", "b2a_"] if suffix == "hqx": prefixes.extend(["crc_", "rlecode_", "rledecode_"]) for prefix in prefixes: name = prefix + suffix self.assertTrue(hasattr(getattr(binascii, name), '__call__... | def test_functions(self): # Check presence of all functions for name in all_functions: self.assertTrue(hasattr(getattr(binascii, name), '__call__')) self.assertRaises(TypeError, getattr(binascii, name)) | 456,726 |
def test_base64valid(self): # Test base64 with valid data MAX_BASE64 = 57 lines = [] for i in range(0, len(self.data), MAX_BASE64): b = self.data[i:i+MAX_BASE64] a = binascii.b2a_base64(b) lines.append(a) res = "" for line in lines: b = binascii.a2b_base64(line) res = res + b self.assertEqual(res, self.rawdata) | def test_base64valid(self): # Test base64 with valid data MAX_BASE64 = 57 lines = [] for i in range(0, len(self.rawdata), MAX_BASE64): b = self.type2test(self.rawdata[i:i+MAX_BASE64]) a = binascii.b2a_base64(b) lines.append(a) res = "" for line in lines: b = binascii.a2b_base64(line) res = res + b self.assertEqual(res,... | 456,727 |
def test_base64valid(self): # Test base64 with valid data MAX_BASE64 = 57 lines = [] for i in range(0, len(self.data), MAX_BASE64): b = self.data[i:i+MAX_BASE64] a = binascii.b2a_base64(b) lines.append(a) res = "" for line in lines: b = binascii.a2b_base64(line) res = res + b self.assertEqual(res, self.rawdata) | def test_base64valid(self): # Test base64 with valid data MAX_BASE64 = 57 lines = [] for i in range(0, len(self.data), MAX_BASE64): b = self.data[i:i+MAX_BASE64] a = binascii.b2a_base64(b) lines.append(a) res = "" for line in lines: a = self.type2test(line) b = binascii.a2b_base64(a) res = res + b self.assertEqual(res,... | 456,728 |
def test_base64invalid(self): # Test base64 with random invalid characters sprinkled throughout # (This requires a new version of binascii.) MAX_BASE64 = 57 lines = [] for i in range(0, len(self.data), MAX_BASE64): b = self.data[i:i+MAX_BASE64] a = binascii.b2a_base64(b) lines.append(a) | def test_base64invalid(self): # Test base64 with random invalid characters sprinkled throughout # (This requires a new version of binascii.) MAX_BASE64 = 57 lines = [] for i in range(0, len(self.data), MAX_BASE64): b = self.type2test(self.rawdata[i:i+MAX_BASE64]) a = binascii.b2a_base64(b) lines.append(a) | 456,729 |
def addnoise(line): noise = fillers ratio = len(line) // len(noise) res = "" while line and noise: if len(line) // len(noise) > ratio: c, line = line[0], line[1:] else: c, noise = noise[0], noise[1:] res += c return res + noise + line | def addnoise(line): noise = fillers ratio = len(line) // len(noise) res = "" while line and noise: if len(line) // len(noise) > ratio: c, line = line[0], line[1:] else: c, noise = noise[0], noise[1:] res += c return res + noise + line | 456,730 |
def addnoise(line): noise = fillers ratio = len(line) // len(noise) res = "" while line and noise: if len(line) // len(noise) > ratio: c, line = line[0], line[1:] else: c, noise = noise[0], noise[1:] res += c return res + noise + line | def addnoise(line): noise = fillers ratio = len(line) // len(noise) res = "" while line and noise: if len(line) // len(noise) > ratio: c, line = line[0], line[1:] else: c, noise = noise[0], noise[1:] res += c return res + noise + line | 456,731 |
def test_uu(self): MAX_UU = 45 lines = [] for i in range(0, len(self.data), MAX_UU): b = self.data[i:i+MAX_UU] a = binascii.b2a_uu(b) lines.append(a) res = "" for line in lines: b = binascii.a2b_uu(line) res += b self.assertEqual(res, self.rawdata) | def test_uu(self): MAX_UU = 45 lines = [] for i in range(0, len(self.data), MAX_UU): b = self.type2test(self.rawdata[i:i+MAX_UU]) a = binascii.b2a_uu(b) lines.append(a) res = "" for line in lines: b = binascii.a2b_uu(line) res += b self.assertEqual(res, self.rawdata) | 456,732 |
def test_uu(self): MAX_UU = 45 lines = [] for i in range(0, len(self.data), MAX_UU): b = self.data[i:i+MAX_UU] a = binascii.b2a_uu(b) lines.append(a) res = "" for line in lines: b = binascii.a2b_uu(line) res += b self.assertEqual(res, self.rawdata) | def test_uu(self): MAX_UU = 45 lines = [] for i in range(0, len(self.data), MAX_UU): b = self.data[i:i+MAX_UU] a = binascii.b2a_uu(b) lines.append(a) res = "" for line in lines: a = self.type2test(line) b = binascii.a2b_uu(a) res += b self.assertEqual(res, self.rawdata) | 456,733 |
def test_crc32(self): crc = binascii.crc32("Test the CRC-32 of") crc = binascii.crc32(" this string.", crc) self.assertEqual(crc, 1571220330) | def test_crc32(self): crc = binascii.crc32(self.type2test("Test the CRC-32 of")) crc = binascii.crc32(self.type2test(" this string."), crc) self.assertEqual(crc, 1571220330) | 456,734 |
def test_crc32(self): crc = binascii.crc32("Test the CRC-32 of") crc = binascii.crc32(" this string.", crc) self.assertEqual(crc, 1571220330) | defdef test_hqx(self): rle = binascii.rlecode_hqx(self.data) a = binascii.b2a_hqx(self.type2test(rle)) b, _ = binascii.a2b_hqx(self.type2test(a)) res = binascii.rledecode_hqx(b) self.assertEqual(res, self.rawdata) test_crc32(self):def test_hqx(self): rle = binascii.rlecode_hqx(self.data) a = binascii.b2a_hqx(self.... | 456,735 |
def test_hex(self): # test hexlification s = '{s\005\000\000\000worldi\002\000\000\000s\005\000\000\000helloi\001\000\000\0000' t = binascii.b2a_hex(s) u = binascii.a2b_hex(t) self.assertEqual(s, u) self.assertRaises(TypeError, binascii.a2b_hex, t[:-1]) self.assertRaises(TypeError, binascii.a2b_hex, t[:-1] + 'q') | def test_hex(self): # test hexlification s = '{s\005\000\000\000worldi\002\000\000\000s\005\000\000\000helloi\001\000\000\0000' t = binascii.b2a_hex(self.type2test(s)) u = binascii.a2b_hex(self.type2test(t)) self.assertEqual(s, u) self.assertRaises(TypeError, binascii.a2b_hex, t[:-1]) self.assertRaises(TypeError, binas... | 456,736 |
def test_empty_string(self): # A test for SF bug #1022953. Make sure SystemError is not raised. for n in ['b2a_qp', 'a2b_hex', 'b2a_base64', 'a2b_uu', 'a2b_qp', 'b2a_hex', 'unhexlify', 'hexlify', 'crc32', 'b2a_hqx', 'a2b_hqx', 'a2b_base64', 'rlecode_hqx', 'b2a_uu', 'rledecode_hqx']: f = getattr(binascii, n) f('') bina... | def test_empty_string(self): # A test for SF bug #1022953. Make sure SystemError is not raised. for n in ['b2a_qp', 'a2b_hex', 'b2a_base64', 'a2b_uu', 'a2b_qp', 'b2a_hex', 'unhexlify', 'hexlify', 'crc32', 'b2a_hqx', 'a2b_hqx', 'a2b_base64', 'rlecode_hqx', 'b2a_uu', 'rledecode_hqx']: f = getattr(binascii, n) f('') bina... | 456,737 |
def test_errors(self): self.assertRaises(TypeError, winsound.PlaySound) self.assertRaises(TypeError, winsound.PlaySound, "bad", "bad") self.assertRaises( RuntimeError, winsound.PlaySound, "none", winsound.SND_ASYNC | winsound.SND_MEMORY ) | def test_errors(self): self.assertRaises(TypeError, winsound.PlaySound) self.assertRaises(TypeError, winsound.PlaySound, "bad", "bad") self.assertRaises( RuntimeError, winsound.PlaySound, "none", winsound.SND_ASYNC | winsound.SND_MEMORY ) | 456,738 |
def test_alias_asterisk(self): if _have_soundcard(): winsound.PlaySound('SystemAsterisk', winsound.SND_ALIAS) else: self.assertRaises( RuntimeError, winsound.PlaySound, 'SystemAsterisk', winsound.SND_ALIAS ) | def test_alias_asterisk(self): if _have_soundcard(): winsound.PlaySound('SystemAsterisk', winsound.SND_ALIAS) else: self.assertRaises( RuntimeError, winsound.PlaySound, 'SystemAsterisk', winsound.SND_ALIAS ) | 456,739 |
def test_alias_exclamation(self): if _have_soundcard(): winsound.PlaySound('SystemExclamation', winsound.SND_ALIAS) else: self.assertRaises( RuntimeError, winsound.PlaySound, 'SystemExclamation', winsound.SND_ALIAS ) | def test_alias_exclamation(self): if _have_soundcard(): winsound.PlaySound('SystemExclamation', winsound.SND_ALIAS) else: self.assertRaises( RuntimeError, winsound.PlaySound, 'SystemExclamation', winsound.SND_ALIAS ) | 456,740 |
def test_alias_exit(self): if _have_soundcard(): winsound.PlaySound('SystemExit', winsound.SND_ALIAS) else: self.assertRaises( RuntimeError, winsound.PlaySound, 'SystemExit', winsound.SND_ALIAS ) | def test_alias_exit(self): if _have_soundcard(): winsound.PlaySound('SystemExit', winsound.SND_ALIAS) else: self.assertRaises( RuntimeError, winsound.PlaySound, 'SystemExit', winsound.SND_ALIAS ) | 456,741 |
def test_alias_hand(self): if _have_soundcard(): winsound.PlaySound('SystemHand', winsound.SND_ALIAS) else: self.assertRaises( RuntimeError, winsound.PlaySound, 'SystemHand', winsound.SND_ALIAS ) | def test_alias_hand(self): if _have_soundcard(): winsound.PlaySound('SystemHand', winsound.SND_ALIAS) else: self.assertRaises( RuntimeError, winsound.PlaySound, 'SystemHand', winsound.SND_ALIAS ) | 456,742 |
def test_localecalendars(self): # ensure that Locale{Text,HTML}Calendar resets the locale properly # (it is still not thread-safe though) try: def_locale = locale.getdefaultlocale() except locale.Error: # cannot determine a default locale -- skip test return old_october = calendar.TextCalendar().formatmonthname(2010, 1... | def test_localecalendars(self): # ensure that Locale{Text,HTML}Calendar resets the locale properly # (it is still not thread-safe though) try: calendar.LocaleTextCalendar(locale='').formatmonthname(2010, 10, 10) except locale.Error: # cannot determine a default locale -- skip test return old_october = calendar.TextCale... | 456,743 |
def test_localecalendars(self): # ensure that Locale{Text,HTML}Calendar resets the locale properly # (it is still not thread-safe though) try: def_locale = locale.getdefaultlocale() except locale.Error: # cannot determine a default locale -- skip test return old_october = calendar.TextCalendar().formatmonthname(2010, 1... | def test_localecalendars(self): # ensure that Locale{Text,HTML}Calendar resets the locale properly # (it is still not thread-safe though) try: def_locale = locale.getdefaultlocale() except locale.Error: # cannot determine a default locale -- skip test return old_october = calendar.TextCalendar().formatmonthname(2010, 1... | 456,744 |
def test_localecalendars(self): # ensure that Locale{Text,HTML}Calendar resets the locale properly # (it is still not thread-safe though) try: def_locale = locale.getdefaultlocale() except locale.Error: # cannot determine a default locale -- skip test return old_october = calendar.TextCalendar().formatmonthname(2010, 1... | def test_localecalendars(self): # ensure that Locale{Text,HTML}Calendar resets the locale properly # (it is still not thread-safe though) try: def_locale = locale.getdefaultlocale() except locale.Error: # cannot determine a default locale -- skip test return calendar.LocaleHTMLCalendar(locale='').formatmonthname(2010, ... | 456,745 |
def _mock_get_exec_path(self, env=None): return ['/p', '/pp'] | def _mock_get_exec_path(self, env=None): return ['/p', '/pp'] | 456,746 |
def test_internal_execvpe(self): exec_stubbed = self._stub_out_for_execvpe_test() with exec_stubbed: self.assertRaises(RuntimeError, os._execvpe, '/f', ['-a']) self.assertEqual([('execv', '/f', (['-a'],))], exec_stubbed.calls) exec_stubbed.calls = [] self.assertRaises(OSError, os._execvpe, 'f', ['-a'], env={'spam': 'be... | def test_internal_execvpe(self): exec_stubbed = self._stub_out_for_execvpe_test() with exec_stubbed: self.assertRaises(RuntimeError, os._execvpe, os.sep+'f', ['-a']) self.assertEqual([('execv', os.sep+'f', (['-a'],))], exec_stubbed.calls) exec_stubbed.calls = [] self.assertRaises(OSError, os._execvpe, 'f', ['-a'], env=... | 456,747 |
def test_internal_execvpe(self): exec_stubbed = self._stub_out_for_execvpe_test() with exec_stubbed: self.assertRaises(RuntimeError, os._execvpe, '/f', ['-a']) self.assertEqual([('execv', '/f', (['-a'],))], exec_stubbed.calls) exec_stubbed.calls = [] self.assertRaises(OSError, os._execvpe, 'f', ['-a'], env={'spam': 'be... | def test_internal_execvpe(self): exec_stubbed = self._stub_out_for_execvpe_test() with exec_stubbed: self.assertRaises(RuntimeError, os._execvpe, '/f', ['-a']) self.assertEqual([('execv', '/f', (['-a'],))], exec_stubbed.calls) exec_stubbed.calls = [] self.assertRaises(OSError, os._execvpe, 'f', ['-a'], env={'spam': 'be... | 456,748 |
def main(tests=None, testdir=None, verbose=0, quiet=False, exclude=False, single=False, randomize=False, fromfile=None, findleaks=False, use_resources=None, trace=False, coverdir='coverage', runleaks=False, huntrleaks=False, verbose2=False, print_slow=False, random_seed=None, use_mp=None, verbose3=False, forever=False)... | def main(tests=None, testdir=None, verbose=0, quiet=False, exclude=False, single=False, randomize=False, fromfile=None, findleaks=False, use_resources=None, trace=False, coverdir='coverage', runleaks=False, huntrleaks=False, verbose2=False, print_slow=False, random_seed=None, use_mp=None, verbose3=False, forever=False)... | 456,749 |
def main(tests=None, testdir=None, verbose=0, quiet=False, exclude=False, single=False, randomize=False, fromfile=None, findleaks=False, use_resources=None, trace=False, coverdir='coverage', runleaks=False, huntrleaks=False, verbose2=False, print_slow=False, random_seed=None, use_mp=None, verbose3=False, forever=False)... | def main(tests=None, testdir=None, verbose=0, quiet=False, exclude=False, single=False, randomize=False, fromfile=None, findleaks=False, use_resources=None, trace=False, coverdir='coverage', runleaks=False, huntrleaks=False, verbose2=False, print_slow=False, random_seed=None, use_mp=None, verbose3=False, forever=False)... | 456,750 |
def __getslice__(self, i, j): return i, j | def __getslice__(self, i, j): return i, j | 456,751 |
def test_getitem_classic(self): class Empty: pass self._getitem_helper(Empty) | def test_getitem_classic(self): class Empty: pass self._getitem_helper(Empty) | 456,752 |
def f(): result.append('Lower level reference') | def f(): result.append('Lower level reference') | 456,753 |
def f(): result.append('Lower level reference') | def f(): result.append('Lower level reference') | 456,754 |
def f(): result.append('Lower level reference') | def f(): result.append('Lower level reference') | 456,755 |
def _check_output(self, script_name, exit_code, data, expected_file, expected_argv0, expected_path0, expected_package): if verbose > 1: print("Output from test script %r:" % script_name) print(data) self.assertEqual(exit_code, 0) printed_file = '__file__==%r' % expected_file printed_package = '__package__==%r' % expect... | def _check_output(self, script_name, exit_code, data, expected_file, expected_argv0, expected_path0, expected_package): if verbose > 1: print("Output from test script %r:" % script_name) print(data) self.assertEqual(exit_code, 0) printed_file = '__file__==%a' % expected_file printed_package = '__package__==%r' % expect... | 456,756 |
def _check_output(self, script_name, exit_code, data, expected_file, expected_argv0, expected_path0, expected_package): if verbose > 1: print("Output from test script %r:" % script_name) print(data) self.assertEqual(exit_code, 0) printed_file = '__file__==%r' % expected_file printed_package = '__package__==%r' % expect... | def _check_output(self, script_name, exit_code, data, expected_file, expected_argv0, expected_path0, expected_package): if verbose > 1: print("Output from test script %r:" % script_name) print(data) self.assertEqual(exit_code, 0) printed_file = '__file__==%r' % expected_file printed_package = '__package__==%r' % expect... | 456,757 |
def test_execfile(self): namespace = {} execfile(test_support.TESTFN, namespace) func = namespace['line3'] self.assertEqual(func.func_code.co_firstlineno, 3) self.assertEqual(namespace['line4'], FATX) | def test_execfile(self): namespace = {} with test_support._check_py3k_warnings(): execfile(test_support.TESTFN, namespace) func = namespace['line3'] self.assertEqual(func.func_code.co_firstlineno, 3) self.assertEqual(namespace['line4'], FATX) | 456,758 |
def build_extensions(self): | def build_extensions(self): | 456,759 |
def check_warnings(): with warnings.catch_warnings(record=True) as w: yield WarningsRecorder(w) | def check_warnings(): with warnings.catch_warnings(record=True) as w: yield WarningsRecorder(w) | 456,760 |
def find_cookie(line): try: line_string = line.decode('ascii') except UnicodeDecodeError: return None | def find_cookie(line): try: line_string = line.decode('ascii') except UnicodeDecodeError: return None | 456,761 |
def setUp(self): BaseTestCase.setUp(self) self.parent_dir = tempfile.mkdtemp() self.cgi_dir = os.path.join(self.parent_dir, 'cgi-bin') os.mkdir(self.cgi_dir) | def setUp(self): BaseTestCase.setUp(self) self.parent_dir = tempfile.mkdtemp() self.cgi_dir = os.path.join(self.parent_dir, 'cgi-bin') os.mkdir(self.cgi_dir) | 456,762 |
def setUp(self): BaseTestCase.setUp(self) self.parent_dir = tempfile.mkdtemp() self.cgi_dir = os.path.join(self.parent_dir, 'cgi-bin') os.mkdir(self.cgi_dir) | def setUp(self): BaseTestCase.setUp(self) self.parent_dir = tempfile.mkdtemp() self.cgi_dir = os.path.join(self.parent_dir, 'cgi-bin') os.mkdir(self.cgi_dir) | 456,763 |
def updatecache(filename, module_globals=None): """Update a cache entry and return its list of lines. If something's wrong, print a message, discard the cache entry, and return an empty list.""" if filename in cache: del cache[filename] if not filename or filename[0] + filename[-1] == '<>': return [] fullname = filen... | def updatecache(filename, module_globals=None): """Update a cache entry and return its list of lines. If something's wrong, print a message, discard the cache entry, and return an empty list."""if filename in cache: del cache[filename] if not filename or filename[0] + filename[-1] == '<>': return []fullname = filename ... | 456,764 |
def updatecache(filename, module_globals=None): """Update a cache entry and return its list of lines. If something's wrong, print a message, discard the cache entry, and return an empty list.""" if filename in cache: del cache[filename] if not filename or filename[0] + filename[-1] == '<>': return [] fullname = filen... | defupdatecache(filename,module_globals=None):"""Updateacacheentryandreturnitslistoflines.Ifsomething'swrong,printamessage,discardthecacheentry,andreturnanemptylist."""iffilenameincache:delcache[filename]ifnotfilenameorfilename[0]+filename[-1]=='<>':return[]fullname=filenametry:stat=os.stat(fullname)exceptos.error,msg:b... | 456,765 |
def test_copy(self): try: os.unlink(TESTFN2) except: pass macostools.copy(test_support.TESTFN, TESTFN2) self.assertEqual(self.compareData(), '') | def test_copy(self): try: os.unlink(TESTFN2) except: pass macostools.copy(test_support.TESTFN, TESTFN2) self.assertEqual(self.compareData(), '') | 456,766 |
def test_mkalias(self): try: os.unlink(TESTFN2) except: pass macostools.mkalias(test_support.TESTFN, TESTFN2) fss, _, _ = Carbon.File.ResolveAliasFile(TESTFN2, 0) self.assertEqual(fss.as_pathname(), os.path.realpath(test_support.TESTFN)) | def test_mkalias(self): try: os.unlink(TESTFN2) except: pass macostools.mkalias(test_support.TESTFN, TESTFN2) fss, _, _ = Carbon.File.ResolveAliasFile(TESTFN2, 0) self.assertEqual(fss.as_pathname(), os.path.realpath(test_support.TESTFN)) | 456,767 |
def test_mkalias_relative(self): try: os.unlink(TESTFN2) except: pass # If the directory doesn't exist, then chances are this is a new # install of Python so don't create it since the user might end up # running ``sudo make install`` and creating the directory here won't # leave it with the proper permissions. if not o... | def test_mkalias_relative(self): try: os.unlink(TESTFN2) except: pass # If the directory doesn't exist, then chances are this is a new # install of Python so don't create it since the user might end up # running ``sudo make install`` and creating the directory here won't # leave it with the proper permissions. if not o... | 456,768 |
def emit(self, record): """ Emit a record. | def emit(self, record): """ Emit a record. | 456,769 |
def setUp(self): self.c = len(struct.pack('c', ' ')) self.H = len(struct.pack('H', 0)) self.i = len(struct.pack('i', 0)) self.l = len(struct.pack('l', 0)) self.P = len(struct.pack('P', 0)) # due to missing size_t information from struct, it is assumed that # sizeof(Py_ssize_t) = sizeof(void*) self.header = 'PP' self.vh... | def setUp(self): self.c = len(struct.pack('c', b' ')) self.H = len(struct.pack('H', 0)) self.i = len(struct.pack('i', 0)) self.l = len(struct.pack('l', 0)) self.P = len(struct.pack('P', 0)) # due to missing size_t information from struct, it is assumed that # sizeof(Py_ssize_t) = sizeof(void*) self.header = 'PP' self.v... | 456,770 |
def __repr__(self): return 'environ({!r})'.format(self.data) | def __repr__(self): return 'environ({!r})'.format(self.data) | 456,771 |
def _read(self, fp, fpname): """Parse a sectioned configuration file. | def _read(self, fp, fpname): """Parse a sectioned configuration file. | 456,772 |
def _read(self, fp, fpname): """Parse a sectioned configuration file. | def _read(self, fp, fpname): """Parse a sectioned configuration file. | 456,773 |
def _read(self, fp, fpname): """Parse a sectioned configuration file. | def _read(self, fp, fpname): """Parse a sectioned configuration file. | 456,774 |
def _join_multiline_values(self): all_sections = [self._defaults] all_sections.extend(self._sections.values()) for options in all_sections: for name, val in options.items(): if isinstance(val, list): if val[-1] == '\n': val = val[:-1] options[name] = '\n'.join(val) | def _join_multiline_values(self): all_sections = [self._defaults] all_sections.extend(self._sections.values()) for options in all_sections: for name, val in options.items(): if isinstance(val, list): if val[-1] == '\n': val = val[:-1] options[name] = '\n'.join(val) | 456,775 |
def test_getsitepackages(self): site.PREFIXES = ['xoxo'] dirs = site.getsitepackages() | def test_getsitepackages(self): site.PREFIXES = ['xoxo'] dirs = site.getsitepackages() | 456,776 |
def test_getsitepackages(self): site.PREFIXES = ['xoxo'] dirs = site.getsitepackages() | def test_getsitepackages(self): site.PREFIXES = ['xoxo'] dirs = site.getsitepackages() | 456,777 |
def get_python_inc(plat_specific=0, prefix=None): """Return the directory containing installed Python header files. If 'plat_specific' is false (the default), this is the path to the non-platform-specific header files, i.e. Python.h and so on; otherwise, this is the path to platform-specific header files (namely pycon... | def get_python_inc(plat_specific=0, prefix=None): """Return the directory containing installed Python header files. If 'plat_specific' is false (the default), this is the path to the non-platform-specific header files, i.e. Python.h and so on; otherwise, this is the path to platform-specific header files (namely pycon... | 456,778 |
def get_python_inc(plat_specific=0, prefix=None): """Return the directory containing installed Python header files. If 'plat_specific' is false (the default), this is the path to the non-platform-specific header files, i.e. Python.h and so on; otherwise, this is the path to platform-specific header files (namely pycon... | def get_python_inc(plat_specific=0, prefix=None): """Return the directory containing installed Python header files. If 'plat_specific' is false (the default), this is the path to the non-platform-specific header files, i.e. Python.h and so on; otherwise, this is the path to platform-specific header files (namely pycon... | 456,779 |
def get_python_inc(plat_specific=0, prefix=None): """Return the directory containing installed Python header files. If 'plat_specific' is false (the default), this is the path to the non-platform-specific header files, i.e. Python.h and so on; otherwise, this is the path to platform-specific header files (namely pycon... | def get_python_inc(plat_specific=0, prefix=None): """Return the directory containing installed Python header files. If 'plat_specific' is false (the default), this is the path to the non-platform-specific header files, i.e. Python.h and so on; otherwise, this is the path to platform-specific header files (namely pycon... | 456,780 |
def changed_files(): """Get the list of changed or added files from the VCS.""" if os.path.isdir('.hg'): vcs = 'hg' cmd = 'hg status --added --modified --no-status' elif os.path.isdir('.svn'): vcs = 'svn' cmd = 'svn status --quiet --non-interactive --ignore-externals' else: sys.exit('need a checkout to get modified fil... | def changed_files(): """Get the list of changed or added files from the VCS.""" if os.path.isdir('.hg'): vcs = 'hg' cmd = 'hg status --added --modified --no-status' elif os.path.isdir('.svn'): vcs = 'svn' cmd = 'svn status --quiet --non-interactive --ignore-externals' else: sys.exit('need a checkout to get modified fil... | 456,781 |
def test_main(): with test_support._check_py3k_warnings( ("classic (int|long) division", DeprecationWarning), ("coerce.. not supported", DeprecationWarning), ("Overriding __cmp__ ", DeprecationWarning), (".+__(get|set|del)slice__ has been removed", DeprecationWarning)): # Run all local test cases, with PTypesLongInitTe... | def test_main(): with test_support._check_py3k_warnings( ("classic (int|long) division", DeprecationWarning), ("coerce.. not supported", DeprecationWarning), (".+__(get|set|del)slice__ has been removed", DeprecationWarning)): # Run all local test cases, with PTypesLongInitTest first. test_support.run_unittest(PTypesLon... | 456,782 |
def handle_close(self): # XXX: this method can be called many times in a row for a single # connection, including in clear-text (non-TLS) mode. # (behaviour witnessed with test_data_connection) if not self.dtp_conn_closed: self.baseclass.push('226 transfer complete') self.close() self.dtp_conn_closed = True | def handle_close(self): # XXX: this method can be called many times in a row for a single # connection, including in clear-text (non-TLS) mode. # (behaviour witnessed with test_data_connection) if not self.dtp_conn_closed: self.baseclass.push('226 transfer complete') self.close() self.dtp_conn_closed = True | 456,783 |
def handle_error(self): raise | def handle_error(self): raise | 456,784 |
def _do_ssl_shutdown(self): self._ssl_closing = True try: self.socket = self.socket.unwrap() except ssl.SSLError, err: if err.args[0] in (ssl.SSL_ERROR_WANT_READ, ssl.SSL_ERROR_WANT_WRITE): return except socket.error, err: # Any "socket error" corresponds to a SSL_ERROR_SYSCALL return # from OpenSSL's SSL_shutdown(), c... | def _do_ssl_shutdown(self): self._ssl_closing = True try: self.socket = self.socket.unwrap() except ssl.SSLError, err: if err.args[0] in (ssl.SSL_ERROR_WANT_READ, ssl.SSL_ERROR_WANT_WRITE): return except socket.error, err: # Any "socket error" corresponds to a SSL_ERROR_SYSCALL return # from OpenSSL's SSL_shutdown(), c... | 456,785 |
def handle_read_event(self): if self._ssl_accepting: self._do_ssl_handshake() elif self._ssl_closing: self._do_ssl_shutdown() else: super(SSLConnection, self).handle_read_event() | def handle_read_event(self): if self._ssl_accepting: self._do_ssl_handshake() else: super(SSLConnection, self).handle_read_event() | 456,786 |
def handle_write_event(self): if self._ssl_accepting: self._do_ssl_handshake() elif self._ssl_closing: self._do_ssl_shutdown() else: super(SSLConnection, self).handle_write_event() | def handle_write_event(self): if self._ssl_accepting: self._do_ssl_handshake() else: super(SSLConnection, self).handle_write_event() | 456,787 |
def close(self): if (isinstance(self.socket, ssl.SSLSocket) and self.socket._sslobj is not None): self._do_ssl_shutdown() | def close(self): if (isinstance(self.socket, ssl.SSLSocket) and self.socket._sslobj is not None): self._do_ssl_shutdown() | 456,788 |
def test_data_connection(self): # clear text sock = self.client.transfercmd('list') self.assertNotIsInstance(sock, ssl.SSLSocket) sock.close() self.assertEqual(self.client.voidresp(), "226 transfer complete") | def test_data_connection(self): # clear text sock = self.client.transfercmd('list') self.assertNotIsInstance(sock, ssl.SSLSocket) sock.close() self.assertEqual(self.client.voidresp(), "226 transfer complete") | 456,789 |
def test_data_connection(self): # clear text sock = self.client.transfercmd('list') self.assertNotIsInstance(sock, ssl.SSLSocket) sock.close() self.assertEqual(self.client.voidresp(), "226 transfer complete") | def test_data_connection(self): # clear text sock = self.client.transfercmd('list') self.assertNotIsInstance(sock, ssl.SSLSocket) sock.close() self.assertEqual(self.client.voidresp(), "226 transfer complete") | 456,790 |
def test_data_connection(self): # clear text sock = self.client.transfercmd('list') self.assertNotIsInstance(sock, ssl.SSLSocket) sock.close() self.assertEqual(self.client.voidresp(), "226 transfer complete") | def test_data_connection(self): # clear text sock = self.client.transfercmd('list') self.assertNotIsInstance(sock, ssl.SSLSocket) sock.close() self.assertEqual(self.client.voidresp(), "226 transfer complete") | 456,791 |
def tearDown(self): # Get everything back to normal if os.path.exists(_XX_MODULE_PATH): test_support.unload('xx') sys.path[:] = self.sys_path # XXX on Windows the test leaves a directory # with xx module in TEMP shutil.rmtree(self.tmp_dir, os.name == 'nt' or sys.platform == 'cygwin') super(BuildExtTestCase, self).tearD... | def tearDown(self): # Get everything back to normal if os.path.exists(_XX_MODULE_PATH): support.unload('xx') sys.path[:] = self.sys_path # XXX on Windows the test leaves a directory # with xx module in TEMP shutil.rmtree(self.tmp_dir, os.name == 'nt' or sys.platform == 'cygwin') super(BuildExtTestCase, self).tearDown() | 456,792 |
def fcmp(x, y): # fuzzy comparison function if isinstance(x, float) or isinstance(y, float): try: fuzz = (abs(x) + abs(y)) * FUZZ if abs(x-y) <= fuzz: return 0 except: pass elif type(x) == type(y) and isinstance(x, (tuple, list)): for i in range(min(len(x), len(y))): outcome = fcmp(x[i], y[i]) if outcome != 0: return o... | def fcmp(x, y): # fuzzy comparison function if isinstance(x, float) or isinstance(y, float): try: fuzz = (abs(x) + abs(y)) * FUZZ if abs(x-y) <= fuzz: return 0 except: pass elif type(x) == type(y) and isinstance(x, (tuple, list)): for i in range(min(len(x), len(y))): outcome = fcmp(x[i], y[i]) if outcome != 0: return o... | 456,793 |
def fcmp(x, y): # fuzzy comparison function if isinstance(x, float) or isinstance(y, float): try: fuzz = (abs(x) + abs(y)) * FUZZ if abs(x-y) <= fuzz: return 0 except: pass elif type(x) == type(y) and isinstance(x, (tuple, list)): for i in range(min(len(x), len(y))): outcome = fcmp(x[i], y[i]) if outcome != 0: return o... | deffcmp(x,y):#fuzzycomparisonfunctionifisinstance(x,float)orisinstance(y,float):try:fuzz=(abs(x)+abs(y))*FUZZifabs(x-y)<=fuzz:return0except:passeliftype(x)==type(y)andisinstance(x,(tuple,list)):foriinrange(min(len(x),len(y))):outcome=fcmp(x[i],y[i])ifoutcome!=0:returnoutcomereturn(len(x)>len(y))-(len(x)<len(y))return(x... | 456,794 |
def fcmp(x, y): # fuzzy comparison function if isinstance(x, float) or isinstance(y, float): try: fuzz = (abs(x) + abs(y)) * FUZZ if abs(x-y) <= fuzz: return 0 except: pass elif type(x) == type(y) and isinstance(x, (tuple, list)): for i in range(min(len(x), len(y))): outcome = fcmp(x[i], y[i]) if outcome != 0: return o... | def fcmp(x, y): # fuzzy comparison function if isinstance(x, float) or isinstance(y, float): try: fuzz = (abs(x) + abs(y)) * FUZZ if abs(x-y) <= fuzz: return 0 except: pass elif type(x) == type(y) and isinstance(x, (tuple, list)): for i in range(min(len(x), len(y))): outcome = fcmp(x[i], y[i]) if outcome != 0: return o... | 456,795 |
def assertSequenceEqual(self, seq1, seq2, msg=None, seq_type=None): """An equality assertion for ordered sequences (like lists and tuples). | def assertSequenceEqual(self, seq1, seq2, msg=None, seq_type=None): """An equality assertion for ordered sequences (like lists and tuples). | 456,796 |
def nmake(makefile, command="", **kw): defines = ' '.join(k+'='+v for k, v in kw.items()) cmd = NMAKE % (makefile, defines, command) print("\n\n"+cmd+"\n") if os.system(cmd) != 0: raise RuntimeError(cmd) | def nmake(makefile, command="", **kw): defines = ' '.join(k+'='+str(v) for k, v in kw.items()) cmd = NMAKE % (makefile, defines, command) print("\n\n"+cmd+"\n") if os.system(cmd) != 0: raise RuntimeError(cmd) | 456,797 |
def build(platform, clean): if platform == "Win32": dest = os.path.join(ROOT, "tcltk") machine = "X86" elif platform == "AMD64": dest = os.path.join(ROOT, "tcltk64") machine = "AMD64" else: raise ValueError(platform) # TCL tcldir = os.path.join(ROOT, TCL) if 1: os.chdir(os.path.join(tcldir, "win")) if clean: nmake("ma... | def build(platform, clean): if platform == "Win32": dest = os.path.join(ROOT, "tcltk") machine = "X86" elif platform == "AMD64": dest = os.path.join(ROOT, "tcltk64") machine = "AMD64" else: raise ValueError(platform) # TCL tcldir = os.path.join(ROOT, TCL) if 1: os.chdir(os.path.join(tcldir, "win")) if clean: nmake("ma... | 456,798 |
def build(platform, clean): if platform == "Win32": dest = os.path.join(ROOT, "tcltk") machine = "X86" elif platform == "AMD64": dest = os.path.join(ROOT, "tcltk64") machine = "AMD64" else: raise ValueError(platform) # TCL tcldir = os.path.join(ROOT, TCL) if 1: os.chdir(os.path.join(tcldir, "win")) if clean: nmake("ma... | def build(platform, clean): if platform == "Win32": dest = os.path.join(ROOT, "tcltk") machine = "X86" elif platform == "AMD64": dest = os.path.join(ROOT, "tcltk64") machine = "AMD64" else: raise ValueError(platform) # TCL tcldir = os.path.join(ROOT, TCL) if 1: os.chdir(os.path.join(tcldir, "win")) if clean: nmake("ma... | 456,799 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.