rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
"'%s' expects a single <pattern>" %
"'%s' expects <pattern1> <pattern2> ..." %
def read_template (self): """Read and parse the manifest template file named by 'self.template' (usually "MANIFEST.in"). Process all file specifications (include and exclude) in the manifest template and add the resulting filenames to 'self.files'."""
7785de8f7220463bede0b151e88ccf05497d6802 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7785de8f7220463bede0b151e88ccf05497d6802/sdist.py
pattern = native_path (words[1])
pattern_list = map(native_path, words[1:])
def read_template (self): """Read and parse the manifest template file named by 'self.template' (usually "MANIFEST.in"). Process all file specifications (include and exclude) in the manifest template and add the resulting filenames to 'self.files'."""
7785de8f7220463bede0b151e88ccf05497d6802 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7785de8f7220463bede0b151e88ccf05497d6802/sdist.py
if len (words) != 3:
if len (words) < 3:
def read_template (self): """Read and parse the manifest template file named by 'self.template' (usually "MANIFEST.in"). Process all file specifications (include and exclude) in the manifest template and add the resulting filenames to 'self.files'."""
7785de8f7220463bede0b151e88ccf05497d6802 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7785de8f7220463bede0b151e88ccf05497d6802/sdist.py
"'%s' expects <dir> <pattern>" %
"'%s' expects <dir> <pattern1> <pattern2> ..." %
def read_template (self): """Read and parse the manifest template file named by 'self.template' (usually "MANIFEST.in"). Process all file specifications (include and exclude) in the manifest template and add the resulting filenames to 'self.files'."""
7785de8f7220463bede0b151e88ccf05497d6802 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7785de8f7220463bede0b151e88ccf05497d6802/sdist.py
(dir, pattern) = map (native_path, words[1:3])
dir = native_path(words[1]) pattern_list = map (native_path, words[2:])
def read_template (self): """Read and parse the manifest template file named by 'self.template' (usually "MANIFEST.in"). Process all file specifications (include and exclude) in the manifest template and add the resulting filenames to 'self.files'."""
7785de8f7220463bede0b151e88ccf05497d6802 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7785de8f7220463bede0b151e88ccf05497d6802/sdist.py
print "include", pattern files = select_pattern (all_files, pattern, anchor=1) if not files: template.warn ("no files found matching '%s'" % pattern) else: self.files.extend (files)
print "include", string.join(pattern_list) for pattern in pattern_list: files = select_pattern (all_files, pattern, anchor=1) if not files: template.warn ("no files found matching '%s'" % pattern) else: self.files.extend (files)
def read_template (self): """Read and parse the manifest template file named by 'self.template' (usually "MANIFEST.in"). Process all file specifications (include and exclude) in the manifest template and add the resulting filenames to 'self.files'."""
7785de8f7220463bede0b151e88ccf05497d6802 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7785de8f7220463bede0b151e88ccf05497d6802/sdist.py
print "exclude", pattern num = exclude_pattern (self.files, pattern, anchor=1) if num == 0: template.warn \ ("no previously-included files found matching '%s'" % pattern)
print "exclude", string.join(pattern_list) for pattern in pattern_list: num = exclude_pattern (self.files, pattern, anchor=1) if num == 0: template.warn ( "no previously-included files found matching '%s'"% pattern)
def read_template (self): """Read and parse the manifest template file named by 'self.template' (usually "MANIFEST.in"). Process all file specifications (include and exclude) in the manifest template and add the resulting filenames to 'self.files'."""
7785de8f7220463bede0b151e88ccf05497d6802 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7785de8f7220463bede0b151e88ccf05497d6802/sdist.py
print "global-include", pattern files = select_pattern (all_files, pattern, anchor=0) if not files: template.warn (("no files found matching '%s' " + "anywhere in distribution") % pattern) else: self.files.extend (files)
print "global-include", string.join(pattern_list) for pattern in pattern_list: files = select_pattern (all_files, pattern, anchor=0) if not files: template.warn (("no files found matching '%s' " + "anywhere in distribution") % pattern) else: self.files.extend (files)
def read_template (self): """Read and parse the manifest template file named by 'self.template' (usually "MANIFEST.in"). Process all file specifications (include and exclude) in the manifest template and add the resulting filenames to 'self.files'."""
7785de8f7220463bede0b151e88ccf05497d6802 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7785de8f7220463bede0b151e88ccf05497d6802/sdist.py
print "global-exclude", pattern num = exclude_pattern (self.files, pattern, anchor=0) if num == 0: template.warn \ (("no previously-included files matching '%s' " + "found anywhere in distribution") % pattern)
print "global-exclude", string.join(pattern_list) for pattern in pattern_list: num = exclude_pattern (self.files, pattern, anchor=0) if num == 0: template.warn \ (("no previously-included files matching '%s' " + "found anywhere in distribution") % pattern)
def read_template (self): """Read and parse the manifest template file named by 'self.template' (usually "MANIFEST.in"). Process all file specifications (include and exclude) in the manifest template and add the resulting filenames to 'self.files'."""
7785de8f7220463bede0b151e88ccf05497d6802 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7785de8f7220463bede0b151e88ccf05497d6802/sdist.py
print "recursive-include", dir, pattern files = select_pattern (all_files, pattern, prefix=dir) if not files: template.warn (("no files found matching '%s' " + "under directory '%s'") % (pattern, dir)) else: self.files.extend (files)
print "recursive-include", dir, string.join(pattern_list) for pattern in pattern_list: files = select_pattern (all_files, pattern, prefix=dir) if not files: template.warn (("no files found matching '%s' " + "under directory '%s'") % (pattern, dir)) else: self.files.extend (files)
def read_template (self): """Read and parse the manifest template file named by 'self.template' (usually "MANIFEST.in"). Process all file specifications (include and exclude) in the manifest template and add the resulting filenames to 'self.files'."""
7785de8f7220463bede0b151e88ccf05497d6802 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7785de8f7220463bede0b151e88ccf05497d6802/sdist.py
print "recursive-exclude", dir, pattern num = exclude_pattern (self.files, pattern, prefix=dir) if num == 0: template.warn \ (("no previously-included files matching '%s' " + "found under directory '%s'") % (pattern, dir))
print "recursive-exclude", dir, string.join(pattern_list) for pattern in pattern_list: num = exclude_pattern (self.files, pattern, prefix=dir) if num == 0: template.warn \ (("no previously-included files matching '%s' " + "found under directory '%s'") % (pattern, dir))
def read_template (self): """Read and parse the manifest template file named by 'self.template' (usually "MANIFEST.in"). Process all file specifications (include and exclude) in the manifest template and add the resulting filenames to 'self.files'."""
7785de8f7220463bede0b151e88ccf05497d6802 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7785de8f7220463bede0b151e88ccf05497d6802/sdist.py
file(foo_path, 'w').close() file(bar_path, 'w').close()
f = open(foo_path, 'w') f.write("@") f.close() f = open(bar_path, 'w') f.write("@") f.close()
def test_clean(self): # Remove old files from 'tmp' foo_path = os.path.join(self._path, 'tmp', 'foo') bar_path = os.path.join(self._path, 'tmp', 'bar') file(foo_path, 'w').close() file(bar_path, 'w').close() self._box.clean() self.assert_(os.path.exists(foo_path)) self.assert_(os.path.exists(bar_path)) foo_stat = os.st...
73eb0b8f98d27e223842cf2f3e91eea7f07f9aa9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/73eb0b8f98d27e223842cf2f3e91eea7f07f9aa9/test_mailbox.py
os.utime(os.path.join(foo_path), (time.time() - 129600 - 2, foo_stat.st_mtime))
os.utime(foo_path, (time.time() - 129600 - 2, foo_stat.st_mtime))
def test_clean(self): # Remove old files from 'tmp' foo_path = os.path.join(self._path, 'tmp', 'foo') bar_path = os.path.join(self._path, 'tmp', 'bar') file(foo_path, 'w').close() file(bar_path, 'w').close() self._box.clean() self.assert_(os.path.exists(foo_path)) self.assert_(os.path.exists(bar_path)) foo_stat = os.st...
73eb0b8f98d27e223842cf2f3e91eea7f07f9aa9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/73eb0b8f98d27e223842cf2f3e91eea7f07f9aa9/test_mailbox.py
st = os.lstat(name)
try: st = os.lstat(name) except os.error: continue
def walk(top, func, arg): """walk(top,func,arg) calls func(arg, d, files) for each directory "d" in the tree rooted at "top" (including "top" itself). "files" is a list of all the files and subdirs in directory "d". """ try: names = os.listdir(top) except os.error: return func(arg, top, names) for name in names: name...
be2386a78ff96bdb99aefc65ff88deb77082b263 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/be2386a78ff96bdb99aefc65ff88deb77082b263/posixpath.py
s = "Module(%r" % % (self.__name__,)
s = "Module(%r" % (self.__name__,)
def __repr__(self): s = "Module(%r" % % (self.__name__,) if self.__file__ is not None: s = s + ", %r" % (self.__file__,) if self.__path__ is not None: s = s + ", %r" % (self.__path__,) s = s + ")" return s
e8d687d2d718dee4719309c71901b90ba5257b2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e8d687d2d718dee4719309c71901b90ba5257b2b/modulefinder.py
(run, run == 1 and "" or "s", timeTaken))
(run, run != 1 and "s" or "", timeTaken))
def run(self, test): "Run the given test case or test suite." result = self._makeResult() startTime = time.time() test(result) stopTime = time.time() timeTaken = float(stopTime - startTime) result.printErrors() self.stream.writeln(result.separator2) run = result.testsRun self.stream.writeln("Ran %d test%s in %.3fs" % (...
c9090b797e8783c5513320e895f6ed4dfd727a83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c9090b797e8783c5513320e895f6ed4dfd727a83/unittest.py
def IN_CLASSA(a): return ((((in_addr_t)(a)) & 0x80000000) == 0) IN_CLASSA_NET = 0xff000000
def IN_CLASSA(a): return ((((in_addr_t)(a)) & (-2147483648)) == 0) IN_CLASSA_NET = (-16777216)
def IN_CLASSA(a): return ((((in_addr_t)(a)) & 0x80000000) == 0)
ba2ec76d10f9c4338d59e69ea18f8e4ee47acb39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ba2ec76d10f9c4338d59e69ea18f8e4ee47acb39/IN.py
IN_CLASSA_HOST = (0xffffffff & ~IN_CLASSA_NET)
IN_CLASSA_HOST = ((-1) & ~IN_CLASSA_NET)
def IN_CLASSA(a): return ((((in_addr_t)(a)) & 0x80000000) == 0)
ba2ec76d10f9c4338d59e69ea18f8e4ee47acb39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ba2ec76d10f9c4338d59e69ea18f8e4ee47acb39/IN.py
def IN_CLASSB(a): return ((((in_addr_t)(a)) & 0xc0000000) == 0x80000000) IN_CLASSB_NET = 0xffff0000
def IN_CLASSB(a): return ((((in_addr_t)(a)) & (-1073741824)) == (-2147483648)) IN_CLASSB_NET = (-65536)
def IN_CLASSB(a): return ((((in_addr_t)(a)) & 0xc0000000) == 0x80000000)
ba2ec76d10f9c4338d59e69ea18f8e4ee47acb39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ba2ec76d10f9c4338d59e69ea18f8e4ee47acb39/IN.py
IN_CLASSB_HOST = (0xffffffff & ~IN_CLASSB_NET)
IN_CLASSB_HOST = ((-1) & ~IN_CLASSB_NET)
def IN_CLASSB(a): return ((((in_addr_t)(a)) & 0xc0000000) == 0x80000000)
ba2ec76d10f9c4338d59e69ea18f8e4ee47acb39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ba2ec76d10f9c4338d59e69ea18f8e4ee47acb39/IN.py
def IN_CLASSC(a): return ((((in_addr_t)(a)) & 0xe0000000) == 0xc0000000) IN_CLASSC_NET = 0xffffff00
def IN_CLASSC(a): return ((((in_addr_t)(a)) & (-536870912)) == (-1073741824)) IN_CLASSC_NET = (-256)
def IN_CLASSC(a): return ((((in_addr_t)(a)) & 0xe0000000) == 0xc0000000)
ba2ec76d10f9c4338d59e69ea18f8e4ee47acb39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ba2ec76d10f9c4338d59e69ea18f8e4ee47acb39/IN.py
IN_CLASSC_HOST = (0xffffffff & ~IN_CLASSC_NET) def IN_CLASSD(a): return ((((in_addr_t)(a)) & 0xf0000000) == 0xe0000000)
IN_CLASSC_HOST = ((-1) & ~IN_CLASSC_NET) def IN_CLASSD(a): return ((((in_addr_t)(a)) & (-268435456)) == (-536870912))
def IN_CLASSC(a): return ((((in_addr_t)(a)) & 0xe0000000) == 0xc0000000)
ba2ec76d10f9c4338d59e69ea18f8e4ee47acb39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ba2ec76d10f9c4338d59e69ea18f8e4ee47acb39/IN.py
def IN_EXPERIMENTAL(a): return ((((in_addr_t)(a)) & 0xe0000000) == 0xe0000000) def IN_BADCLASS(a): return ((((in_addr_t)(a)) & 0xf0000000) == 0xf0000000)
def IN_EXPERIMENTAL(a): return ((((in_addr_t)(a)) & (-536870912)) == (-536870912)) def IN_BADCLASS(a): return ((((in_addr_t)(a)) & (-268435456)) == (-268435456))
def IN_EXPERIMENTAL(a): return ((((in_addr_t)(a)) & 0xe0000000) == 0xe0000000)
ba2ec76d10f9c4338d59e69ea18f8e4ee47acb39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ba2ec76d10f9c4338d59e69ea18f8e4ee47acb39/IN.py
PATH_MAX = 4095
PATH_MAX = 4096
def IN_BADCLASS(a): return ((((in_addr_t)(a)) & 0xf0000000) == 0xf0000000)
ba2ec76d10f9c4338d59e69ea18f8e4ee47acb39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ba2ec76d10f9c4338d59e69ea18f8e4ee47acb39/IN.py
SSIZE_MAX = INT_MAX
SSIZE_MAX = LONG_MAX
def IN_BADCLASS(a): return ((((in_addr_t)(a)) & 0xf0000000) == 0xf0000000)
ba2ec76d10f9c4338d59e69ea18f8e4ee47acb39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ba2ec76d10f9c4338d59e69ea18f8e4ee47acb39/IN.py
FILENAME_MAX = 4095
FILENAME_MAX = 4096
def IN_BADCLASS(a): return ((((in_addr_t)(a)) & 0xf0000000) == 0xf0000000)
ba2ec76d10f9c4338d59e69ea18f8e4ee47acb39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ba2ec76d10f9c4338d59e69ea18f8e4ee47acb39/IN.py
fp = open(pathname)
fp = open(pathname, "U")
def run_script(self, pathname): self.msg(2, "run_script", pathname) fp = open(pathname) stuff = ("", "r", imp.PY_SOURCE) self.load_module('__main__', fp, pathname, stuff)
4ee1ef3dd1d558b6a33319bfe8427b4694a63c3c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4ee1ef3dd1d558b6a33319bfe8427b4694a63c3c/modulefinder.py
fp = open(pathname)
fp = open(pathname, "U")
def load_file(self, pathname): dir, name = os.path.split(pathname) name, ext = os.path.splitext(name) fp = open(pathname) stuff = (ext, "r", imp.PY_SOURCE) self.load_module(name, fp, pathname, stuff)
4ee1ef3dd1d558b6a33319bfe8427b4694a63c3c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4ee1ef3dd1d558b6a33319bfe8427b4694a63c3c/modulefinder.py
args['linker_so'] = linker_so + ' -shared'
if platform == 'darwin1': args['linker_so'] = linker_so else: args['linker_so'] = linker_so + ' -shared'
def build_extensions(self):
33cafcef92f47d66cfd0b01b0665602c06b1b5bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/33cafcef92f47d66cfd0b01b0665602c06b1b5bb/setup.py
self.read_multi()
self.read_multi(environ, keep_blank_values, strict_parsing)
def __init__(self, fp=None, headers=None, outerboundary="", environ=os.environ, keep_blank_values=0, strict_parsing=0): """Constructor. Read multipart/* until last part.
8c2f5c340a8c2b8b298a0a2b60af4ec7a5210dcd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8c2f5c340a8c2b8b298a0a2b60af4ec7a5210dcd/cgi.py
def read_multi(self):
def read_multi(self, environ, keep_blank_values, strict_parsing):
def read_multi(self): """Internal: read a part that is itself multipart.""" self.list = [] part = self.__class__(self.fp, {}, self.innerboundary) # Throw first part away while not part.done: headers = rfc822.Message(self.fp) part = self.__class__(self.fp, headers, self.innerboundary) self.list.append(part) self.skip_li...
8c2f5c340a8c2b8b298a0a2b60af4ec7a5210dcd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8c2f5c340a8c2b8b298a0a2b60af4ec7a5210dcd/cgi.py
part = self.__class__(self.fp, {}, self.innerboundary)
part = self.__class__(self.fp, {}, self.innerboundary, environ, keep_blank_values, strict_parsing)
def read_multi(self): """Internal: read a part that is itself multipart.""" self.list = [] part = self.__class__(self.fp, {}, self.innerboundary) # Throw first part away while not part.done: headers = rfc822.Message(self.fp) part = self.__class__(self.fp, headers, self.innerboundary) self.list.append(part) self.skip_li...
8c2f5c340a8c2b8b298a0a2b60af4ec7a5210dcd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8c2f5c340a8c2b8b298a0a2b60af4ec7a5210dcd/cgi.py
part = self.__class__(self.fp, headers, self.innerboundary)
part = self.__class__(self.fp, headers, self.innerboundary, environ, keep_blank_values, strict_parsing)
def read_multi(self): """Internal: read a part that is itself multipart.""" self.list = [] part = self.__class__(self.fp, {}, self.innerboundary) # Throw first part away while not part.done: headers = rfc822.Message(self.fp) part = self.__class__(self.fp, headers, self.innerboundary) self.list.append(part) self.skip_li...
8c2f5c340a8c2b8b298a0a2b60af4ec7a5210dcd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8c2f5c340a8c2b8b298a0a2b60af4ec7a5210dcd/cgi.py
tests = [ GeneralModuleTests, BasicTCPTest ]
tests = [GeneralModuleTests, BasicTCPTest, TCPTimeoutTest, TestExceptions]
def test_main(): tests = [ GeneralModuleTests, BasicTCPTest ] if sys.platform != 'mac': tests.append(BasicUDPTest) tests.extend([ NonBlockingTCPTests, FileObjectClassTestCase, UnbufferedFileObjectClassTestCase, LineBufferedFileObjectClassTestCase, SmallBufferedFileObjectClassTestCase ]) test_support.run_unittest(*test...
9fe634bdb733df3f7f46827a1e06bfe493fa4afa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9fe634bdb733df3f7f46827a1e06bfe493fa4afa/test_socket.py
tests.append(BasicUDPTest)
tests.extend([ BasicUDPTest, UDPTimeoutTest ])
def test_main(): tests = [ GeneralModuleTests, BasicTCPTest ] if sys.platform != 'mac': tests.append(BasicUDPTest) tests.extend([ NonBlockingTCPTests, FileObjectClassTestCase, UnbufferedFileObjectClassTestCase, LineBufferedFileObjectClassTestCase, SmallBufferedFileObjectClassTestCase ]) test_support.run_unittest(*test...
9fe634bdb733df3f7f46827a1e06bfe493fa4afa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9fe634bdb733df3f7f46827a1e06bfe493fa4afa/test_socket.py
user_pass = base64.encodestring(unquote(user_pass)).strip() req.add_header('Proxy-Authorization', 'Basic '+user_pass)
if ':' in user_pass: user, password = user_pass.split(':', 1) user_pass = base64.encodestring('%s:%s' % (unquote(user), unquote(password))) req.add_header('Proxy-Authorization', 'Basic ' + user_pass)
def proxy_open(self, req, proxy, type): orig_type = req.get_type() type, r_type = splittype(proxy) host, XXX = splithost(r_type) if '@' in host: user_pass, host = host.split('@', 1) user_pass = base64.encodestring(unquote(user_pass)).strip() req.add_header('Proxy-Authorization', 'Basic '+user_pass) host = unquote(host)...
24f50e1cdabb0d34e5682a337a24510d83e93224 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/24f50e1cdabb0d34e5682a337a24510d83e93224/urllib2.py
h.putheader('Host', host)
scheme, sel = splittype(req.get_selector()) sel_host, sel_path = splithost(sel) h.putheader('Host', sel_host or host)
def do_open(self, http_class, req): host = req.get_host() if not host: raise URLError('no host given')
24f50e1cdabb0d34e5682a337a24510d83e93224 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/24f50e1cdabb0d34e5682a337a24510d83e93224/urllib2.py
print "open", askopenfilename(filetypes=[("all filez", "*")]).encode(enc)
print "open", askopenfilename(filetypes=[("all files", "*")]).encode(enc)
def askdirectory (**options): "Ask for a directory, and return the file name" return Directory(**options).show()
74c94771d2936383f0e28e732dfaf5b272657cc8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/74c94771d2936383f0e28e732dfaf5b272657cc8/tkFileDialog.py
def _get_fqdn_hostname(name):
def make_fqdn(name = ''): """Get fully qualified domain name from name. An empty argument is interpreted as meaning the local host. First the hostname returned by socket.gethostbyaddr() is checked, then possibly existing aliases. In case no FQDN is available, hostname is returned. """
def _get_fqdn_hostname(name): name = string.strip(name) if len(name) == 0: name = socket.gethostname() try: hostname, aliases, ipaddrs = socket.gethostbyaddr(name) except socket.error: pass else: aliases.insert(0, hostname) for name in aliases: if '.' in name: break else: name = hostname return name
6336fd70c874a59be27eac693f6bcb58b76bdad9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6336fd70c874a59be27eac693f6bcb58b76bdad9/smtplib.py
try: hostname, aliases, ipaddrs = socket.gethostbyaddr(name) except socket.error: pass
try: hostname, aliases, ipaddrs = socket.gethostbyaddr(name) except socket.error: pass else: aliases.insert(0, hostname) for name in aliases: if '.' in name: break
def _get_fqdn_hostname(name): name = string.strip(name) if len(name) == 0: name = socket.gethostname() try: hostname, aliases, ipaddrs = socket.gethostbyaddr(name) except socket.error: pass else: aliases.insert(0, hostname) for name in aliases: if '.' in name: break else: name = hostname return name
6336fd70c874a59be27eac693f6bcb58b76bdad9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6336fd70c874a59be27eac693f6bcb58b76bdad9/smtplib.py
aliases.insert(0, hostname) for name in aliases: if '.' in name: break else: name = hostname
name = hostname
def _get_fqdn_hostname(name): name = string.strip(name) if len(name) == 0: name = socket.gethostname() try: hostname, aliases, ipaddrs = socket.gethostbyaddr(name) except socket.error: pass else: aliases.insert(0, hostname) for name in aliases: if '.' in name: break else: name = hostname return name
6336fd70c874a59be27eac693f6bcb58b76bdad9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6336fd70c874a59be27eac693f6bcb58b76bdad9/smtplib.py
self.putcmd("helo", _get_fqdn_hostname(name))
if name: self.putcmd("helo", name) else: self.putcmd("helo", make_fqdn())
def helo(self, name=''): """SMTP 'helo' command. Hostname to send for this command defaults to the FQDN of the local host. """ self.putcmd("helo", _get_fqdn_hostname(name)) (code,msg)=self.getreply() self.helo_resp=msg return (code,msg)
6336fd70c874a59be27eac693f6bcb58b76bdad9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6336fd70c874a59be27eac693f6bcb58b76bdad9/smtplib.py
self.putcmd("ehlo", _get_fqdn_hostname(name))
if name: self.putcmd("ehlo", name) else: self.putcmd("ehlo", make_fqdn())
def ehlo(self, name=''): """ SMTP 'ehlo' command. Hostname to send for this command defaults to the FQDN of the local host. """ self.putcmd("ehlo", _get_fqdn_hostname(name)) (code,msg)=self.getreply() # According to RFC1869 some (badly written) # MTA's will disconnect on an ehlo. Toss an exception if # that happens -dd...
6336fd70c874a59be27eac693f6bcb58b76bdad9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6336fd70c874a59be27eac693f6bcb58b76bdad9/smtplib.py
tagName = self._current_context[uri] + ":" + localname
prefix = self._current_context[uri] if prefix: tagName = prefix + ":" + localname else: tagName = localname
def startElementNS(self, name, tagName , attrs): uri, localname = name if uri: # When using namespaces, the reader may or may not # provide us with the original name. If not, create # *a* valid tagName from the current context. if tagName is None: tagName = self._current_context[uri] + ":" + localname node = self.docum...
5ff09bc4d6ce4372af9af0795cfdca2510cb97e6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5ff09bc4d6ce4372af9af0795cfdca2510cb97e6/pulldom.py
qname = self._current_context[a_uri] + ":" + a_localname
prefix = self._current_context[a_uri] if prefix: qname = prefix + ":" + a_localname else: qname = a_localname
def startElementNS(self, name, tagName , attrs): uri, localname = name if uri: # When using namespaces, the reader may or may not # provide us with the original name. If not, create # *a* valid tagName from the current context. if tagName is None: tagName = self._current_context[uri] + ":" + localname node = self.docum...
5ff09bc4d6ce4372af9af0795cfdca2510cb97e6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5ff09bc4d6ce4372af9af0795cfdca2510cb97e6/pulldom.py
for attr in dir(self.metadata): meth_name = "get_" + attr setattr(self, meth_name, getattr(self.metadata, meth_name))
method_basenames = dir(self.metadata) + \ ['fullname', 'contact', 'contact_email'] for basename in method_basenames: method_name = "get_" + basename setattr(self, method_name, getattr(self.metadata, method_name))
def __init__ (self, attrs=None): """Construct a new Distribution instance: initialize all the attributes of a Distribution, and then uses 'attrs' (a dictionary mapping attribute names to values) to assign some of those attributes their "real" values. (Any attributes not mentioned in 'attrs' will be assigned to some nu...
0c03088e69e806e194434adc9bb6785d023a1b9f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0c03088e69e806e194434adc9bb6785d023a1b9f/dist.py
register("gnome", None, BackgroundBrowser(commd))
register("gnome", None, BackgroundBrowser(commd.split()))
def register_X_browsers(): # The default Gnome browser if _iscommand("gconftool-2"): # get the web browser string from gconftool gc = 'gconftool-2 -g /desktop/gnome/url-handlers/http/command 2>/dev/null' out = os.popen(gc) commd = out.read().strip() retncode = out.close() # if successful, register it if retncode is No...
648c2ef01d5c332f809d809cd346990687d9960c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/648c2ef01d5c332f809d809cd346990687d9960c/webbrowser.py
pdir = self.package_dir.get('') if pdir is not None: tail.insert(0, pdir)
def get_package_dir (self, package): """Return the directory, relative to the top of the source distribution, where package 'package' should be found (at least according to the 'package_dir' option, if any)."""
5402f4d122edbc3d52589a84b5f6610895a5ed71 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5402f4d122edbc3d52589a84b5f6610895a5ed71/build_py.py
if not os.path.isfile (init_py):
if os.path.isfile (init_py): return init_py else:
def check_package (self, package, package_dir):
5402f4d122edbc3d52589a84b5f6610895a5ed71 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5402f4d122edbc3d52589a84b5f6610895a5ed71/build_py.py
def find_modules (self): # Map package names to tuples of useful info about the package: # (package_dir, checked) # package_dir - the directory where we'll find source files for # this package # checked - true if we have checked that the package directory # is valid (exists, contains __init__.py, ... ?) packages...
5402f4d122edbc3d52589a84b5f6610895a5ed71 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5402f4d122edbc3d52589a84b5f6610895a5ed71/build_py.py
self.check_package (package, package_dir)
init_py = self.check_package (package, package_dir)
def find_modules (self): # Map package names to tuples of useful info about the package: # (package_dir, checked) # package_dir - the directory where we'll find source files for # this package # checked - true if we have checked that the package directory # is valid (exists, contains __init__.py, ... ?) packages...
5402f4d122edbc3d52589a84b5f6610895a5ed71 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5402f4d122edbc3d52589a84b5f6610895a5ed71/build_py.py
modules.append ((package, module, module_file))
modules.append ((package, module_base, module_file))
def find_modules (self): # Map package names to tuples of useful info about the package: # (package_dir, checked) # package_dir - the directory where we'll find source files for # this package # checked - true if we have checked that the package directory # is valid (exists, contains __init__.py, ... ?) packages...
5402f4d122edbc3d52589a84b5f6610895a5ed71 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5402f4d122edbc3d52589a84b5f6610895a5ed71/build_py.py
self._out.write('<?xml version="1.0" encoding="%s"?>\n' %
self._write('<?xml version="1.0" encoding="%s"?>\n' %
def startDocument(self): self._out.write('<?xml version="1.0" encoding="%s"?>\n' % self._encoding)
cb328763261cc3b346c08d4105ffc5bb02350316 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cb328763261cc3b346c08d4105ffc5bb02350316/saxutils.py
self._out.write('<' + name)
self._write('<' + name)
def startElement(self, name, attrs): self._out.write('<' + name) for (name, value) in attrs.items(): self._out.write(' %s=%s' % (name, quoteattr(value))) self._out.write('>')
cb328763261cc3b346c08d4105ffc5bb02350316 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cb328763261cc3b346c08d4105ffc5bb02350316/saxutils.py
self._out.write(' %s=%s' % (name, quoteattr(value))) self._out.write('>')
self._write(' %s=%s' % (name, quoteattr(value))) self._write('>')
def startElement(self, name, attrs): self._out.write('<' + name) for (name, value) in attrs.items(): self._out.write(' %s=%s' % (name, quoteattr(value))) self._out.write('>')
cb328763261cc3b346c08d4105ffc5bb02350316 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cb328763261cc3b346c08d4105ffc5bb02350316/saxutils.py
self._out.write('</%s>' % name)
self._write('</%s>' % name)
def endElement(self, name): self._out.write('</%s>' % name)
cb328763261cc3b346c08d4105ffc5bb02350316 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cb328763261cc3b346c08d4105ffc5bb02350316/saxutils.py
self._out.write('<' + name)
self._write('<' + name)
def startElementNS(self, name, qname, attrs): if name[0] is None: # if the name was not namespace-scoped, use the unqualified part name = name[1] else: # else try to restore the original prefix from the namespace name = self._current_context[name[0]] + ":" + name[1] self._out.write('<' + name)
cb328763261cc3b346c08d4105ffc5bb02350316 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cb328763261cc3b346c08d4105ffc5bb02350316/saxutils.py
self._out.write(' xmlns:%s="%s"' % pair)
self._write(' xmlns:%s="%s"' % pair)
def startElementNS(self, name, qname, attrs): if name[0] is None: # if the name was not namespace-scoped, use the unqualified part name = name[1] else: # else try to restore the original prefix from the namespace name = self._current_context[name[0]] + ":" + name[1] self._out.write('<' + name)
cb328763261cc3b346c08d4105ffc5bb02350316 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cb328763261cc3b346c08d4105ffc5bb02350316/saxutils.py
self._out.write(' %s=%s' % (name, quoteattr(value))) self._out.write('>')
self._write(' %s=%s' % (name, quoteattr(value))) self._write('>')
def startElementNS(self, name, qname, attrs): if name[0] is None: # if the name was not namespace-scoped, use the unqualified part name = name[1] else: # else try to restore the original prefix from the namespace name = self._current_context[name[0]] + ":" + name[1] self._out.write('<' + name)
cb328763261cc3b346c08d4105ffc5bb02350316 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cb328763261cc3b346c08d4105ffc5bb02350316/saxutils.py
self._out.write('</%s>' % name)
self._write('</%s>' % name)
def endElementNS(self, name, qname): if name[0] is None: name = name[1] else: name = self._current_context[name[0]] + ":" + name[1] self._out.write('</%s>' % name)
cb328763261cc3b346c08d4105ffc5bb02350316 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cb328763261cc3b346c08d4105ffc5bb02350316/saxutils.py
self._out.write(escape(content))
self._write(escape(content))
def characters(self, content): self._out.write(escape(content))
cb328763261cc3b346c08d4105ffc5bb02350316 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cb328763261cc3b346c08d4105ffc5bb02350316/saxutils.py
self._out.write(content)
self._write(content)
def ignorableWhitespace(self, content): self._out.write(content)
cb328763261cc3b346c08d4105ffc5bb02350316 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cb328763261cc3b346c08d4105ffc5bb02350316/saxutils.py
self._out.write('<?%s %s?>' % (target, data))
self._write('<?%s %s?>' % (target, data))
def processingInstruction(self, target, data): self._out.write('<?%s %s?>' % (target, data))
cb328763261cc3b346c08d4105ffc5bb02350316 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cb328763261cc3b346c08d4105ffc5bb02350316/saxutils.py
prefix = None exec_prefix = None extensions = [] path = sys.path odir = '' frozen_c = 'frozen.c' config_c = 'config.c' target = 'a.out' makefile = 'Makefile' try: opts, args = getopt.getopt(sys.argv[1:], 'he:o:p:P:') except getopt.error, msg: usage('getopt error: ' + str(msg)) for o, a in opts: if o == '-h': pri...
prefix = None exec_prefix = None extensions = [] path = sys.path odir = '' frozen_c = 'frozen.c' config_c = 'config.c' target = 'a.out' makefile = 'Makefile' try: opts, args = getopt.getopt(sys.argv[1:], 'he:o:p:P:') except getopt.error, msg: usage('getopt error: ' + str(msg)) for o, a in opts: if o == '-h': pri...
def main(): # overridable context prefix = None # settable with -p option exec_prefix = None # settable with -P option extensions = [] path = sys.path odir = '' # output files frozen_c = 'frozen.c' config_c = 'config.c' target = 'a.out' # normally derived from script name makefile = 'Makefile' # parse command lin...
5b6f0d3a973fb20478c1fcb9a2f5e1d27d59780d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5b6f0d3a973fb20478c1fcb9a2f5e1d27d59780d/freeze.py
raise TestFailed, 'zip() - no args, expected TypeError, got', e
raise TestFailed, 'zip() - no args, expected TypeError, got %s' % e
def __getitem__(self, i): if i < 0 or i > 2: raise IndexError return i + 4
205b98d73507f9524785c43fda7b256370bee4dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/205b98d73507f9524785c43fda7b256370bee4dd/test_b2.py
raise TestFailed, 'zip(None) - expected TypeError, got', e
raise TestFailed, 'zip(None) - expected TypeError, got %s' % e
def __getitem__(self, i): if i < 0 or i > 2: raise IndexError return i + 4
205b98d73507f9524785c43fda7b256370bee4dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/205b98d73507f9524785c43fda7b256370bee4dd/test_b2.py
next = self.index(mark + " lineend +1c")
next = self.index(mark + "+%d lines linestart" % lines_to_get) lines_to_get = min(lines_to_get * 2, 100)
def recolorize_main(self): next = "1.0" was_ok = is_ok = 0 while 1: item = self.tag_nextrange("TODO", next) if not item: break head, tail = item self.tag_remove("SYNC", head, tail) item = self.tag_prevrange("SYNC", head) if item: head = item[1] else: head = "1.0"
cb67406539fe4cd249d3b8bf2a97caea3ce2f4d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cb67406539fe4cd249d3b8bf2a97caea3ce2f4d1/ColorDelegator.py
for filename in self._built_objects: os.remove(filename)
try: for filename in self._built_objects: os.remove(filename) except AttributeError: self.announce('unable to remove files (ignored)')
def build_extension(self, ext):
4443cef42903d2208a83708ceb5d977739e748ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4443cef42903d2208a83708ceb5d977739e748ad/setup.py
extra_link_args=['-framework', 'Carbon']) )
extra_link_args=['-framework', 'Carbon']) )
def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
4443cef42903d2208a83708ceb5d977739e748ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4443cef42903d2208a83708ceb5d977739e748ad/setup.py
verify(C.__dynamic__ == 0)
verify(S.__dynamic__ == 0)
def dynamics(): if verbose: print "Testing __dynamic__..." verify(object.__dynamic__ == 0) verify(list.__dynamic__ == 0) class S1: __metaclass__ = type verify(S1.__dynamic__ == 0) class S(object): pass verify(C.__dynamic__ == 0) class D(object): __dynamic__ = 1 verify(D.__dynamic__ == 1) class E(D, S): pass verify(E.__...
2dfc084d606c095a06b54df5653ff5547df6278f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2dfc084d606c095a06b54df5653ff5547df6278f/test_descr.py
_sys.stderr.write("Exception in thread %s:\n%s\n" % (self.getName(), _format_exc()))
if _sys: _sys.stderr.write("Exception in thread %s:\n%s\n" % (self.getName(), _format_exc())) else: exc_type, exc_value, exc_tb = self.__exc_info() try: print>>self.__stderr, ( "Exception in thread " + self.getName() + " (most likely raised during interpreter shutdown):") print>>self.__stderr, ( "Traceback (most...
def __bootstrap(self): try: self.__started = True _active_limbo_lock.acquire() _active[_get_ident()] = self del _limbo[self] _active_limbo_lock.release() if __debug__: self._note("%s.__bootstrap(): thread started", self)
f19394c50b0e4e0f769fd0130d8072c788c15d8c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f19394c50b0e4e0f769fd0130d8072c788c15d8c/threading.py
def _show(title=None, message=None, icon=None, type=None, **options): if icon: options["icon"] = icon if type: options["type"] = type
def _show(title=None, message=None, _icon=None, _type=None, **options): if _icon and "icon" not in options: options["icon"] = _icon if _type and "type" not in options: options["type"] = _type
def _show(title=None, message=None, icon=None, type=None, **options): if icon: options["icon"] = icon if type: options["type"] = type if title: options["title"] = title if message: options["message"] = message res = Message(**options).show() # In some Tcl installations, Tcl converts yes/no into a boolean if isi...
6ad37b01855af6761450093d9ff191fc942baf59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6ad37b01855af6761450093d9ff191fc942baf59/tkMessageBox.py
continuation_ws=' '):
continuation_ws=' ', errors='strict'):
def __init__(self, s=None, charset=None, maxlinelen=None, header_name=None, continuation_ws=' '): """Create a MIME-compliant header that can contain many character sets.
58fe1f327c7b6be9da8aa1d114c89b52f258ed8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58fe1f327c7b6be9da8aa1d114c89b52f258ed8b/Header.py
self.append(s, charset)
self.append(s, charset, errors)
def __init__(self, s=None, charset=None, maxlinelen=None, header_name=None, continuation_ws=' '): """Create a MIME-compliant header that can contain many character sets.
58fe1f327c7b6be9da8aa1d114c89b52f258ed8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58fe1f327c7b6be9da8aa1d114c89b52f258ed8b/Header.py
def append(self, s, charset=None):
def append(self, s, charset=None, errors='strict'):
def append(self, s, charset=None): """Append a string to the MIME header.
58fe1f327c7b6be9da8aa1d114c89b52f258ed8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58fe1f327c7b6be9da8aa1d114c89b52f258ed8b/Header.py
ustr = unicode(s, incodec)
ustr = unicode(s, incodec, errors)
def append(self, s, charset=None): """Append a string to the MIME header.
58fe1f327c7b6be9da8aa1d114c89b52f258ed8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58fe1f327c7b6be9da8aa1d114c89b52f258ed8b/Header.py
ustr.encode(outcodec)
ustr.encode(outcodec, errors)
def append(self, s, charset=None): """Append a string to the MIME header.
58fe1f327c7b6be9da8aa1d114c89b52f258ed8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58fe1f327c7b6be9da8aa1d114c89b52f258ed8b/Header.py
s = s.encode(outcodec)
s = s.encode(outcodec, errors)
def append(self, s, charset=None): """Append a string to the MIME header.
58fe1f327c7b6be9da8aa1d114c89b52f258ed8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58fe1f327c7b6be9da8aa1d114c89b52f258ed8b/Header.py
def _ipaddress(str): if type(str) == type(1): return str # Already numeric ptr = macdnr.StrToAddr(str) ptr.wait() return ptr.ip0
11d04fc12e97058f34ccf6e60302ab05c5116df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11d04fc12e97058f34ccf6e60302ab05c5116df5/socket.py
def gethostbyname(str): id = _ipaddress(str) return macdnr.AddrToStr(id)
11d04fc12e97058f34ccf6e60302ab05c5116df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11d04fc12e97058f34ccf6e60302ab05c5116df5/socket.py
def _gethostaddress(): global _myaddrstr if _myaddrstr == None: id = _myipaddress() _myaddrstr = macdnr.AddrToStr(id) return _myaddrstr
11d04fc12e97058f34ccf6e60302ab05c5116df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11d04fc12e97058f34ccf6e60302ab05c5116df5/socket.py
raise my_error, 'Protocol family not supported'
raise my_error, 'Protocol family %d not supported' % type
def socket(family, type, *which): if family <> AF_INET: raise my_error, 'Protocol family not supported' if type == SOCK_DGRAM: return _udpsocket() elif type == SOCK_STREAM: return _tcpsocket() raise my_error, 'Protocol type not supported'
11d04fc12e97058f34ccf6e60302ab05c5116df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11d04fc12e97058f34ccf6e60302ab05c5116df5/socket.py
raise my_error, 'Protocol type not supported'
raise my_error, 'Protocol type %d not supported' % type
def socket(family, type, *which): if family <> AF_INET: raise my_error, 'Protocol family not supported' if type == SOCK_DGRAM: return _udpsocket() elif type == SOCK_STREAM: return _tcpsocket() raise my_error, 'Protocol type not supported'
11d04fc12e97058f34ccf6e60302ab05c5116df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11d04fc12e97058f34ccf6e60302ab05c5116df5/socket.py
def fromfd(*args): raise my_error, 'Operation not supported on a mac'
11d04fc12e97058f34ccf6e60302ab05c5116df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11d04fc12e97058f34ccf6e60302ab05c5116df5/socket.py
def accept(self, *args):
def unsupported(self, *args):
def accept(self, *args): raise my_error, 'Operation not supported on this socket'
11d04fc12e97058f34ccf6e60302ab05c5116df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11d04fc12e97058f34ccf6e60302ab05c5116df5/socket.py
bind = accept close = accept connect = accept fileno = accept getpeername = accept getsockname = accept getsockopt = accept listen = accept recv = accept recvfrom = accept send = accept sendto = accept setblocking = accept setsockopt = accept shutdown = accept
accept = unsupported bind = unsupported close = unsupported connect = unsupported fileno = unsupported getpeername = unsupported getsockname = unsupported getsockopt = unsupported listen = unsupported recv = unsupported recvfrom = unsupported send = unsupported sendto = unsupported setblocking = unsupported setsockopt...
def accept(self, *args): raise my_error, 'Operation not supported on this socket'
11d04fc12e97058f34ccf6e60302ab05c5116df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11d04fc12e97058f34ccf6e60302ab05c5116df5/socket.py
def bind(self, host, port):
def bind(self, a1, a2=None): if a2 is None: host, port = a1 else: host, port = a1, a2
def accept(self): if not self.listening: raise my_error, 'Not listening' self.listening = 0 self.stream.wait() self.accepted = 1 return self, self.getsockname()
11d04fc12e97058f34ccf6e60302ab05c5116df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11d04fc12e97058f34ccf6e60302ab05c5116df5/socket.py
def connect(self, host, port):
def connect(self, a1, a2=None): if a2 is None: host, port = a1 else: host, port = a1, a2
def close(self): if self.accepted: self.accepted = 0 return self.stream.Abort()
11d04fc12e97058f34ccf6e60302ab05c5116df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11d04fc12e97058f34ccf6e60302ab05c5116df5/socket.py
def makefile(self, rw): return _socketfile(self)
def makefile(self, rw = 'r'): return _socketfile(self, rw)
def makefile(self, rw): return _socketfile(self)
11d04fc12e97058f34ccf6e60302ab05c5116df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11d04fc12e97058f34ccf6e60302ab05c5116df5/socket.py
def bytes_writeable(self): st = self.stream.Status() return st.sendWindow - st.sendUnacked;
11d04fc12e97058f34ccf6e60302ab05c5116df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11d04fc12e97058f34ccf6e60302ab05c5116df5/socket.py
def __init__(self): pass
11d04fc12e97058f34ccf6e60302ab05c5116df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11d04fc12e97058f34ccf6e60302ab05c5116df5/socket.py
def __init__(self, sock):
def __init__(self, sock, rw): if rw not in ('r', 'w'): raise ValueError, "mode must be 'r' or 'w'"
def __init__(self, sock): self.sock = sock self.buf = ''
11d04fc12e97058f34ccf6e60302ab05c5116df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11d04fc12e97058f34ccf6e60302ab05c5116df5/socket.py
def read(self, *arg): if arg: length = arg else:
def read(self, length = 0): if length <= 0:
def read(self, *arg): if arg: length = arg else: length = 0x7fffffff while len(self.buf) < length: new = self.sock.recv(0x7fffffff) if not new: break self.buf = self.buf + new rv = self.buf[:length] self.buf = self.buf[length:] return rv
11d04fc12e97058f34ccf6e60302ab05c5116df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11d04fc12e97058f34ccf6e60302ab05c5116df5/socket.py
def readline(self): import string while not '\n' in self.buf: new = self.sock.recv(0x7fffffff) if not new: break self.buf = self.buf + new if not '\n' in self.buf: rv = self.buf self.buf = '' else: i = string.index(self.buf, '\n') rv = self.buf[:i+1] self.buf = self.buf[i+1:] return rv
11d04fc12e97058f34ccf6e60302ab05c5116df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11d04fc12e97058f34ccf6e60302ab05c5116df5/socket.py
self.sock.send(buf)
BS = 512 if len(buf) >= BS: self.flush() self.sock.send(buf) elif len(buf) + len(self.buf) >= BS: self.flush() self.buf = buf else: self.buf = self.buf + buf def flush(self): if self.buf and self.rw == 'w': self.sock.send(self.buf) self.buf = ''
def write(self, buf): self.sock.send(buf)
11d04fc12e97058f34ccf6e60302ab05c5116df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11d04fc12e97058f34ccf6e60302ab05c5116df5/socket.py
self.sock.close()
self.flush()
def close(self): self.sock.close() del self.sock
11d04fc12e97058f34ccf6e60302ab05c5116df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11d04fc12e97058f34ccf6e60302ab05c5116df5/socket.py
def close(self): self.sock.close() del self.sock
11d04fc12e97058f34ccf6e60302ab05c5116df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11d04fc12e97058f34ccf6e60302ab05c5116df5/socket.py
"""Same as in BaseServer but as a thread.""" self.finish_request(request, client_address) self.close_request(request)
"""Same as in BaseServer but as a thread. In addition, exception handling is done here. """ try: self.finish_request(request, client_address) self.close_request(request) except: self.handle_error(request, client_address) self.close_request(request)
def process_request_thread(self, request, client_address): """Same as in BaseServer but as a thread.""" self.finish_request(request, client_address) self.close_request(request)
bd6c5ca82737acd310b620141a85f4c9d9d1f631 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bd6c5ca82737acd310b620141a85f4c9d9d1f631/SocketServer.py
err = PyMac_GetFullPathname(&_self->ob_itself, strbuf, sizeof(strbuf));
err = _PyMac_GetFullPathname(&_self->ob_itself, strbuf, sizeof(strbuf));
def parseArgumentList(self, args): args0, arg1, argsrest = args[:1], args[1], args[2:] t0, n0, m0 = arg1 args = args0 + argsrest if m0 != InMode: raise ValueError, "method's 'self' must be 'InMode'" self.itself = Variable(t0, "_self->ob_itself", SelfMode) FunctionGenerator.parseArgumentList(self, args) self.argumentLis...
d033321735332055d5e26f3be8e213c40635effe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d033321735332055d5e26f3be8e213c40635effe/filesupport.py
eq(int(time.mktime(timetup)), 1044470846)
t = int(time.mktime(timetup)) eq(time.localtime(t)[:6], timetup[:6])
def test_parsedate_acceptable_to_time_functions(self): eq = self.assertEqual timetup = Utils.parsedate('5 Feb 2003 13:47:26 -0800') eq(int(time.mktime(timetup)), 1044470846) eq(int(time.strftime('%Y', timetup)), 2003) timetup = Utils.parsedate_tz('5 Feb 2003 13:47:26 -0800') eq(int(time.mktime(timetup[:9])), 1044470846...
08562c411899c7a6afd61f96417afe027bfc1dbb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/08562c411899c7a6afd61f96417afe027bfc1dbb/test_email.py