rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
self.pimpinstaller = None
def closepimp(self): self.pimpdb.close() self.pimpprefs = None self.pimpdb = None self.pimpinstaller = None self.packages = []
40b2e839246aa74f08eea1c2abb60e5ca93ecab0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/40b2e839246aa74f08eea1c2abb60e5ca93ecab0/PackageManager.py
list, messages = self.pimpinstaller.prepareInstall(pkg, force, recursive)
pimpinstaller = pimp.PimpInstaller(self.pimpdb) list, messages = pimpinstaller.prepareInstall(pkg, force, recursive)
def installpackage(self, sel, output, recursive, force): pkg = self.packages[sel] list, messages = self.pimpinstaller.prepareInstall(pkg, force, recursive) if messages: return messages messages = self.pimpinstaller.install(list, output) return messages
40b2e839246aa74f08eea1c2abb60e5ca93ecab0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/40b2e839246aa74f08eea1c2abb60e5ca93ecab0/PackageManager.py
messages = self.pimpinstaller.install(list, output)
messages = pimpinstaller.install(list, output)
def installpackage(self, sel, output, recursive, force): pkg = self.packages[sel] list, messages = self.pimpinstaller.prepareInstall(pkg, force, recursive) if messages: return messages messages = self.pimpinstaller.install(list, output) return messages
40b2e839246aa74f08eea1c2abb60e5ca93ecab0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/40b2e839246aa74f08eea1c2abb60e5ca93ecab0/PackageManager.py
self.assertEqual(p.stderr.read(), "strawberry")
self.assertEqual(remove_stderr_debug_decorations(p.stderr.read()), "strawberry")
def test_stderr_pipe(self): # stderr redirection p = subprocess.Popen([sys.executable, "-c", 'import sys; sys.stderr.write("strawberry")'], stderr=subprocess.PIPE) self.assertEqual(p.stderr.read(), "strawberry")
3761e8dd6600d1f93c9ba8a013aa5ba51ed6640b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3761e8dd6600d1f93c9ba8a013aa5ba51ed6640b/test_subprocess.py
self.assertEqual(os.read(d, 1024), "strawberry")
self.assertEqual(remove_stderr_debug_decorations(os.read(d, 1024)), "strawberry")
def test_stderr_filedes(self): # stderr is set to open file descriptor tf = tempfile.TemporaryFile() d = tf.fileno() p = subprocess.Popen([sys.executable, "-c", 'import sys; sys.stderr.write("strawberry")'], stderr=d) p.wait() os.lseek(d, 0, 0) self.assertEqual(os.read(d, 1024), "strawberry")
3761e8dd6600d1f93c9ba8a013aa5ba51ed6640b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3761e8dd6600d1f93c9ba8a013aa5ba51ed6640b/test_subprocess.py
self.assertEqual(tf.read(), "strawberry")
self.assertEqual(remove_stderr_debug_decorations(tf.read()), "strawberry")
def test_stderr_fileobj(self): # stderr is set to open file object tf = tempfile.TemporaryFile() p = subprocess.Popen([sys.executable, "-c", 'import sys; sys.stderr.write("strawberry")'], stderr=tf) p.wait() tf.seek(0) self.assertEqual(tf.read(), "strawberry")
3761e8dd6600d1f93c9ba8a013aa5ba51ed6640b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3761e8dd6600d1f93c9ba8a013aa5ba51ed6640b/test_subprocess.py
self.assertEqual(p.stdout.read(), "appleorange")
output = p.stdout.read() stripped = remove_stderr_debug_decorations(output) self.assertEqual(stripped, "appleorange")
def test_stdout_stderr_pipe(self): # capture stdout and stderr to the same pipe p = subprocess.Popen([sys.executable, "-c", 'import sys;' \ 'sys.stdout.write("apple");' \ 'sys.stdout.flush();' \ 'sys.stderr.write("orange")'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) self.assertEqual(p.stdout.read(), "appleoran...
3761e8dd6600d1f93c9ba8a013aa5ba51ed6640b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3761e8dd6600d1f93c9ba8a013aa5ba51ed6640b/test_subprocess.py
self.assertEqual(tf.read(), "appleorange")
output = tf.read() stripped = remove_stderr_debug_decorations(output) self.assertEqual(stripped, "appleorange")
def test_stdout_stderr_file(self): # capture stdout and stderr to the same open file tf = tempfile.TemporaryFile() p = subprocess.Popen([sys.executable, "-c", 'import sys;' \ 'sys.stdout.write("apple");' \ 'sys.stdout.flush();' \ 'sys.stderr.write("orange")'], stdout=tf, stderr=tf) p.wait() tf.seek(0) self.assertEqual(...
3761e8dd6600d1f93c9ba8a013aa5ba51ed6640b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3761e8dd6600d1f93c9ba8a013aa5ba51ed6640b/test_subprocess.py
self.assertEqual(stderr, "pineapple")
self.assertEqual(remove_stderr_debug_decorations(stderr), "pineapple")
def test_communicate(self): p = subprocess.Popen([sys.executable, "-c", 'import sys,os;' \ 'sys.stderr.write("pineapple");' \ 'sys.stdout.write(sys.stdin.read())'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (stdout, stderr) = p.communicate("banana") self.assertEqual(stdout, "banana") self.a...
3761e8dd6600d1f93c9ba8a013aa5ba51ed6640b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3761e8dd6600d1f93c9ba8a013aa5ba51ed6640b/test_subprocess.py
self.assertEqual(stderr, "")
self.assertEqual(remove_stderr_debug_decorations(stderr), "")
def test_writes_before_communicate(self): # stdin.write before communicate() p = subprocess.Popen([sys.executable, "-c", 'import sys,os;' \ 'sys.stdout.write(sys.stdin.read())'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) p.stdin.write("banana") (stdout, stderr) = p.communicate("split") self...
3761e8dd6600d1f93c9ba8a013aa5ba51ed6640b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3761e8dd6600d1f93c9ba8a013aa5ba51ed6640b/test_subprocess.py
err('usage: classfix file-or-directory ...\n')
err('usage: ' + argv[0] + ' file-or-directory ...\n')
def main(): bad = 0 if not sys.argv[1:]: # No arguments err('usage: classfix file-or-directory ...\n') sys.exit(2) for arg in sys.argv[1:]: if path.isdir(arg): if recursedown(arg): bad = 1 elif path.islink(arg): err(arg + ': will not process symbolic links\n') bad = 1 else: if fix(arg): bad = 1 sys.exit(bad)
11e7f62dbc21d4f7f18994f4cccbe158544ea85b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/11e7f62dbc21d4f7f18994f4cccbe158544ea85b/classfix.py
ispython = regexp.compile('^[a-zA-Z0-9_]+\.py$').match
ispythonprog = regex.compile('^[a-zA-Z0-9_]+\.py$') def ispython(name): return ispythonprog.match(name) >= 0
def main(): bad = 0 if not sys.argv[1:]: # No arguments err('usage: classfix file-or-directory ...\n') sys.exit(2) for arg in sys.argv[1:]: if path.isdir(arg): if recursedown(arg): bad = 1 elif path.islink(arg): err(arg + ': will not process symbolic links\n') bad = 1 else: if fix(arg): bad = 1 sys.exit(bad)
11e7f62dbc21d4f7f18994f4cccbe158544ea85b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/11e7f62dbc21d4f7f18994f4cccbe158544ea85b/classfix.py
if recursedown(fullname): bad = 1
subdirs.append(fullname)
def recursedown(dirname): dbg('recursedown(' + `dirname` + ')\n') bad = 0 try: names = posix.listdir(dirname) except posix.error, msg: err(dirname + ': cannot list directory: ' + `msg` + '\n') return 1 for name in names: if name in ('.', '..'): continue fullname = path.join(dirname, name) if path.islink(fullname): pass...
11e7f62dbc21d4f7f18994f4cccbe158544ea85b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/11e7f62dbc21d4f7f18994f4cccbe158544ea85b/classfix.py
classexpr = '^([ \t]*class +[a-zA-Z0-9_]+) *\( *\) *((=.*)?):' findclass = regexp.compile(classexpr).match baseexpr = '^ *(.*) *\( *\) *$' findbase = regexp.compile(baseexpr).match
def recursedown(dirname): dbg('recursedown(' + `dirname` + ')\n') bad = 0 try: names = posix.listdir(dirname) except posix.error, msg: err(dirname + ': cannot list directory: ' + `msg` + '\n') return 1 for name in names: if name in ('.', '..'): continue fullname = path.join(dirname, name) if path.islink(fullname): pass...
11e7f62dbc21d4f7f18994f4cccbe158544ea85b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/11e7f62dbc21d4f7f18994f4cccbe158544ea85b/classfix.py
dbg('fix(' + `filename` + ')\n')
def fix(filename):
11e7f62dbc21d4f7f18994f4cccbe158544ea85b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/11e7f62dbc21d4f7f18994f4cccbe158544ea85b/classfix.py
tf = None
g = None
def fix(filename):
11e7f62dbc21d4f7f18994f4cccbe158544ea85b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/11e7f62dbc21d4f7f18994f4cccbe158544ea85b/classfix.py
res = findclass(line) if not res: if tf: tf.write(line) continue if not tf: try: tf = open(tempname, 'w') except IOError, msg: f.close() err(tempname+': cannot create: '+`msg`+'\n') return 1 rep(filename + ':\n') f.seek(0) continue a0, b0 = res[0] a1, b1 = res[1] a2, b2 = res[2] head = line[:b1] tail = line[b0:] if a2...
lineno = lineno + 1 while line[-2:] == '\\\n': nextline = f.readline() if not nextline: break line = line + nextline lineno = lineno + 1 newline = fixline(line) if newline != line: if g is None: try: g = open(tempname, 'w') except IOError, msg: f.close() err(tempname+': cannot create: '+\ `msg`+'\n') return 1 f.seek(0)...
def fix(filename):
11e7f62dbc21d4f7f18994f4cccbe158544ea85b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/11e7f62dbc21d4f7f18994f4cccbe158544ea85b/classfix.py
if not tf: return 0
if not g: return 0
def fix(filename):
11e7f62dbc21d4f7f18994f4cccbe158544ea85b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/11e7f62dbc21d4f7f18994f4cccbe158544ea85b/classfix.py
def cmp(f1, f2):
def cmp(f1, f2, shallow=1):
def cmp(f1, f2): # Compare two files, use the cache if possible. # Return 1 for identical files, 0 for different. # Raise exceptions if either file could not be statted, read, etc. s1, s2 = sig(os.stat(f1)), sig(os.stat(f2)) if s1[0] <> 8 or s2[0] <> 8: # Either is a not a plain file -- always report as different retur...
3aa9ca147b24eb55b350f5dea9ccdf37673de044 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3aa9ca147b24eb55b350f5dea9ccdf37673de044/cmp.py
if s1 == s2:
if shallow and s1 == s2:
def cmp(f1, f2): # Compare two files, use the cache if possible. # Return 1 for identical files, 0 for different. # Raise exceptions if either file could not be statted, read, etc. s1, s2 = sig(os.stat(f1)), sig(os.stat(f2)) if s1[0] <> 8 or s2[0] <> 8: # Either is a not a plain file -- always report as different retur...
3aa9ca147b24eb55b350f5dea9ccdf37673de044 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3aa9ca147b24eb55b350f5dea9ccdf37673de044/cmp.py
'include_dirs', if given, must be a list of strings, the directories to add to the default include file search path for this compilation only.
'include_dirs', if given, must be a list of strings, the directories to add to the default include file search path for this compilation only. 'debug' is a boolean; if true, the compiler will be instructed to output debug symbols in (or alongside) the object file(s).
def compile (self, sources, output_dir=None, macros=None, include_dirs=None, extra_preargs=None, extra_postargs=None): """Compile one or more C/C++ source files. 'sources' must be a list of strings, each one the name of a C/C++ source file. Return a list of the object filenames generated (one for each source filename...
3c045a576649ddf28eb6f9b33c749e8db0dd2255 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3c045a576649ddf28eb6f9b33c749e8db0dd2255/ccompiler.py
output_dir=None):
output_dir=None, debug=0):
def link_static_lib (self, objects, output_libname, output_dir=None): """Link a bunch of stuff together to create a static library file. The "bunch of stuff" consists of the list of object files supplied as 'objects', the extra object files supplied to 'add_link_object()' and/or 'set_link_objects()', the libraries sup...
3c045a576649ddf28eb6f9b33c749e8db0dd2255 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3c045a576649ddf28eb6f9b33c749e8db0dd2255/ccompiler.py
'output_libname' should be a library name, not a filename; the filename will be inferred from the library name.
'output_libname' should be a library name, not a filename; the filename will be inferred from the library name. 'output_dir' is the directory where the library file will be put. 'debug' is a boolean; if true, debugging information will be included in the library (note that on most platforms, it is the compile step wh...
def link_static_lib (self, objects, output_libname, output_dir=None): """Link a bunch of stuff together to create a static library file. The "bunch of stuff" consists of the list of object files supplied as 'objects', the extra object files supplied to 'add_link_object()' and/or 'set_link_objects()', the libraries sup...
3c045a576649ddf28eb6f9b33c749e8db0dd2255 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3c045a576649ddf28eb6f9b33c749e8db0dd2255/ccompiler.py
for the particular linker being used).""" pass def link_shared_lib (self, objects, output_libname, output_dir=None, libraries=None, library_dirs=None, extra_preargs=None, extra_postargs=None): """Link a bunch of stuff together to create a shared library file. Has the same effect as 'link_static_lib()' except that t...
for the particular linker being used)."""
def link_static_lib (self, objects, output_libname, output_dir=None): """Link a bunch of stuff together to create a static library file. The "bunch of stuff" consists of the list of object files supplied as 'objects', the extra object files supplied to 'add_link_object()' and/or 'set_link_objects()', the libraries sup...
3c045a576649ddf28eb6f9b33c749e8db0dd2255 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3c045a576649ddf28eb6f9b33c749e8db0dd2255/ccompiler.py
def _fix_link_args (self, objects, output_dir, takes_libs=0, libraries=None, library_dirs=None): """Typecheck and fix up some of the arguments supplied to the 'link_*' methods and return the fixed values. Specifically: ensure that 'objects' is a list; if output_dir is None, use self.output_dir; ensure that 'libraries'...
def _fix_object_args (self, objects, output_dir): """Typecheck and fix up some arguments supplied to various methods. Specifically: ensure that 'objects' is a list; if output_dir is None, replace with self.output_dir. Return fixed versions of 'objects' and 'output_dir'."""
def _fix_link_args (self, objects, output_dir, takes_libs=0, libraries=None, library_dirs=None): """Typecheck and fix up some of the arguments supplied to the 'link_*' methods and return the fixed values. Specifically: ensure that 'objects' is a list; if output_dir is None, use self.output_dir; ensure that 'libraries'...
f10f95d6bb7854ba2b3a8f6b554bcb8baecd7674 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f10f95d6bb7854ba2b3a8f6b554bcb8baecd7674/ccompiler.py
if takes_libs: if libraries is None: libraries = self.libraries elif type (libraries) in (ListType, TupleType): libraries = list (libraries) + (self.libraries or []) else: raise TypeError, \ "'libraries' (if supplied) must be a list of strings" if library_dirs is None: library_dirs = self.library_dirs elif type (libra...
return (objects, output_dir) def _fix_lib_args (self, libraries, library_dirs, runtime_library_dirs): """Typecheck and fix up some of the arguments supplied to the 'link_*' methods. Specifically: ensure that all arguments are lists, and augment them with their permanent versions (eg. 'self.libraries' augments 'libra...
def _fix_link_args (self, objects, output_dir, takes_libs=0, libraries=None, library_dirs=None): """Typecheck and fix up some of the arguments supplied to the 'link_*' methods and return the fixed values. Specifically: ensure that 'objects' is a list; if output_dir is None, use self.output_dir; ensure that 'libraries'...
f10f95d6bb7854ba2b3a8f6b554bcb8baecd7674 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f10f95d6bb7854ba2b3a8f6b554bcb8baecd7674/ccompiler.py
return (objects, output_dir)
raise TypeError, \ "'libraries' (if supplied) must be a list of strings" if library_dirs is None: library_dirs = self.library_dirs elif type (library_dirs) in (ListType, TupleType): library_dirs = list (library_dirs) + (self.library_dirs or []) else: raise TypeError, \ "'library_dirs' (if supplied) must be a list of s...
def _fix_link_args (self, objects, output_dir, takes_libs=0, libraries=None, library_dirs=None): """Typecheck and fix up some of the arguments supplied to the 'link_*' methods and return the fixed values. Specifically: ensure that 'objects' is a list; if output_dir is None, use self.output_dir; ensure that 'libraries'...
f10f95d6bb7854ba2b3a8f6b554bcb8baecd7674 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f10f95d6bb7854ba2b3a8f6b554bcb8baecd7674/ccompiler.py
print 'DBG interaction'
def edit_applet(name): pref_handle = openpreffile(READ) app_handle = openapplet(name) notfound = '' l, sr = getprefpath(OVERRIDE_PATH_STRINGS_ID) if l == None: notfound = 'path' l, dummy = getprefpath(PATH_STRINGS_ID) if l == None: message('Cannot find any sys.path resource! (Old python?)') sys.exit(0) fss, dr, fss_...
ebacc2edff21800fc7c917a201ffde472f9bcb00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ebacc2edff21800fc7c917a201ffde472f9bcb00/EditPythonPrefs.py
del dir, L
del dir, dircase, L
def makepath(*paths): dir = os.path.abspath(os.path.join(*paths)) return dir, os.path.normcase(dir)
34172d5316d099535390777083ccb7849ac76322 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/34172d5316d099535390777083ccb7849ac76322/site.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()
1142d595eed6ee9a8bae0907d2347ddae0692651 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1142d595eed6ee9a8bae0907d2347ddae0692651/tkFileDialog.py
tests.remove("test_file") tests.insert(tests.index("test_optparse"), "test_file")
def main(tests=None, testdir=None, verbose=0, quiet=False, generate=False, exclude=False, single=False, randomize=False, fromfile=None, findleaks=False, use_resources=None, trace=False, coverdir='coverage', runleaks=False, huntrleaks=False, verbose2=False): """Execute a test suite. This also parses command-line option...
71dc0a043b288fe70d85addbef0dc361246d8d1c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/71dc0a043b288fe70d85addbef0dc361246d8d1c/regrtest.py
objects = self.object_filenames(sources, 1, outdir)
objects = self.object_filenames(sources, 0, outdir)
def _setup_compile(self, outdir, macros, incdirs, sources, depends, extra): """Process arguments and decide which source files to compile.
9a38dcf05743347c556660347a014620e3625949 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9a38dcf05743347c556660347a014620e3625949/ccompiler.py
objects = self.object_filenames(sources, strip_dir=1,
objects = self.object_filenames(sources, strip_dir=0,
def _prep_compile(self, sources, output_dir, depends=None): """Decide which souce files must be recompiled.
9a38dcf05743347c556660347a014620e3625949 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9a38dcf05743347c556660347a014620e3625949/ccompiler.py
"Strange! filename %s has two different module names" % \ (key, modules[key], other_module[key])
"Strange! filename %s has two different module " \ "names: %s and %s" % \ (key, modules[key], other_modules[key])
def update(self, other): """Merge in the data from another CoverageResults""" counts = self.counts other_counts = other.counts modules = self.modules other_modules = other.modules
66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c/trace.py
save_counts = 0):
save_counts = 0, summary = 0, coverdir = None):
def create_results_log(results, dirname = ".", show_missing = 1, save_counts = 0): import re # turn the counts data ("(filename, lineno) = count") into something # accessible on a per-file basis per_file = {} for filename, lineno in results.counts.keys(): lines_hit = per_file[filename] = per_file.get(filename, {}) line...
66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c/trace.py
fndir = os.path.dirname(filename) if filename[:1] == os.sep: coverpath = os.path.join(dirname, "."+fndir) else: coverpath = os.path.join(dirname, fndir)
modulename = os.path.split(results.modules[key])[1]
def create_results_log(results, dirname = ".", show_missing = 1, save_counts = 0): import re # turn the counts data ("(filename, lineno) = count") into something # accessible on a per-file basis per_file = {} for filename, lineno in results.counts.keys(): lines_hit = per_file[filename] = per_file.get(filename, {}) line...
66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c/trace.py
sys.stderr.write("%s: Could not open %s for reading " \ "because: %s - skipping\n" % \ ("trace", `filename`, err.strerror)) continue modulename = os.path.split(results.modules[key])[1] listfilename = os.path.join(coverpath, modulename + ".cover")
print >> sys.stderr, "trace: Could not open %s for reading " \ "because: %s - skipping" % (`filename`, err.strerror) continue
def create_results_log(results, dirname = ".", show_missing = 1, save_counts = 0): import re # turn the counts data ("(filename, lineno) = count") into something # accessible on a per-file basis per_file = {} for filename, lineno in results.counts.keys(): lines_hit = per_file[filename] = per_file.get(filename, {}) line...
66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c/trace.py
modulename = frame.f_globals["__name__"]
try: modulename = frame.f_globals["__name__"] except KeyError: modulename = None
def trace(self, frame, why, arg): if why == 'line': # something is fishy about getting the file name filename = frame.f_globals.get("__file__", None) if filename is None: filename = frame.f_code.co_filename modulename = frame.f_globals["__name__"]
66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c/trace.py
self.files = {'<string>': None}
self.files = {'<string>': None}
def __init__(self, ignore = Ignore()): self.ignore = ignore self.ignore_names = ignore._ignore # access ignore's cache (speed hack)
66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c/trace.py
modulename = frame.f_globals["__name__"]
try: modulename = frame.f_globals["__name__"] except KeyError: modulename = None
def trace(self, frame, why, arg): if why == 'line': filename = frame.f_code.co_filename modulename = frame.f_globals["__name__"]
66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c/trace.py
def trace(self, frame, why, arg): if why == 'line': filename = frame.f_code.co_filename modulename = frame.f_globals["__name__"]
66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c/trace.py
sys.stderr.write("%s: %s\n" % (sys.argv[0], msg))
print >> sys.stderr, "%s: %s" % (sys.argv[0], msg)
def _err_exit(msg): sys.stderr.write("%s: %s\n" % (sys.argv[0], msg)) sys.exit(1)
66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c/trace.py
opts, prog_argv = getopt.getopt(argv[1:], "tcrRf:d:m",
opts, prog_argv = getopt.getopt(argv[1:], "tcrRf:d:msC:",
def main(argv = None): import getopt if argv is None: argv = sys.argv try: opts, prog_argv = getopt.getopt(argv[1:], "tcrRf:d:m", ["help", "version", "trace", "count", "report", "no-report", "file=", "logdir=", "missing", "ignore-module=", "ignore-dir="]) except getopt.error, msg: sys.stderr.write("%s: %s\n" % (sys.a...
66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c/trace.py
"ignore-module=", "ignore-dir="])
"ignore-module=", "ignore-dir=", "coverdir="])
def main(argv = None): import getopt if argv is None: argv = sys.argv try: opts, prog_argv = getopt.getopt(argv[1:], "tcrRf:d:m", ["help", "version", "trace", "count", "report", "no-report", "file=", "logdir=", "missing", "ignore-module=", "ignore-dir="]) except getopt.error, msg: sys.stderr.write("%s: %s\n" % (sys.a...
66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c/trace.py
sys.stderr.write("%s: %s\n" % (sys.argv[0], msg)) sys.stderr.write("Try `%s --help' for more information\n" % sys.argv[0])
print >> sys.stderr, "%s: %s" % (sys.argv[0], msg) print >> sys.stderr, "Try `%s --help' for more information" \ % sys.argv[0]
def main(argv = None): import getopt if argv is None: argv = sys.argv try: opts, prog_argv = getopt.getopt(argv[1:], "tcrRf:d:m", ["help", "version", "trace", "count", "report", "no-report", "file=", "logdir=", "missing", "ignore-module=", "ignore-dir="]) except getopt.error, msg: sys.stderr.write("%s: %s\n" % (sys.a...
66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c/trace.py
create_results_log(results, logdir, missing)
create_results_log(results, logdir, missing, summary=summary, coverdir=coverdir)
def main(argv = None): import getopt if argv is None: argv = sys.argv try: opts, prog_argv = getopt.getopt(argv[1:], "tcrRf:d:m", ["help", "version", "trace", "count", "report", "no-report", "file=", "logdir=", "missing", "ignore-module=", "ignore-dir="]) except getopt.error, msg: sys.stderr.write("%s: %s\n" % (sys.a...
66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c/trace.py
create_results_log(results, logdir, missing)
create_results_log(results, logdir, missing, summary=summary, coverdir=coverdir)
def main(argv = None): import getopt if argv is None: argv = sys.argv try: opts, prog_argv = getopt.getopt(argv[1:], "tcrRf:d:m", ["help", "version", "trace", "count", "report", "no-report", "file=", "logdir=", "missing", "ignore-module=", "ignore-dir="]) except getopt.error, msg: sys.stderr.write("%s: %s\n" % (sys.a...
66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c/trace.py
ckmsg(s, "'continue' not supported inside 'finally' clause")
if sys.platform.startswith('java'): print "'continue' not supported inside 'finally' clause" print "ok" else: ckmsg(s, "'continue' not supported inside 'finally' clause")
def ckmsg(src, msg): try: compile(src, '<fragment>', 'exec') except SyntaxError, e: print e.msg if e.msg == msg: print "ok" else: print "expected:", msg else: print "failed to get expected SyntaxError"
aa3dc456583aaffcccc16da82bb68669264880b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/aa3dc456583aaffcccc16da82bb68669264880b4/test_exceptions.py
test_capi1()
def test_capi1(): try: _testcapi.raise_exception(BadException, 1) except TypeError, err: exc, err, tb = sys.exc_info() co = tb.tb_frame.f_code assert co.co_name == "test_capi1" assert co.co_filename.endswith('test_exceptions.py') else: print "Expected exception"
aa3dc456583aaffcccc16da82bb68669264880b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/aa3dc456583aaffcccc16da82bb68669264880b4/test_exceptions.py
test_capi2()
if not sys.platform.startswith('java'): test_capi1() test_capi2()
def test_capi2(): try: _testcapi.raise_exception(BadException, 0) except RuntimeError, err: exc, err, tb = sys.exc_info() co = tb.tb_frame.f_code assert co.co_name == "__init__" assert co.co_filename.endswith('test_exceptions.py') co2 = tb.tb_frame.f_back.f_code assert co2.co_name == "test_capi2" else: print "Expected ...
aa3dc456583aaffcccc16da82bb68669264880b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/aa3dc456583aaffcccc16da82bb68669264880b4/test_exceptions.py
self.scriptsfolder = fss.NewAlias()
def makeusermenus(self): m = Wapplication.Menu(self.menubar, "File") newitem = FrameWork.MenuItem(m, "New", "N", 'new') openitem = FrameWork.MenuItem(m, "Open", "O", 'open') FrameWork.Separator(m) closeitem = FrameWork.MenuItem(m, "Close", "W", 'close') saveitem = FrameWork.MenuItem(m, "Save", "S", 'save') saveasitem =...
68922f06bf8fecc15c16e911f5f0a58ec6eabc18 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/68922f06bf8fecc15c16e911f5f0a58ec6eabc18/PythonIDEMain.py
cmd = sys.argv[0]
cmd = os.path.basename(sys.argv[0])
def stopped(): print 'pydoc server stopped'
f9b08b8e609916f970dc5ba2e41c9dbe1897240a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f9b08b8e609916f970dc5ba2e41c9dbe1897240a/pydoc.py
db.DB_INIT_LOCK | db.DB_THREAD)
db.DB_INIT_LOCK | db.DB_THREAD | self.envFlags)
def setUp(self): self.filename = self.__class__.__name__ + '.db' homeDir = os.path.join(os.path.dirname(sys.argv[0]), 'db_home') self.homeDir = homeDir try: os.mkdir(homeDir) except os.error: pass self.env = db.DBEnv() self.env.open(homeDir, db.DB_CREATE | db.DB_INIT_MPOOL | db.DB_INIT_LOCK | db.DB_THREAD)
48796c32417750810d9aea2e0cf5695146821f6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/48796c32417750810d9aea2e0cf5695146821f6f/test_associate.py
def addDataToDB(self, d):
def addDataToDB(self, d, txn=None):
def addDataToDB(self, d): for key, value in musicdata.items(): if type(self.keytype) == type(''): key = "%02d" % key d.put(key, string.join(value, '|'))
48796c32417750810d9aea2e0cf5695146821f6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/48796c32417750810d9aea2e0cf5695146821f6f/test_associate.py
d.put(key, string.join(value, '|')) def createDB(self):
d.put(key, string.join(value, '|'), txn=txn) def createDB(self, txn=None):
def addDataToDB(self, d): for key, value in musicdata.items(): if type(self.keytype) == type(''): key = "%02d" % key d.put(key, string.join(value, '|'))
48796c32417750810d9aea2e0cf5695146821f6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/48796c32417750810d9aea2e0cf5695146821f6f/test_associate.py
db.DB_CREATE | db.DB_THREAD)
db.DB_CREATE | db.DB_THREAD | self.dbFlags, txn=txn)
def createDB(self): self.primary = db.DB(self.env) self.primary.set_get_returns_none(2) self.primary.open(self.filename, "primary", self.dbtype, db.DB_CREATE | db.DB_THREAD)
48796c32417750810d9aea2e0cf5695146821f6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/48796c32417750810d9aea2e0cf5695146821f6f/test_associate.py
db.DB_CREATE | db.DB_THREAD)
db.DB_CREATE | db.DB_THREAD | self.dbFlags)
def test01_associateWithDB(self): if verbose: print '\n', '-=' * 30 print "Running %s.test01_associateWithDB..." % \ self.__class__.__name__
48796c32417750810d9aea2e0cf5695146821f6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/48796c32417750810d9aea2e0cf5695146821f6f/test_associate.py
db.DB_CREATE | db.DB_THREAD)
db.DB_CREATE | db.DB_THREAD | self.dbFlags)
def test02_associateAfterDB(self): if verbose: print '\n', '-=' * 30 print "Running %s.test02_associateAfterDB..." % \ self.__class__.__name__
48796c32417750810d9aea2e0cf5695146821f6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/48796c32417750810d9aea2e0cf5695146821f6f/test_associate.py
def finish_test(self, secDB):
def finish_test(self, secDB, txn=None):
def finish_test(self, secDB): # 'Blues' should not be in the secondary database vals = secDB.pget('Blues') assert vals == None, vals
48796c32417750810d9aea2e0cf5695146821f6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/48796c32417750810d9aea2e0cf5695146821f6f/test_associate.py
vals = secDB.pget('Blues')
vals = secDB.pget('Blues', txn=txn)
def finish_test(self, secDB): # 'Blues' should not be in the secondary database vals = secDB.pget('Blues') assert vals == None, vals
48796c32417750810d9aea2e0cf5695146821f6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/48796c32417750810d9aea2e0cf5695146821f6f/test_associate.py
vals = secDB.pget('Unknown')
vals = secDB.pget('Unknown', txn=txn)
def finish_test(self, secDB): # 'Blues' should not be in the secondary database vals = secDB.pget('Blues') assert vals == None, vals
48796c32417750810d9aea2e0cf5695146821f6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/48796c32417750810d9aea2e0cf5695146821f6f/test_associate.py
c = self.getDB().cursor()
c = self.getDB().cursor(txn)
def finish_test(self, secDB): # 'Blues' should not be in the secondary database vals = secDB.pget('Blues') assert vals == None, vals
48796c32417750810d9aea2e0cf5695146821f6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/48796c32417750810d9aea2e0cf5695146821f6f/test_associate.py
c = secDB.cursor()
c = secDB.cursor(txn)
def finish_test(self, secDB): # 'Blues' should not be in the secondary database vals = secDB.pget('Blues') assert vals == None, vals
48796c32417750810d9aea2e0cf5695146821f6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/48796c32417750810d9aea2e0cf5695146821f6f/test_associate.py
host = user + ':' + passwd + '@' + host
host = quote(user, safe='') + ':' + quote(passwd, safe='') + '@' + host
def retry_http_basic_auth(self, url, realm, data=None): host, selector = splithost(url) i = host.find('@') + 1 host = host[i:] user, passwd = self.get_user_passwd(host, realm, i) if not (user or passwd): return None host = user + ':' + passwd + '@' + host newurl = 'http://' + host + selector if data is None: return sel...
afc4f0413ae7c307207772373937b0eb1e0a645b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/afc4f0413ae7c307207772373937b0eb1e0a645b/urllib.py
host = user + ':' + passwd + '@' + host
host = quote(user, safe='') + ':' + quote(passwd, safe='') + '@' + host
def retry_https_basic_auth(self, url, realm, data=None): host, selector = splithost(url) i = host.find('@') + 1 host = host[i:] user, passwd = self.get_user_passwd(host, realm, i) if not (user or passwd): return None host = user + ':' + passwd + '@' + host newurl = '//' + host + selector return self.open_https(newurl)
afc4f0413ae7c307207772373937b0eb1e0a645b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/afc4f0413ae7c307207772373937b0eb1e0a645b/urllib.py
return self.open_https(newurl)
return self.open_https(newurl, data)
def retry_https_basic_auth(self, url, realm, data=None): host, selector = splithost(url) i = host.find('@') + 1 host = host[i:] user, passwd = self.get_user_passwd(host, realm, i) if not (user or passwd): return None host = user + ':' + passwd + '@' + host newurl = '//' + host + selector return self.open_https(newurl)
afc4f0413ae7c307207772373937b0eb1e0a645b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/afc4f0413ae7c307207772373937b0eb1e0a645b/urllib.py
>>> x = [pickle.PicklingError()] * 2
>>> from pickletools import _Example >>> x = [_Example(42)] * 2
def dis(pickle, out=None, memo=None, indentlevel=4): """Produce a symbolic disassembly of a pickle. 'pickle' is a file-like object, or string, containing a (at least one) pickle. The pickle is disassembled from the current position, through the first STOP opcode encountered. Optional arg 'out' is a file-like object ...
90718a4eb5a21d903d9cefdb7f8cdb50e847187b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/90718a4eb5a21d903d9cefdb7f8cdb50e847187b/pickletools.py
6: i INST 'pickle PicklingError' (MARK at 5)
6: i INST 'pickletools _Example' (MARK at 5)
def dis(pickle, out=None, memo=None, indentlevel=4): """Produce a symbolic disassembly of a pickle. 'pickle' is a file-like object, or string, containing a (at least one) pickle. The pickle is disassembled from the current position, through the first STOP opcode encountered. Optional arg 'out' is a file-like object ...
90718a4eb5a21d903d9cefdb7f8cdb50e847187b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/90718a4eb5a21d903d9cefdb7f8cdb50e847187b/pickletools.py
36: S STRING 'args' 44: p PUT 3 47: ( MARK 48: t TUPLE (MARK at 47) 49: s SETITEM 50: b BUILD 51: a APPEND 52: g GET 1 55: a APPEND 56: . STOP
36: S STRING 'value' 45: p PUT 3 48: I INT 42 52: s SETITEM 53: b BUILD 54: a APPEND 55: g GET 1 58: a APPEND 59: . STOP
def dis(pickle, out=None, memo=None, indentlevel=4): """Produce a symbolic disassembly of a pickle. 'pickle' is a file-like object, or string, containing a (at least one) pickle. The pickle is disassembled from the current position, through the first STOP opcode encountered. Optional arg 'out' is a file-like object ...
90718a4eb5a21d903d9cefdb7f8cdb50e847187b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/90718a4eb5a21d903d9cefdb7f8cdb50e847187b/pickletools.py
5: c GLOBAL 'pickle PicklingError'
5: c GLOBAL 'pickletools _Example'
def dis(pickle, out=None, memo=None, indentlevel=4): """Produce a symbolic disassembly of a pickle. 'pickle' is a file-like object, or string, containing a (at least one) pickle. The pickle is disassembled from the current position, through the first STOP opcode encountered. Optional arg 'out' is a file-like object ...
90718a4eb5a21d903d9cefdb7f8cdb50e847187b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/90718a4eb5a21d903d9cefdb7f8cdb50e847187b/pickletools.py
35: U SHORT_BINSTRING 'args' 41: q BINPUT 4 43: ) EMPTY_TUPLE 44: s SETITEM 45: b BUILD 46: h BINGET 2 48: e APPENDS (MARK at 3) 49: . STOP
35: U SHORT_BINSTRING 'value' 42: q BINPUT 4 44: K BININT1 42 46: s SETITEM 47: b BUILD 48: h BINGET 2 50: e APPENDS (MARK at 3) 51: . STOP
def dis(pickle, out=None, memo=None, indentlevel=4): """Produce a symbolic disassembly of a pickle. 'pickle' is a file-like object, or string, containing a (at least one) pickle. The pickle is disassembled from the current position, through the first STOP opcode encountered. Optional arg 'out' is a file-like object ...
90718a4eb5a21d903d9cefdb7f8cdb50e847187b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/90718a4eb5a21d903d9cefdb7f8cdb50e847187b/pickletools.py
self.baseFilename = filename
self.baseFilename = os.path.abspath(filename)
def __init__(self, filename, mode="a"): """ Open the specified file and use it as the stream for logging. """ StreamHandler.__init__(self, open(filename, mode)) self.baseFilename = filename self.mode = mode
4bbab2bde4fa7df27d9b9f04793d53d4754e22b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4bbab2bde4fa7df27d9b9f04793d53d4754e22b4/__init__.py
UpdateEditIdle = "UpdateEditIDLE"
UpdateEditIDLE = "UpdateEditIDLE"
def add_ui(db): x = y = 50 w = 370 h = 300 title = "[ProductName] Setup" # see "Dialog Style Bits" modal = 3 # visible | modal modeless = 1 # visible track_disk_space = 32 add_data(db, 'ActionText', uisample.ActionText) add_data(db, 'UIText', uisample.UIText) # Bitmaps if not os.path.exists(srcdir+r"\PC\pytho...
df40ce3646a4bd099b10a5b92e7333e0141fef7e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/df40ce3646a4bd099b10a5b92e7333e0141fef7e/msi.py
return (action, pattern, dir, dir_pattern)
return (action, patterns, dir, dir_pattern)
def _parse_template_line (self, line): words = string.split (line) action = words[0]
d5dcc174b0b8d3bef3e51b64f6fb1383e803cdd0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d5dcc174b0b8d3bef3e51b64f6fb1383e803cdd0/filelist.py
epoch = time.gmtime(0)[0]
gm_epoch = time.gmtime(0)[0:3] loc_epoch = time.localtime(0)[0:3]
def test_formatdate(self): now = 1005327232.109884 epoch = time.gmtime(0)[0] # When does the epoch start? if epoch == 1970: # traditional Unix epoch matchdate = 'Fri, 09 Nov 2001 17:33:52 -0000' elif epoch == 1904: # Mac epoch matchdate = 'Sat, 09 Nov 1935 16:33:52 -0000' else: matchdate = "I don't understand your epoc...
e274864004995f7b8b80abe1cea61b5ec8111ad7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e274864004995f7b8b80abe1cea61b5ec8111ad7/test_email.py
if epoch == 1970:
if gm_epoch == (1970, 1, 1):
def test_formatdate(self): now = 1005327232.109884 epoch = time.gmtime(0)[0] # When does the epoch start? if epoch == 1970: # traditional Unix epoch matchdate = 'Fri, 09 Nov 2001 17:33:52 -0000' elif epoch == 1904: # Mac epoch matchdate = 'Sat, 09 Nov 1935 16:33:52 -0000' else: matchdate = "I don't understand your epoc...
e274864004995f7b8b80abe1cea61b5ec8111ad7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e274864004995f7b8b80abe1cea61b5ec8111ad7/test_email.py
elif epoch == 1904:
elif loc_epoch == (1904, 1, 1):
def test_formatdate(self): now = 1005327232.109884 epoch = time.gmtime(0)[0] # When does the epoch start? if epoch == 1970: # traditional Unix epoch matchdate = 'Fri, 09 Nov 2001 17:33:52 -0000' elif epoch == 1904: # Mac epoch matchdate = 'Sat, 09 Nov 1935 16:33:52 -0000' else: matchdate = "I don't understand your epoc...
e274864004995f7b8b80abe1cea61b5ec8111ad7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e274864004995f7b8b80abe1cea61b5ec8111ad7/test_email.py
if self.runtime_library_dirs:
if runtime_library_dirs:
def link_shared_object (self, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, debug=0, extra_preargs=None, extra_postargs=None):
f70c6031495f885839f077f06858b33cd0c04d2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f70c6031495f885839f077f06858b33cd0c04d2b/msvccompiler.py
if type (output_dir) not in (StringType, NoneType): raise TypeError, "'output_dir' must be a string or None"
def link_shared_object (self, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, debug=0, extra_preargs=None, extra_postargs=None):
f70c6031495f885839f077f06858b33cd0c04d2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f70c6031495f885839f077f06858b33cd0c04d2b/msvccompiler.py
if not self._dict['Download-URL']: return "%s: This package needs to be installed manually (no Download-URL field)" % _fmtpackagename(self)
if not self._dict.get('Download-URL'): return "%s: This package needs to be installed manually (no Download-URL field)" % self.fullname()
def installSinglePackage(self, output=None): """Download, unpack and install a single package. If output is given it should be a file-like object and it will receive a log of what happened.""" if not self._dict['Download-URL']: return "%s: This package needs to be installed manually (no Download-URL field)" % _fmtpac...
749f481478023f3aea9c2e7456240e84d8efe188 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/749f481478023f3aea9c2e7456240e84d8efe188/pimp.py
origin_req_host = cookielib.request_host(self)
origin_req_host = request_host(self)
def __init__(self, url, data=None, headers={}, origin_req_host=None, unverifiable=False): # 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 = {}...
9d6da3e2f29344598178243bb519bc68ad8045b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9d6da3e2f29344598178243bb519bc68ad8045b4/urllib2.py
if inspect.isclass(check):
if isclass(check):
def build_opener(*handlers): """Create an opener object from a list of handlers. The opener will use several default handlers, including support for HTTP and FTP. If any of the handlers passed as arguments are subclasses of the default handlers, the default handlers will not be used. """ opener = OpenerDirector() de...
9d6da3e2f29344598178243bb519bc68ad8045b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9d6da3e2f29344598178243bb519bc68ad8045b4/urllib2.py
if inspect.isclass(h):
if isclass(h):
def build_opener(*handlers): """Create an opener object from a list of handlers. The opener will use several default handlers, including support for HTTP and FTP. If any of the handlers passed as arguments are subclasses of the default handlers, the default handlers will not be used. """ opener = OpenerDirector() de...
9d6da3e2f29344598178243bb519bc68ad8045b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9d6da3e2f29344598178243bb519bc68ad8045b4/urllib2.py
default_startupinfo = STARTUPINFO()
def _execute_child(self, args, executable, preexec_fn, close_fds, cwd, env, universal_newlines, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite): """Execute program (MS Windows version)"""
ad62489e4706ec4ad6cf24a067969e8d64612fcb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ad62489e4706ec4ad6cf24a067969e8d64612fcb/subprocess.py
startupinfo = default_startupinfo if not None in (p2cread, c2pwrite, errwrite):
startupinfo = STARTUPINFO() if None not in (p2cread, c2pwrite, errwrite):
def _execute_child(self, args, executable, preexec_fn, close_fds, cwd, env, universal_newlines, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite): """Execute program (MS Windows version)"""
ad62489e4706ec4ad6cf24a067969e8d64612fcb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ad62489e4706ec4ad6cf24a067969e8d64612fcb/subprocess.py
default_startupinfo.dwFlags |= STARTF_USESHOWWINDOW default_startupinfo.wShowWindow = SW_HIDE
startupinfo.dwFlags |= STARTF_USESHOWWINDOW startupinfo.wShowWindow = SW_HIDE
def _execute_child(self, args, executable, preexec_fn, close_fds, cwd, env, universal_newlines, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite): """Execute program (MS Windows version)"""
ad62489e4706ec4ad6cf24a067969e8d64612fcb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ad62489e4706ec4ad6cf24a067969e8d64612fcb/subprocess.py
self.checkequal(('this', ' is ', 'the partition method'), 'this is the partition method', 'partition', ' is ')
self.checkequal(('this is the par', 'ti', 'tion method'), 'this is the partition method', 'partition', 'ti')
def test_partition(self):
9c0e9c089c758bc9b64f0379bc93f8ea6740eb53 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9c0e9c089c758bc9b64f0379bc93f8ea6740eb53/string_tests.py
makevars = parsesetup.getmakevars(makefile_in)
def main(): # overridable context prefix = None # settable with -p option exec_prefix = None # settable with -P option extensions = [] path = sys.path odir = '' win = sys.platform[:3] == 'win' # output files frozen_c = 'frozen.c' config_c = 'config.c' target = 'a.out' ...
345df170e6bc8daf8cd3687a167a910d7e4f593a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/345df170e6bc8daf8cd3687a167a910d7e4f593a/freeze.py
self.assert_(len(items) == 0, "iterator did not touch all items")
self.assert_(len(items) == 0, "iteritems() did not touch all items")
def check_iters(self, dict): # item iterator: items = dict.items() for item in dict.iteritems(): items.remove(item) self.assert_(len(items) == 0, "iterator did not touch all items")
aaa48ff5c90dc0d9d6ab5c91392e02287a1133e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/aaa48ff5c90dc0d9d6ab5c91392e02287a1133e7/test_weakref.py
self.assert_(len(keys) == 0, "iterator did not touch all keys")
self.assert_(len(keys) == 0, "__iter__() did not touch all keys") keys = dict.keys() for k in dict.iterkeys(): keys.remove(k) self.assert_(len(keys) == 0, "iterkeys() did not touch all keys")
def check_iters(self, dict): # item iterator: items = dict.items() for item in dict.iteritems(): items.remove(item) self.assert_(len(items) == 0, "iterator did not touch all items")
aaa48ff5c90dc0d9d6ab5c91392e02287a1133e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/aaa48ff5c90dc0d9d6ab5c91392e02287a1133e7/test_weakref.py
self.assert_(len(values) == 0, "iterator did not touch all values")
self.assert_(len(values) == 0, "itervalues() did not touch all values")
def check_iters(self, dict): # item iterator: items = dict.items() for item in dict.iteritems(): items.remove(item) self.assert_(len(items) == 0, "iterator did not touch all items")
aaa48ff5c90dc0d9d6ab5c91392e02287a1133e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/aaa48ff5c90dc0d9d6ab5c91392e02287a1133e7/test_weakref.py
underline=0,indicatoron=FALSE,highlightthickness=0,
indicatoron=FALSE,highlightthickness=0,
def __init__(self,parent): Frame.__init__(self, parent,borderwidth=2,relief=RIDGE) self.button=Radiobutton(self,padx=5,pady=5,takefocus=FALSE, underline=0,indicatoron=FALSE,highlightthickness=0, borderwidth=0,selectcolor=self.cget('bg')) self.button.pack()
361cfcd69b62b37acebe99417fa13a1e62a1ca7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/361cfcd69b62b37acebe99417fa13a1e62a1ca7b/tabpage.py
def __init__(self,parent,pageNames,**kw):
def __init__(self,parent,pageNames=[],**kw):
def __init__(self,parent,pageNames,**kw): """ pageNames - a list of strings, each string will be the dictionary key to a page's data, and the name displayed on the page's tab. Should be specified in desired page order. The first page will be the default and first active page. """ Frame.__init__(self, parent, kw) self.g...
361cfcd69b62b37acebe99417fa13a1e62a1ca7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/361cfcd69b62b37acebe99417fa13a1e62a1ca7b/tabpage.py
filename = fp.read(centdir[12])
filename = fp.read(centdir[_CD_FILENAME_LENGTH])
def _GetContents(self): """Read in the table of contents for the ZIP file.""" fp = self.fp fp.seek(-22, 2) # Start of end-of-archive record filesize = fp.tell() + 22 # Get file size endrec = fp.read(22) # Archive must not end with a comment! if endrec[0:4] != stringEndArchive or endrec[-2:] != "\000\00...
3e038e5e2551df9d37e1d44f7cc59cdce797f1a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3e038e5e2551df9d37e1d44f7cc59cdce797f1a3/zipfile.py
x.extra = fp.read(centdir[13]) x.comment = fp.read(centdir[14]) total = total + centdir[12] + centdir[13] + centdir[14] x.header_offset = centdir[18] + concat x.file_offset = x.header_offset + 30 + centdir[12] + centdir[13]
x.extra = fp.read(centdir[_CD_EXTRA_FIELD_LENGTH]) x.comment = fp.read(centdir[_CD_COMMENT_LENGTH]) total = (total + centdir[_CD_FILENAME_LENGTH] + centdir[_CD_EXTRA_FIELD_LENGTH] + centdir[_CD_COMMENT_LENGTH]) x.header_offset = centdir[_CD_LOCAL_HEADER_OFFSET] + concat
def _GetContents(self): """Read in the table of contents for the ZIP file.""" fp = self.fp fp.seek(-22, 2) # Start of end-of-archive record filesize = fp.tell() + 22 # Get file size endrec = fp.read(22) # Archive must not end with a comment! if endrec[0:4] != stringEndArchive or endrec[-2:] != "\000\00...
3e038e5e2551df9d37e1d44f7cc59cdce797f1a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3e038e5e2551df9d37e1d44f7cc59cdce797f1a3/zipfile.py
fname = fp.read(fheader[10])
data.file_offset = (data.header_offset + 30 + fheader[_FH_FILENAME_LENGTH] + fheader[_FH_EXTRA_FIELD_LENGTH]) fname = fp.read(fheader[_FH_FILENAME_LENGTH])
def _GetContents(self): """Read in the table of contents for the ZIP file.""" fp = self.fp fp.seek(-22, 2) # Start of end-of-archive record filesize = fp.tell() + 22 # Get file size endrec = fp.read(22) # Archive must not end with a comment! if endrec[0:4] != stringEndArchive or endrec[-2:] != "\000\00...
3e038e5e2551df9d37e1d44f7cc59cdce797f1a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3e038e5e2551df9d37e1d44f7cc59cdce797f1a3/zipfile.py
ext_modules=[Extension('struct', ['structmodule.c'])],
ext_modules=[Extension('_struct', ['_struct.c'])],
def main(): # turn off warnings when deprecated modules are imported import warnings warnings.filterwarnings("ignore",category=DeprecationWarning) setup(# PyPI Metadata (PEP 301) name = "Python", version = sys.version.split()[0], url = "http://www.python.org/%s" % sys.version[:3], maintainer = "Guido van Rossum and the...
7ccc95a315315568dd0660b5fb915f9e2e38f9da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7ccc95a315315568dd0660b5fb915f9e2e38f9da/setup.py
self.flag = 0
self.flags[flag] = 0
def clear_flags(self): """Reset all flags to zero""" for flag in self.flags: self.flag = 0
b1b605ef546c45eac3c53db369ea6e881f05dc8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b1b605ef546c45eac3c53db369ea6e881f05dc8b/decimal.py
self.saved_clear() self.hrefstack.append(href) def anchor_end(self): if self.proc: title = cgi.escape(self.saved_get(), True) path = self.path + '/' + self.hrefstack.pop()
def anchor_bgn(self, href, name, type): if self.proc: self.saved_clear() self.hrefstack.append(href)
4a0db06edf1e1be71d27c682f7bc0fb4040a5300 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4a0db06edf1e1be71d27c682f7bc0fb4040a5300/prechm.py
def anchor_end(self): if self.proc: title = cgi.escape(self.saved_get(), True) path = self.path + '/' + self.hrefstack.pop() # XXX See SF bug <http://www.python.org/sf/546579>. # XXX index.html for the 2.2 language reference manual contains # XXX nested <a></a> tags in the entry for the section on blank # XXX lines. W...
4a0db06edf1e1be71d27c682f7bc0fb4040a5300 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4a0db06edf1e1be71d27c682f7bc0fb4040a5300/prechm.py