rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
if flags & select.POLLIN: | if flags & (select.POLLIN | select.POLLPRI): | def readwrite(obj, flags): try: if flags & select.POLLIN: obj.handle_read_event() if flags & select.POLLOUT: obj.handle_write_event() except ExitNow: raise except: obj.handle_error() | 9303777f224c536ce8be9297d208f46527912b46 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9303777f224c536ce8be9297d208f46527912b46/asyncore.py |
'lambda': ('ref/lambda', 'FUNCTIONS'), | 'lambda': ('ref/lambdas', 'FUNCTIONS'), | def writedocs(dir, pkgpath='', done=None): """Write out HTML documentation for all modules in a directory tree.""" if done is None: done = {} for file in os.listdir(dir): path = os.path.join(dir, file) if ispackage(path): writedocs(path, pkgpath + file + '.', done) elif os.path.isfile(path): modname = inspect.getmodule... | 742dde4ddd178ee5ac80ae0d4a599a67437d9635 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/742dde4ddd178ee5ac80ae0d4a599a67437d9635/pydoc.py |
'pass': 'PASS', | 'pass': ('ref/pass', ''), | def writedocs(dir, pkgpath='', done=None): """Write out HTML documentation for all modules in a directory tree.""" if done is None: done = {} for file in os.listdir(dir): path = os.path.join(dir, file) if ispackage(path): writedocs(path, pkgpath + file + '.', done) elif os.path.isfile(path): modname = inspect.getmodule... | 742dde4ddd178ee5ac80ae0d4a599a67437d9635 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/742dde4ddd178ee5ac80ae0d4a599a67437d9635/pydoc.py |
'EXECUTION': ('ref/execframes', ''), 'NAMESPACES': ('ref/execframes', 'global ASSIGNMENT DELETION'), | 'EXECUTION': ('ref/naming', ''), 'NAMESPACES': ('ref/naming', 'global ASSIGNMENT DELETION'), | 'METHODS': ('lib/typesmethods', 'class def CLASSES TYPES'), | 742dde4ddd178ee5ac80ae0d4a599a67437d9635 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/742dde4ddd178ee5ac80ae0d4a599a67437d9635/pydoc.py |
self.check_extension_list() | def get_source_files (self): | df112a76a9a8b5971b179bc645016c555d5be725 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/df112a76a9a8b5971b179bc645016c555d5be725/build_ext.py | |
assert len(m) == 512, "len(m) is %d, but expecting 512" % (len(m),) try: m.seek(513,0) except ValueError: pass else: assert 0, 'Could seek beyond the new size' | assert len(m) == 512, "len(m) is %d, but expecting 512" % (len(m),) try: m.seek(513,0) except ValueError: pass else: assert 0, 'Could seek beyond the new size' | def test_both(): "Test mmap module on Unix systems and Windows" # Create an mmap'ed file f = open('foo', 'w+') # Write 2 pages worth of data to the file f.write('\0'* PAGESIZE) f.write('foo') f.write('\0'* (PAGESIZE-3) ) m = mmap.mmap(f.fileno(), 2 * PAGESIZE) f.close() # Simple sanity checks print ' Position of f... | a701597138f01af04db86b10c8f2faea50f7c9cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a701597138f01af04db86b10c8f2faea50f7c9cf/test_mmap.py |
def resolve_dotted_attribute(obj, attr): | def resolve_dotted_attribute(obj, attr, allow_dotted_names=True): | def resolve_dotted_attribute(obj, attr): """resolve_dotted_attribute(a, 'b.c.d') => a.b.c.d Resolves a dotted attribute name to an object. Raises an AttributeError if any attribute in the chain starts with a '_'. """ for i in attr.split('.'): if i.startswith('_'): raise AttributeError( 'attempt to access private att... | d06414257966a1551279d68ff3ab16316e459486 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d06414257966a1551279d68ff3ab16316e459486/SimpleXMLRPCServer.py |
for i in attr.split('.'): | if allow_dotted_names: attrs = attr.split('.') else: attrs = [attr] for i in attrs: | def resolve_dotted_attribute(obj, attr): """resolve_dotted_attribute(a, 'b.c.d') => a.b.c.d Resolves a dotted attribute name to an object. Raises an AttributeError if any attribute in the chain starts with a '_'. """ for i in attr.split('.'): if i.startswith('_'): raise AttributeError( 'attempt to access private att... | d06414257966a1551279d68ff3ab16316e459486 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d06414257966a1551279d68ff3ab16316e459486/SimpleXMLRPCServer.py |
def register_instance(self, instance): | def register_instance(self, instance, allow_dotted_names=False): | def register_instance(self, instance): """Registers an instance to respond to XML-RPC requests. | d06414257966a1551279d68ff3ab16316e459486 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d06414257966a1551279d68ff3ab16316e459486/SimpleXMLRPCServer.py |
method_name | method_name, self.allow_dotted_names | def system_methodHelp(self, method_name): """system.methodHelp('add') => "Adds two integers together" | d06414257966a1551279d68ff3ab16316e459486 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d06414257966a1551279d68ff3ab16316e459486/SimpleXMLRPCServer.py |
method | method, self.allow_dotted_names | def _dispatch(self, method, params): """Dispatches the XML-RPC method. | d06414257966a1551279d68ff3ab16316e459486 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d06414257966a1551279d68ff3ab16316e459486/SimpleXMLRPCServer.py |
util.mkpath (name, mode, self.verbose, self.dry_run) | dir_util.mkpath(name, mode, self.verbose, self.dry_run) | def mkpath (self, name, mode=0777): util.mkpath (name, mode, self.verbose, self.dry_run) | 29124ff4f2b7e598801ef380184fcd2cd9d113d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/29124ff4f2b7e598801ef380184fcd2cd9d113d6/cmd.py |
return util.copy_file (infile, outfile, preserve_mode, preserve_times, not self.force, link, self.verbose >= level, self.dry_run) | return file_util.copy_file( infile, outfile, preserve_mode, preserve_times, not self.force, link, self.verbose >= level, self.dry_run) | def copy_file (self, infile, outfile, preserve_mode=1, preserve_times=1, link=None, level=1): """Copy a file respecting verbose, dry-run and force flags. (The former two default to whatever is in the Distribution object, and the latter defaults to false for commands that don't define it.)""" | 29124ff4f2b7e598801ef380184fcd2cd9d113d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/29124ff4f2b7e598801ef380184fcd2cd9d113d6/cmd.py |
return util.copy_tree (infile, outfile, preserve_mode,preserve_times,preserve_symlinks, not self.force, self.verbose >= level, self.dry_run) | return dir_util.copy_tree( infile, outfile, preserve_mode,preserve_times,preserve_symlinks, not self.force, self.verbose >= level, self.dry_run) | def copy_tree (self, infile, outfile, preserve_mode=1, preserve_times=1, preserve_symlinks=0, level=1): """Copy an entire directory tree respecting verbose, dry-run, and force flags. """ return util.copy_tree (infile, outfile, preserve_mode,preserve_times,preserve_symlinks, not self.force, self.verbose >= level, self.d... | 29124ff4f2b7e598801ef380184fcd2cd9d113d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/29124ff4f2b7e598801ef380184fcd2cd9d113d6/cmd.py |
return util.move_file (src, dst, self.verbose >= level, self.dry_run) | return file_util.move_file (src, dst, self.verbose >= level, self.dry_run) | def move_file (self, src, dst, level=1): """Move a file respecting verbose and dry-run flags.""" return util.move_file (src, dst, self.verbose >= level, self.dry_run) | 29124ff4f2b7e598801ef380184fcd2cd9d113d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/29124ff4f2b7e598801ef380184fcd2cd9d113d6/cmd.py |
return util.make_archive (base_name, format, root_dir, base_dir, self.verbose, self.dry_run) | return archive_util.make_archive( base_name, format, root_dir, base_dir, self.verbose, self.dry_run) | def make_archive (self, base_name, format, root_dir=None, base_dir=None): return util.make_archive (base_name, format, root_dir, base_dir, self.verbose, self.dry_run) | 29124ff4f2b7e598801ef380184fcd2cd9d113d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/29124ff4f2b7e598801ef380184fcd2cd9d113d6/cmd.py |
if self.force or util.newer_group (infiles, outfile): | if self.force or dep_util.newer_group (infiles, outfile): | def make_file (self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1): """Special case of 'execute()' for operations that process one or more input files and generate one output file. Works just like 'execute()', except the operation is skipped and a different message printed if 'outfile' already e... | 29124ff4f2b7e598801ef380184fcd2cd9d113d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/29124ff4f2b7e598801ef380184fcd2cd9d113d6/cmd.py |
ra = (dir, 0, 16) | ra = (dir, 0, 2000) | def Listdir(self, dir): list = [] ra = (dir, 0, 16) while 1: (status, rest) = self.Readdir(ra) if status <> NFS_OK: break entries, eof = rest last_cookie = None for fileid, name, cookie in entries: print (fileid, name, cookie) # XXX list.append(fileid, name) last_cookie = cookie if eof or not last_cookie: break ra = (r... | ad5f862125fec14b11e76628430d2b4722195400 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ad5f862125fec14b11e76628430d2b4722195400/nfsclient.py |
print (fileid, name, cookie) | def Listdir(self, dir): list = [] ra = (dir, 0, 16) while 1: (status, rest) = self.Readdir(ra) if status <> NFS_OK: break entries, eof = rest last_cookie = None for fileid, name, cookie in entries: print (fileid, name, cookie) # XXX list.append(fileid, name) last_cookie = cookie if eof or not last_cookie: break ra = (r... | ad5f862125fec14b11e76628430d2b4722195400 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ad5f862125fec14b11e76628430d2b4722195400/nfsclient.py | |
if eof or not last_cookie: | if eof or last_cookie == None: | def Listdir(self, dir): list = [] ra = (dir, 0, 16) while 1: (status, rest) = self.Readdir(ra) if status <> NFS_OK: break entries, eof = rest last_cookie = None for fileid, name, cookie in entries: print (fileid, name, cookie) # XXX list.append(fileid, name) last_cookie = cookie if eof or not last_cookie: break ra = (r... | ad5f862125fec14b11e76628430d2b4722195400 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ad5f862125fec14b11e76628430d2b4722195400/nfsclient.py |
Will quote the value if needed or if quote is true. | This will quote the value if needed or if quote is true. | def _formatparam(param, value=None, quote=1): """Convenience function to format and return a key=value pair. Will quote the value if needed or if quote is true. """ if value is not None and len(value) > 0: # BAW: Please check this. I think that if quote is set it should # force quoting even if not necessary. if quote... | 908dc4bea84e4c1d5c20c03160a202c0f69db49d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/908dc4bea84e4c1d5c20c03160a202c0f69db49d/Message.py |
return [(k, Utils.unquote(v)) for k, v in params] | return [(k, _unquotevalue(v)) for k, v in params] | def get_params(self, failobj=None, header='content-type', unquote=1): """Return the message's Content-Type: parameters, as a list. | 908dc4bea84e4c1d5c20c03160a202c0f69db49d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/908dc4bea84e4c1d5c20c03160a202c0f69db49d/Message.py |
return Utils.unquote(v) | return _unquotevalue(v) | def get_param(self, param, failobj=None, header='content-type', unquote=1): """Return the parameter value if found in the Content-Type: header. | 908dc4bea84e4c1d5c20c03160a202c0f69db49d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/908dc4bea84e4c1d5c20c03160a202c0f69db49d/Message.py |
return Utils.unquote(filename.strip()) | if isinstance(filename, TupleType): newvalue = _unquotevalue(filename) return unicode(newvalue[2], newvalue[0]) else: newvalue = _unquotevalue(filename.strip()) return newvalue | def get_filename(self, failobj=None): """Return the filename associated with the payload if present. | 908dc4bea84e4c1d5c20c03160a202c0f69db49d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/908dc4bea84e4c1d5c20c03160a202c0f69db49d/Message.py |
return Utils.unquote(boundary.strip()) | return _unquotevalue(boundary.strip()) | def get_boundary(self, failobj=None): """Return the boundary associated with the payload if present. | 908dc4bea84e4c1d5c20c03160a202c0f69db49d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/908dc4bea84e4c1d5c20c03160a202c0f69db49d/Message.py |
def compile_dir(dir, maxlevels=10, ddir=None, force=0): | def compile_dir(dir, maxlevels=10, ddir=None, force=0, rx=None): | def compile_dir(dir, maxlevels=10, ddir=None, force=0): """Byte-compile all modules in the given directory tree. Arguments (only dir is required): dir: the directory to byte-compile maxlevels: maximum recursion level (default 10) ddir: if given, purported directory name (this is the directory name that wil... | 12b6457e24924ff60cf89fd19a584185a5d6c256 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/12b6457e24924ff60cf89fd19a584185a5d6c256/compileall.py |
py_compile.compile(fullname, None, dfile) | ok = py_compile.compile(fullname, None, dfile) | def compile_dir(dir, maxlevels=10, ddir=None, force=0): """Byte-compile all modules in the given directory tree. Arguments (only dir is required): dir: the directory to byte-compile maxlevels: maximum recursion level (default 10) ddir: if given, purported directory name (this is the directory name that wil... | 12b6457e24924ff60cf89fd19a584185a5d6c256 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/12b6457e24924ff60cf89fd19a584185a5d6c256/compileall.py |
compile_dir(fullname, maxlevels - 1, dfile, force) | if not compile_dir(fullname, maxlevels - 1, dfile, force, rx): success = 0 | def compile_dir(dir, maxlevels=10, ddir=None, force=0): """Byte-compile all modules in the given directory tree. Arguments (only dir is required): dir: the directory to byte-compile maxlevels: maximum recursion level (default 10) ddir: if given, purported directory name (this is the directory name that wil... | 12b6457e24924ff60cf89fd19a584185a5d6c256 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/12b6457e24924ff60cf89fd19a584185a5d6c256/compileall.py |
opts, args = getopt.getopt(sys.argv[1:], 'lfd:') | opts, args = getopt.getopt(sys.argv[1:], 'lfd:x:') | def main(): """Script main program.""" import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'lfd:') except getopt.error, msg: print msg print "usage: compileall [-l] [-f] [-d destdir] [directory ...]" print "-l: don't recurse down" print "-f: force rebuild even if timestamps are up-to-date" print "-d destdir: pu... | 12b6457e24924ff60cf89fd19a584185a5d6c256 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/12b6457e24924ff60cf89fd19a584185a5d6c256/compileall.py |
print "usage: compileall [-l] [-f] [-d destdir] [directory ...]" | print "usage: python compileall.py [-l] [-f] [-d destdir] " \ "[-s regexp] [directory ...]" | def main(): """Script main program.""" import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'lfd:') except getopt.error, msg: print msg print "usage: compileall [-l] [-f] [-d destdir] [directory ...]" print "-l: don't recurse down" print "-f: force rebuild even if timestamps are up-to-date" print "-d destdir: pu... | 12b6457e24924ff60cf89fd19a584185a5d6c256 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/12b6457e24924ff60cf89fd19a584185a5d6c256/compileall.py |
print "if no directory arguments, -l sys.path is assumed" | print " if no directory arguments, -l sys.path is assumed" print "-x regexp: skip files matching the regular expression regexp" print " the regexp is search for in the full path of the file" | def main(): """Script main program.""" import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'lfd:') except getopt.error, msg: print msg print "usage: compileall [-l] [-f] [-d destdir] [directory ...]" print "-l: don't recurse down" print "-f: force rebuild even if timestamps are up-to-date" print "-d destdir: pu... | 12b6457e24924ff60cf89fd19a584185a5d6c256 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/12b6457e24924ff60cf89fd19a584185a5d6c256/compileall.py |
success = success and compile_dir(dir, maxlevels, ddir, force) | if not compile_dir(dir, maxlevels, ddir, force, rx): success = 0 | def main(): """Script main program.""" import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'lfd:') except getopt.error, msg: print msg print "usage: compileall [-l] [-f] [-d destdir] [directory ...]" print "-l: don't recurse down" print "-f: force rebuild even if timestamps are up-to-date" print "-d destdir: pu... | 12b6457e24924ff60cf89fd19a584185a5d6c256 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/12b6457e24924ff60cf89fd19a584185a5d6c256/compileall.py |
sys.exit(not main()) | exit_status = not main() sys.exit(exit_status) | def main(): """Script main program.""" import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'lfd:') except getopt.error, msg: print msg print "usage: compileall [-l] [-f] [-d destdir] [directory ...]" print "-l: don't recurse down" print "-f: force rebuild even if timestamps are up-to-date" print "-d destdir: pu... | 12b6457e24924ff60cf89fd19a584185a5d6c256 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/12b6457e24924ff60cf89fd19a584185a5d6c256/compileall.py |
try: winsound.PlaySound( '!"$%&/( winsound.SND_ALIAS | winsound.SND_NODEFAULT ) except RuntimeError: pass | self.assertRaises(RuntimeError, winsound.PlaySound, '!"$%&/( winsound.SND_ALIAS | winsound.SND_NODEFAULT) | def test_alias_nofallback(self): try: winsound.PlaySound( '!"$%&/(#+*', winsound.SND_ALIAS | winsound.SND_NODEFAULT ) except RuntimeError: pass | b8b60ea0c97d8eea0fde6712b5c9848aa743b47c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b8b60ea0c97d8eea0fde6712b5c9848aa743b47c/test_winsound.py |
fp.write("\t\tif _arguments.has_key('errn'):\n") | fp.write("\t\tif _arguments.get('errn', 0):\n") | fp.write("\tdef %s(self, "%funcname) | 18983536dcb1b430934f345dc1d95aaadbafa2c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/18983536dcb1b430934f345dc1d95aaadbafa2c0/gensuitemodule.py |
exts.append( Extension('cmath', ['cmathmodule.c'], libraries=['m']) ) | exts.append( Extension('cmath', ['cmathmodule.c'], libraries=math_libs) ) | def detect_modules(self): # Ensure that /usr/local is always used if '/usr/local/lib' not in self.compiler.library_dirs: self.compiler.library_dirs.append('/usr/local/lib') if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.append( '/usr/local/include' ) | 5ddb25f36f676aa32b048a24261dcc8490b99c98 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5ddb25f36f676aa32b048a24261dcc8490b99c98/setup.py |
exts.append( Extension('math', ['mathmodule.c'], libraries=['m']) ) | exts.append( Extension('math', ['mathmodule.c'], libraries=math_libs) ) | def detect_modules(self): # Ensure that /usr/local is always used if '/usr/local/lib' not in self.compiler.library_dirs: self.compiler.library_dirs.append('/usr/local/lib') if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.append( '/usr/local/include' ) | 5ddb25f36f676aa32b048a24261dcc8490b99c98 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5ddb25f36f676aa32b048a24261dcc8490b99c98/setup.py |
exts.append( Extension('time', ['timemodule.c'], libraries=['m']) ) | exts.append( Extension('time', ['timemodule.c'], libraries=math_libs) ) | def detect_modules(self): # Ensure that /usr/local is always used if '/usr/local/lib' not in self.compiler.library_dirs: self.compiler.library_dirs.append('/usr/local/lib') if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.append( '/usr/local/include' ) | 5ddb25f36f676aa32b048a24261dcc8490b99c98 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5ddb25f36f676aa32b048a24261dcc8490b99c98/setup.py |
if ext in self.swig_ext(): | if ext == ".i": | def swig_sources (self, sources): | 5ca84b83c766de8a836ae0a9fff5777b6299613b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5ca84b83c766de8a836ae0a9fff5777b6299613b/build_ext.py |
swig_files.append(source) | swig_sources.append(source) | def swig_sources (self, sources): | 5ca84b83c766de8a836ae0a9fff5777b6299613b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5ca84b83c766de8a836ae0a9fff5777b6299613b/build_ext.py |
if not swig_files: | if not swig_sources: | def swig_sources (self, sources): | 5ca84b83c766de8a836ae0a9fff5777b6299613b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5ca84b83c766de8a836ae0a9fff5777b6299613b/build_ext.py |
if hasattr(os, 'chmod') and sys.platform[:6] != 'cygwin': | if (hasattr(os, 'chmod') and sys.platform[:6] != 'cygwin' and os.getenv('USER') != 'root'): | def test_rmtree_errors(self): # filename is guaranteed not to exist filename = tempfile.mktemp() self.assertRaises(OSError, shutil.rmtree, filename) | b8b09d05130aeba86ae41d3bee8fa3c6e7395339 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b8b09d05130aeba86ae41d3bee8fa3c6e7395339/test_shutil.py |
self.assertEqual(self.errorState, 2) | self.assertEqual(self.errorState, 2, "Expected call to onerror function did not happen.") | def test_on_error(self): self.errorState = 0 os.mkdir(TESTFN) self.childpath = os.path.join(TESTFN, 'a') f = open(self.childpath, 'w') f.close() old_dir_mode = os.stat(TESTFN).st_mode old_child_mode = os.stat(self.childpath).st_mode # Make unwritable. os.chmod(self.childpath, stat.S_IREAD) os.chmod(TESTFN, stat.S_IREAD... | b8b09d05130aeba86ae41d3bee8fa3c6e7395339 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b8b09d05130aeba86ae41d3bee8fa3c6e7395339/test_shutil.py |
print a, k | print a, sortdict(k) | def f(*a, **k): print a, k | 08dabf0a7374540637ee637f1b37b8d3cf96d9bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/08dabf0a7374540637ee637f1b37b8d3cf96d9bf/test_extcall.py |
print x, y, z | print x, y, sortdict(z) | def g(x, *y, **z): print x, y, z | 08dabf0a7374540637ee637f1b37b8d3cf96d9bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/08dabf0a7374540637ee637f1b37b8d3cf96d9bf/test_extcall.py |
print d print d2 | print sortdict(d) print sortdict(d2) | def __getitem__(self, i): if i < 3: return i else: raise IndexError, i | 08dabf0a7374540637ee637f1b37b8d3cf96d9bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/08dabf0a7374540637ee637f1b37b8d3cf96d9bf/test_extcall.py |
print func.func_name, args, kwdict, '->', | print func.func_name, args, sortdict(kwdict), '->', | decl = 'def %s(%s): print "ok %s", a, b, d, e, v, k' % ( name, string.join(arglist, ', '), name) | 08dabf0a7374540637ee637f1b37b8d3cf96d9bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/08dabf0a7374540637ee637f1b37b8d3cf96d9bf/test_extcall.py |
saved_dist_files = self.distributuion.dist_files[:] | saved_dist_files = self.distribution.dist_files[:] | def run (self): | fa7e6b46eff16e6f90eec385c9d6501ad9ca6352 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fa7e6b46eff16e6f90eec385c9d6501ad9ca6352/bdist_rpm.py |
print """usage: basd64 [-d] [-e] [-u] [-t] [file|-] | print """usage: %s [-d|-e|-u|-t] [file|-] | def test(): """Small test program""" import sys, getopt try: opts, args = getopt.getopt(sys.argv[1:], 'deut') except getopt.error, msg: sys.stdout = sys.stderr print msg print """usage: basd64 [-d] [-e] [-u] [-t] [file|-] -d, -u: decode -e: encode (default) -t: decode string 'Aladdin:open sesame'""" sys.exit(2) func = ... | 0365180a74904c1b6ac186e9edb923afed59aa84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0365180a74904c1b6ac186e9edb923afed59aa84/base64.py |
-t: decode string 'Aladdin:open sesame'""" | -t: encode and decode string 'Aladdin:open sesame'"""%sys.argv[0] | def test(): """Small test program""" import sys, getopt try: opts, args = getopt.getopt(sys.argv[1:], 'deut') except getopt.error, msg: sys.stdout = sys.stderr print msg print """usage: basd64 [-d] [-e] [-u] [-t] [file|-] -d, -u: decode -e: encode (default) -t: decode string 'Aladdin:open sesame'""" sys.exit(2) func = ... | 0365180a74904c1b6ac186e9edb923afed59aa84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0365180a74904c1b6ac186e9edb923afed59aa84/base64.py |
contents.append(self.docother(value, key, name, 70)) | contents.append(self.docother(value, key, name, maxlen=70)) | def docmodule(self, object, name=None, mod=None): """Produce text documentation for a given module object.""" name = object.__name__ # ignore the passed-in name synop, desc = splitdoc(getdoc(object)) result = self.section('NAME', name + (synop and ' - ' + synop)) | 8b813db2ef90ae83c3c6dcaa7ac3122290c9faf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8b813db2ef90ae83c3c6dcaa7ac3122290c9faf4/pydoc.py |
name, mod, 70, doc) + '\n') | name, mod, maxlen=70, doc=doc) + '\n') | def spilldata(msg, attrs, predicate): ok, attrs = _split_list(attrs, predicate) if ok: hr.maybe() push(msg) for name, kind, homecls, value in ok: if callable(value) or inspect.isdatadescriptor(value): doc = getdoc(value) else: doc = None push(self.docother(getattr(object, name), name, mod, 70, doc) + '\n') return attrs | 8b813db2ef90ae83c3c6dcaa7ac3122290c9faf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8b813db2ef90ae83c3c6dcaa7ac3122290c9faf4/pydoc.py |
def docother(self, object, name=None, mod=None, maxlen=None, doc=None): | def docother(self, object, name=None, mod=None, parent=None, maxlen=None, doc=None): | def docother(self, object, name=None, mod=None, maxlen=None, doc=None): """Produce text documentation for a data object.""" repr = self.repr(object) if maxlen: line = (name and name + ' = ' or '') + repr chop = maxlen - len(line) if chop < 0: repr = repr[:chop] + '...' line = (name and self.bold(name) + ' = ' or '') + ... | 8b813db2ef90ae83c3c6dcaa7ac3122290c9faf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8b813db2ef90ae83c3c6dcaa7ac3122290c9faf4/pydoc.py |
"[-s regexp] [directory ...]" | "[-x regexp] [directory ...]" | def main(): """Script main program.""" import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'lfqd:x:') except getopt.error, msg: print msg print "usage: python compileall.py [-l] [-f] [-q] [-d destdir] " \ "[-s regexp] [directory ...]" print "-l: don't recurse down" print "-f: force rebuild even if timestamps ar... | 4651f53949b929f33a63e74232da1b26fe4a8d70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4651f53949b929f33a63e74232da1b26fe4a8d70/compileall.py |
def join(a, b): if isabs(b): return b if a == '' or a[-1:] in '/\\': return a + b return a + os.sep + b | def join(a, *p): path = a for b in p: if isabs(b): path = b elif path == '' or path[-1:] in '/\\': path = path + b else: path = path + os.sep + b return path | def isabs(s): s = splitdrive(s)[1] return s != '' and s[:1] in '/\\' | ae590db3ce8cd583f1f14fbb498f45d095b6d262 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ae590db3ce8cd583f1f14fbb498f45d095b6d262/dospath.py |
if not _urandomfd: | if _urandomfd is None: | def urandom(n): """urandom(n) -> str | 725f8c83a27989ea2413c6d9c824cb78eddf52dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/725f8c83a27989ea2413c6d9c824cb78eddf52dd/os.py |
self._read_test(['a,\\b,c'], [['a', '\\b', 'c']], escapechar='\\') | self._read_test(['a,\\b,c'], [['a', 'b', 'c']], escapechar='\\') | def test_read_escape(self): self._read_test(['a,\\b,c'], [['a', '\\b', 'c']], escapechar='\\') self._read_test(['a,b\\,c'], [['a', 'b,c']], escapechar='\\') self._read_test(['a,"b\\,c"'], [['a', 'b,c']], escapechar='\\') self._read_test(['a,"b,\\c"'], [['a', 'b,\\c']], escapechar='\\') self._read_test(['a,"b,c\\""'], [... | 36a7691c2dc4a11ceebacb149e69b01226962d69 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/36a7691c2dc4a11ceebacb149e69b01226962d69/test_csv.py |
self._read_test(['a,"b,\\c"'], [['a', 'b,\\c']], escapechar='\\') | self._read_test(['a,"b,\\c"'], [['a', 'b,c']], escapechar='\\') | def test_read_escape(self): self._read_test(['a,\\b,c'], [['a', '\\b', 'c']], escapechar='\\') self._read_test(['a,b\\,c'], [['a', 'b,c']], escapechar='\\') self._read_test(['a,"b\\,c"'], [['a', 'b,c']], escapechar='\\') self._read_test(['a,"b,\\c"'], [['a', 'b,\\c']], escapechar='\\') self._read_test(['a,"b,c\\""'], [... | 36a7691c2dc4a11ceebacb149e69b01226962d69 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/36a7691c2dc4a11ceebacb149e69b01226962d69/test_csv.py |
if localename is not None: | if localename: | def getdefaultlocale(envvars=('LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LANG')): """ Tries to determine the default locale settings and returns them as tuple (language code, encoding). According to POSIX, a program which has not called setlocale(LC_ALL, "") runs using the portable 'C' locale. Calling setlocale(LC_ALL, "") l... | c8ae31dcbd20933abc2aadb4ab62aa8e99c81bf5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c8ae31dcbd20933abc2aadb4ab62aa8e99c81bf5/locale.py |
handler=None): | handler=None): | def __init__(self, host='localhost', port=DEFAULT_LOGGING_CONFIG_PORT, handler=None): ThreadingTCPServer.__init__(self, (host, port), handler) logging._acquireLock() self.abort = 0 logging._releaseLock() self.timeout = 1 | c4d047aad330509a0fc052f2da08ff171afd6ea4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c4d047aad330509a0fc052f2da08ff171afd6ea4/config.py |
def serve(rcvr, hdlr): server = rcvr(handler=hdlr) | def serve(rcvr, hdlr, port): server = rcvr(port=port, handler=hdlr) | def serve(rcvr, hdlr): server = rcvr(handler=hdlr) global _listener logging._acquireLock() _listener = server logging._releaseLock() server.serve_until_stopped() | c4d047aad330509a0fc052f2da08ff171afd6ea4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c4d047aad330509a0fc052f2da08ff171afd6ea4/config.py |
return threading.Thread(target=serve, args=(ConfigSocketReceiver, ConfigStreamHandler)) | return threading.Thread(target=serve, args=(ConfigSocketReceiver, ConfigStreamHandler, port)) | def serve(rcvr, hdlr): server = rcvr(handler=hdlr) global _listener logging._acquireLock() _listener = server logging._releaseLock() server.serve_until_stopped() | c4d047aad330509a0fc052f2da08ff171afd6ea4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c4d047aad330509a0fc052f2da08ff171afd6ea4/config.py |
output_dir=None): | output_dir=None, debug=0): | def link_static_lib (self, objects, output_libname, output_dir=None): | ba233fbe92582abf1c779aa392b36130e1b3a7da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ba233fbe92582abf1c779aa392b36130e1b3a7da/unixccompiler.py |
def quoteaddr(addr): """Quote a subset of the email addresses defined by RFC 821. Should be able to handle anything rfc822.parseaddr can handle. """ m = (None, None) try: m = email.Utils.parseaddr(addr)[1] except AttributeError: pass if m == (None, None): # Indicates parse failure or AttributeError #something weird he... | bd3bc4dc4c18cd1b3f1ce0dd2065bbed6de4f267 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bd3bc4dc4c18cd1b3f1ce0dd2065bbed6de4f267/smtplib.py | ||
class PackBufferTestCase(unittest.TestCase): """ Test the packing methods that work on buffers. """ def test_unpack_from( self ): test_string = 'abcd01234' fmt = '4s' s = struct.Struct(fmt) for cls in (str, buffer): data = cls(test_string) self.assertEquals(s.unpack_from(data), ('abcd',)) self.assertEquals(s.unpack_fr... | def assertRaises(excClass, callableObj, *args, **kwargs): try: callableObj(*args, **kwargs) except excClass: return else: raise RuntimeError("%s not raised." % excClass) def test_unpack_from(): test_string = 'abcd01234' fmt = '4s' s = struct.Struct(fmt) for cls in (str, buffer): data = cls(test_string) assert s.u... | def test_1229380(): import sys for endian in ('', '>', '<'): for cls in (int, long): for fmt in ('B', 'H', 'I', 'L'): deprecated_err(struct.pack, endian + fmt, cls(-1)) deprecated_err(struct.pack, endian + 'B', cls(300)) deprecated_err(struct.pack, endian + 'H', cls(70000)) deprecated_err(struct.pack, endian + 'I', s... | 7f7386cfd2936a552d73fed2ddd12c5a54004034 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7f7386cfd2936a552d73fed2ddd12c5a54004034/test_struct.py |
def test_mktime(self): self.assertRaises(OverflowError, time.mktime, (999999, 999999, 999999, 999999, 999999, 999999, 999999, 999999, 999999)) | def test_mktime(self): self.assertRaises(OverflowError, time.mktime, (999999, 999999, 999999, 999999, 999999, 999999, 999999, 999999, 999999)) | 4eaf50f4357587da0c444a4f40eb329f78680acc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4eaf50f4357587da0c444a4f40eb329f78680acc/test_time.py | |
self.assert_(isinstance(bi[0], int)) | self.assert_(isinstance(bi[0], (int, long))) | def test_buffer_info(self): a = array.array(self.typecode, self.example) self.assertRaises(TypeError, a.buffer_info, 42) bi = a.buffer_info() self.assert_(isinstance(bi, tuple)) self.assertEqual(len(bi), 2) self.assert_(isinstance(bi[0], int)) self.assert_(isinstance(bi[1], int)) self.assertEqual(bi[1], len(a)) | 9bdc85f8bfbb99f374df8654e3f6201f73f37ee6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9bdc85f8bfbb99f374df8654e3f6201f73f37ee6/test_array.py |
if pw: | if pw is not None: | def retry_http_basic_auth(self, host, req, realm): user,pw = self.passwd.find_user_password(realm, host) if pw: raw = "%s:%s" % (user, pw) auth = 'Basic %s' % base64.encodestring(raw).strip() if req.headers.get(self.auth_header, None) == auth: return None req.add_header(self.auth_header, auth) return self.parent.open(r... | 8b3e871a19f414257b8f4a361d9c2c063a5f8015 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8b3e871a19f414257b8f4a361d9c2c063a5f8015/urllib2.py |
self._version = _read_long(chunk) | self._version = _read_ulong(chunk) | def initfp(self, file): self._version = 0 self._decomp = None self._convert = None self._markers = [] self._soundpos = 0 self._file = Chunk(file) if self._file.getname() != 'FORM': raise Error, 'file does not start with FORM id' formdata = self._file.read(4) if formdata == 'AIFF': self._aifc = 0 elif formdata == 'AIFC'... | 820819c7ca74d09f5115f52cf377aead50eeeac7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/820819c7ca74d09f5115f52cf377aead50eeeac7/aifc.py |
print "proxy via http:", host, selector | def open_http(self, url, data=None): import httplib if type(url) is type(""): host, selector = splithost(url) user_passwd, host = splituser(host) else: host, selector = url urltype, rest = splittype(selector) if string.lower(urltype) == 'http': realhost, rest = splithost(rest) user_passwd, realhost = splituser(realhost... | fd79566d0f04c4cd1d98bca9396fbf2426f1c6ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fd79566d0f04c4cd1d98bca9396fbf2426f1c6ac/urllib.py | |
self.library_dirs.append(os.path.join(sys.exec_prefix, 'PC', 'VC6')) | self.library_dirs.append(os.path.join(sys.exec_prefix, 'PCBuild')) | def finalize_options (self): from distutils import sysconfig | 8279170ed2ddffad6f38e3d8ebc29d14cf5d8ae3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8279170ed2ddffad6f38e3d8ebc29d14cf5d8ae3/build_ext.py |
cmd = "kfmclient %s >/dev/null 2>&1" % action | assert "'" not in action cmd = "kfmclient '%s' >/dev/null 2>&1" % action | def _remote(self, action): cmd = "kfmclient %s >/dev/null 2>&1" % action rc = os.system(cmd) if rc: import time if self.basename == "konqueror": os.system(self.name + " --silent &") else: os.system(self.name + " -d &") time.sleep(PROCESS_CREATION_DELAY) rc = os.system(cmd) return not rc | 925f14427416c1c5a8c6e71d17daac20e248c7b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/925f14427416c1c5a8c6e71d17daac20e248c7b0/webbrowser.py |
self._remote("openURL %s" % url) | self._remote("openURL '%s'" % url) | def open(self, url, new=1, autoraise=1): # XXX Currently I know no way to prevent KFM from # opening a new win. self._remote("openURL %s" % url) | 925f14427416c1c5a8c6e71d17daac20e248c7b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/925f14427416c1c5a8c6e71d17daac20e248c7b0/webbrowser.py |
register("links", None, GenericBrowser("links %s")) | register("links", None, GenericBrowser("links '%s'")) | def open_new(self, url): self.open(url) | 925f14427416c1c5a8c6e71d17daac20e248c7b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/925f14427416c1c5a8c6e71d17daac20e248c7b0/webbrowser.py |
register("lynx", None, GenericBrowser("lynx %s")) | register("lynx", None, GenericBrowser("lynx '%s'")) | def open_new(self, url): self.open(url) | 925f14427416c1c5a8c6e71d17daac20e248c7b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/925f14427416c1c5a8c6e71d17daac20e248c7b0/webbrowser.py |
register("w3m", None, GenericBrowser("w3m %s")) | register("w3m", None, GenericBrowser("w3m '%s'")) | def open_new(self, url): self.open(url) | 925f14427416c1c5a8c6e71d17daac20e248c7b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/925f14427416c1c5a8c6e71d17daac20e248c7b0/webbrowser.py |
if _iscommand("netscape") or _iscommand("mozilla"): if _iscommand("mozilla"): register("mozilla", None, Netscape("mozilla")) if _iscommand("netscape"): register("netscape", None, Netscape("netscape")) | if _iscommand("mozilla"): register("mozilla", None, Netscape("mozilla")) if _iscommand("netscape"): register("netscape", None, Netscape("netscape")) | def open_new(self, url): self.open(url) | 925f14427416c1c5a8c6e71d17daac20e248c7b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/925f14427416c1c5a8c6e71d17daac20e248c7b0/webbrowser.py |
register("mosaic", None, GenericBrowser("mosaic %s >/dev/null &")) | register("mosaic", None, GenericBrowser( "mosaic '%s' >/dev/null &")) | def open_new(self, url): self.open(url) | 925f14427416c1c5a8c6e71d17daac20e248c7b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/925f14427416c1c5a8c6e71d17daac20e248c7b0/webbrowser.py |
register(cmd.lower(), None, GenericBrowser("%s %%s" % cmd.lower())) | register(cmd.lower(), None, GenericBrowser( "%s '%%s'" % cmd.lower())) | def open_new(self, url): self.open(url) | 925f14427416c1c5a8c6e71d17daac20e248c7b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/925f14427416c1c5a8c6e71d17daac20e248c7b0/webbrowser.py |
try: value = SyntaxError(msg, (filename, lineno, offset, line)) except: value = msg, (filename, lineno, offset, line) | value = SyntaxError(msg, (filename, lineno, offset, line)) | def showsyntaxerror(self, filename=None): """Display the syntax error that just occurred. | 0679a73c0ec3ddf46f42b8c7d09d97730bd386cd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0679a73c0ec3ddf46f42b8c7d09d97730bd386cd/code.py |
except: | except ImportError: | def interact(banner=None, readfunc=None, local=None): """Closely emulate the interactive Python interpreter. This is a backwards compatible interface to the InteractiveConsole class. When readfunc is not specified, it attempts to import the readline module to enable GNU readline if it is available. Arguments (all op... | 0679a73c0ec3ddf46f42b8c7d09d97730bd386cd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0679a73c0ec3ddf46f42b8c7d09d97730bd386cd/code.py |
if not dircase in _dirs_in_sys_path and os.path.exists(dir): | if not dircase in _dirs_in_sys_path: | def makepath(*paths): dir = os.path.abspath(os.path.join(*paths)) return dir, os.path.normcase(dir) | 46cf4fc2497a8268c2d0b6eb43a6a3146bd519c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46cf4fc2497a8268c2d0b6eb43a6a3146bd519c3/site.py |
import pdb ; pdb.set_trace() | def buildcopy(top, dummy, list): import macostools for src, dst in list: src = os.path.join(top, src) dst = os.path.join(top, dst) import pdb ; pdb.set_trace() macostools.copy(src, dst) | 0b1f1b514524c4ee13e59e3695a4a06c6be119d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0b1f1b514524c4ee13e59e3695a4a06c6be119d1/ConfigurePython.py | |
self.draw.bind(fred, "<Any-Enter>", self.mouseEnter) self.draw.bind(fred, "<Any-Leave>", self.mouseLeave) | self.draw.tag_bind(fred, "<Any-Enter>", self.mouseEnter) self.draw.tag_bind(fred, "<Any-Leave>", self.mouseLeave) | def createWidgets(self): | faefe4cb607575754b10a1a683061dbfe19b691c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/faefe4cb607575754b10a1a683061dbfe19b691c/canvas-moving-w-mouse.py |
"""Return a random string usable as a multipart boundary. The method used is so that it is *very* unlikely that the same string of characters will every occur again in the Universe, so the caller needn't check the data it is packing for the occurrence of the boundary. | """Return a string usable as a multipart boundary. The string chosen is unique within a single program run, and incorporates the user id (if available), process id (if available), and current time. So it's very unlikely the returned string appears in message text, but there's no guarantee. | def choose_boundary(): """Return a random string usable as a multipart boundary. The method used is so that it is *very* unlikely that the same string of characters will every occur again in the Universe, so the caller needn't check the data it is packing for the occurrence of the boundary. The boundary contains dots ... | 080da28bdbaf36677bf6a429f44d8f3a8eb44bf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/080da28bdbaf36677bf6a429f44d8f3a8eb44bf6/mimetools.py |
timestamp = '%.3f' % time.time() seed = `random.randint(0, 32767)` return _prefix + '.' + timestamp + '.' + seed | return "%s.%.3f.%d" % (_prefix, time.time(), _get_next_counter()) | def choose_boundary(): """Return a random string usable as a multipart boundary. The method used is so that it is *very* unlikely that the same string of characters will every occur again in the Universe, so the caller needn't check the data it is packing for the occurrence of the boundary. The boundary contains dots ... | 080da28bdbaf36677bf6a429f44d8f3a8eb44bf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/080da28bdbaf36677bf6a429f44d8f3a8eb44bf6/mimetools.py |
self.headers.update(headers) | for key, value in headers.iteritems(): self.add_header(key, value) | def __init__(self, url, data=None, headers={}): # unwrap('<URL:type://host/path>') --> 'type://host/path' self.__original = unwrap(url) self.type = None # self.__r_type is what's left after doing the splittype self.host = None self.port = None self.data = data self.headers = {} self.headers.update(headers) | 86503b131b2253c73f8e2f1fceb29c9cf761dc27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/86503b131b2253c73f8e2f1fceb29c9cf761dc27/urllib2.py |
self.headers[key] = val | self.headers[key.capitalize()] = val | def add_header(self, key, val): # useful for something like authentication self.headers[key] = val | 86503b131b2253c73f8e2f1fceb29c9cf761dc27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/86503b131b2253c73f8e2f1fceb29c9cf761dc27/urllib2.py |
for type, url in proxies.items(): | for type, url in proxies.iteritems(): | def __init__(self, proxies=None): if proxies is None: proxies = getproxies() assert hasattr(proxies, 'has_key'), "proxies must be a mapping" self.proxies = proxies for type, url in proxies.items(): setattr(self, '%s_open' % type, lambda r, proxy=url, type=type, meth=self.proxy_open: \ meth(r, proxy, type)) | 86503b131b2253c73f8e2f1fceb29c9cf761dc27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/86503b131b2253c73f8e2f1fceb29c9cf761dc27/urllib2.py |
for uris, authinfo in domains.items(): | for uris, authinfo in domains.iteritems(): | def find_user_password(self, realm, authuri): domains = self.passwd.get(realm, {}) authuri = self.reduce_uri(authuri) for uris, authinfo in domains.items(): for uri in uris: if self.is_suburi(uri, authuri): return authinfo return None, None | 86503b131b2253c73f8e2f1fceb29c9cf761dc27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/86503b131b2253c73f8e2f1fceb29c9cf761dc27/urllib2.py |
for k, v in req.headers.items(): | for k, v in req.headers.iteritems(): | def do_open(self, http_class, req): host = req.get_host() if not host: raise URLError('no host given') | 86503b131b2253c73f8e2f1fceb29c9cf761dc27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/86503b131b2253c73f8e2f1fceb29c9cf761dc27/urllib2.py |
for k, v in self.timeout.items(): | for k, v in self.timeout.iteritems(): | def check_cache(self): # first check for old ones t = time.time() if self.soonest <= t: for k, v in self.timeout.items(): if v < t: self.cache[k].close() del self.cache[k] del self.timeout[k] self.soonest = min(self.timeout.values()) | 86503b131b2253c73f8e2f1fceb29c9cf761dc27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/86503b131b2253c73f8e2f1fceb29c9cf761dc27/urllib2.py |
for k, v in self.timeout.items(): | for k, v in self.timeout.iteritems(): | def check_cache(self): # first check for old ones t = time.time() if self.soonest <= t: for k, v in self.timeout.items(): if v < t: self.cache[k].close() del self.cache[k] del self.timeout[k] self.soonest = min(self.timeout.values()) | 86503b131b2253c73f8e2f1fceb29c9cf761dc27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/86503b131b2253c73f8e2f1fceb29c9cf761dc27/urllib2.py |
def select_scheme (self, name): | ff2d9b71547d95566416fa968872910ca9c4adb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ff2d9b71547d95566416fa968872910ca9c4adb1/install.py | ||
vars = { 'base': self.install_base, 'platbase': self.install_platbase, 'py_version_short': sys.version[0:3], } | def select_scheme (self, name): | ff2d9b71547d95566416fa968872910ca9c4adb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ff2d9b71547d95566416fa968872910ca9c4adb1/install.py | |
val = subst_vars (scheme[key], vars) setattr (self, 'install_' + key, val) | setattr (self, 'install_' + key, scheme[key]) def _expand_attrs (self, attrs): for attr in attrs: val = getattr (self, attr) if val is not None: if os.name == 'posix': val = os.path.expanduser (val) val = subst_vars (val, self.config_vars) setattr (self, attr, val) def expand_basedirs (self): self._expand_attrs (['... | def select_scheme (self, name): | ff2d9b71547d95566416fa968872910ca9c4adb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ff2d9b71547d95566416fa968872910ca9c4adb1/install.py |
for att in ('base', 'platbase', 'purelib', 'platlib', 'lib', 'scripts', 'data'): fullname = "install_" + att val = getattr (self, fullname) if val is not None: setattr (self, fullname, os.path.expandvars (os.path.expanduser (val))) | self._expand_attrs (['install_purelib', 'install_platlib', 'install_lib', 'install_scripts', 'install_data',]) | def expand_dirs (self): | ff2d9b71547d95566416fa968872910ca9c4adb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ff2d9b71547d95566416fa968872910ca9c4adb1/install.py |
ZGUuDQ0KJAAAAAAAAADqs5WMrtL7367S+9+u0vvf1c7336/S+98tzvXfrNL731Hy/9+s0vvfzM3o 36bS+9+u0vrf89L7367S+9+j0vvfUfLx36PS+99p1P3fr9L731JpY2iu0vvfAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAUEUAAEwBAwD9e9Q5AAAAAAAAAADgAA8BCwEGAABAAAAAEAAAAJAAAADVAAAA | ZGUuDQ0KJAAAAAAAAABwj7aMNO7Y3zTu2N807tjfT/LU3zXu2N+38tbfNu7Y39zx3N827tjfVvHL 3zzu2N807tnfae7Y3zTu2N857tjf3PHS3znu2N+M6N7fNe7Y31JpY2g07tjfAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAUEUAAEwBAwAu6+E5AAAAAAAAAADgAA8BCwEGAABAAAAAEAAAAJAAAPDUAAAA | def get_exe_bytes (self): import base64 return base64.decodestring(EXEDATA) | 20d529be264abd2aa162fc647641b52dbb117656 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/20d529be264abd2aa162fc647641b52dbb117656/bdist_wininst.py |
bGwgUmlnaHRzIFJlc2VydmVkLiAkCgBVUFghDAkCCmbxMY8TFMU40bYAAPM0AAAAsAAAJgEABP+/ | bGwgUmlnaHRzIFJlc2VydmVkLiAkCgBVUFghDAkCCl/uS+s25ddS0bYAAO40AAAAsAAAJgEAkP+/ | def get_exe_bytes (self): import base64 return base64.decodestring(EXEDATA) | 20d529be264abd2aa162fc647641b52dbb117656 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/20d529be264abd2aa162fc647641b52dbb117656/bdist_wininst.py |
dZNqAVhfXr/7//9dW8NVi+yD7BCLRRRTVleLQBaLPXg0iUX4M/a79u7+d0PAOXUIdQfHRQgBDFZo gFYRY9/+9lZWUwUM/9eD+P8p/A+FiG182s23P/gDdRshGP91EOgV/wD2bffmcagPhApB67EfUHQJ UJn9sW176y9cGBjxUwxqAv9VGIW12bLxwC5nEGbW8GTsdSUuwmhUMOlTt/ue7wH0OwdZDvwkdAoT vb37yAONRfBQ3GaLSAoDQAxRYdj70Ht0Sn38GQNQ4XVvpqQ7+HUJC4idhy+U7psOVmoEVhCghIs9 iN/X4CKQhg9o... | dZNqAVhfXu/u/v9dW8NVi+yD7AxTVleLPXguM/a7OsA5dQjt7d39dQfHRQgBDFZogE0RVlZTBfsz 9v8M/9eD+P+JRfwPhYhkfPgDdRshb67dfCD/dRDoHv8AaJ8PhAO2Z992QeuxH1B0CVCQ6y9cIC3b H9sY6lMMagL/VSDowC7GXlibZxBmdSUuu/luDU9oVCfpUwHkOwePfLvvWQ7sJHQKEwONRfT3Wdhu bnUcAhg6dH38Et5Mw7ADQKQ0FHUJ3TfD6wuIlncOVmoEVhCgwUVoMBCIdIl2rW2+rw9hOII86yal K9u2NdsCUyqc... | def get_exe_bytes (self): import base64 return base64.decodestring(EXEDATA) | 20d529be264abd2aa162fc647641b52dbb117656 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/20d529be264abd2aa162fc647641b52dbb117656/bdist_wininst.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.