rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
inc_dir = os.curdir
inc_dir = argv0_path
def get_config_h_filename(): """Return full pathname of installed pyconfig.h file.""" if python_build: inc_dir = os.curdir else: inc_dir = get_python_inc(plat_specific=1) if get_python_version() < '2.2': config_h = 'config.h' else: # The name of the config.h file changed in 2.2 config_h = 'pyconfig.h' return os.path.jo...
30d163f9d7e8b6ca2155b934ac5db61858e1e830 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d163f9d7e8b6ca2155b934ac5db61858e1e830/sysconfig.py
files=Open(**options).show() return files.split()
return Open(**options).show()
def askopenfilenames(**options): """Ask for multiple filenames to open Returns a list of filenames or empty list if cancel button selected """ options["multiple"]=1 files=Open(**options).show() return files.split()
3ef9ad10778df71252c6b207079341e7bcf5f62c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3ef9ad10778df71252c6b207079341e7bcf5f62c/tkFileDialog.py
import traceback print "Exception in Tkinter callback"
import traceback, sys sys.stderr.write("Exception in Tkinter callback\n")
def report_callback_exception(self, exc, val, tb): import traceback print "Exception in Tkinter callback" traceback.print_exception(exc, val, tb)
49d71203527affe5ab0e076d36a0cb91706b6f7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/49d71203527affe5ab0e076d36a0cb91706b6f7c/Tkinter.py
if not _default_root: _default_root = master
def _setup(self, master, cnf): if _support_default_root: global _default_root if not master: if not _default_root: _default_root = Tk() master = _default_root if not _default_root: _default_root = master self.master = master self.tk = master.tk name = None if cnf.has_key('name'): name = cnf['name'] del cnf['name'] if n...
49d71203527affe5ab0e076d36a0cb91706b6f7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/49d71203527affe5ab0e076d36a0cb91706b6f7c/Tkinter.py
self._addkey(key, (pos, siz))
def __setitem__(self, key, val): if not type(key) == type('') == type(val): raise TypeError, "keys and values must be strings" if not self._index.has_key(key): (pos, siz) = self._addval(val) self._addkey(key, (pos, siz)) else: pos, siz = self._index[key] oldblocks = (siz + _BLOCKSIZE - 1) / _BLOCKSIZE newblocks = (len(...
4f34386761f67b302752d6db8fe6861c497e99f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4f34386761f67b302752d6db8fe6861c497e99f6/dumbdbm.py
if object < 0xff:
if object <= 0xff:
def save_int(self, object, pack=struct.pack): if self.bin: # If the int is small enough to fit in a signed 4-byte 2's-comp # format, we can store it more efficiently than the general # case. # First one- and two-byte unsigned ints: if object >= 0: if object < 0xff: self.write(BININT1 + chr(object)) return if object < 0...
edd06b02fece0b6a3902addda2b0fed89fbd03a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/edd06b02fece0b6a3902addda2b0fed89fbd03a5/pickle.py
if object < 0xffff:
if object <= 0xffff:
def save_int(self, object, pack=struct.pack): if self.bin: # If the int is small enough to fit in a signed 4-byte 2's-comp # format, we can store it more efficiently than the general # case. # First one- and two-byte unsigned ints: if object >= 0: if object < 0xff: self.write(BININT1 + chr(object)) return if object < 0...
edd06b02fece0b6a3902addda2b0fed89fbd03a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/edd06b02fece0b6a3902addda2b0fed89fbd03a5/pickle.py
assert flags == 0
def search(pattern, string, flags=0): assert flags == 0 return compile(pattern, _fixflags(flags)).search(string)
e91b8ea58aaecdcbd45a2418ea98e049b3d0909f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e91b8ea58aaecdcbd45a2418ea98e049b3d0909f/sre.py
if isabs(b): path = b elif path == '' or path[-1:] in '/\\:': path = path + b else: path = path + "\\" + b
if len(path) == 2 and path[-1] == ":" and splitdrive(b)[0] == "": pass elif isabs(b) or path == "": path = "" elif path[-1:] not in "/\\": b = "\\" + b path += b
def join(a, *p): """Join two or more pathname components, inserting "\\" as needed""" path = a for b in p: if isabs(b): path = b elif path == '' or path[-1:] in '/\\:': path = path + b else: path = path + "\\" + b return path
51d36ede2de5b41f9f4c24381f61c7a42b36a954 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/51d36ede2de5b41f9f4c24381f61c7a42b36a954/ntpath.py
def triplet_to_pmwrgb(rgbtuple):
def triplet_to_fractional_rgb(rgbtuple):
def triplet_to_pmwrgb(rgbtuple): return map(operator.__div__, rgbtuple, _maxtuple)
13e1a0b3280c7581d388fb29481e168f1442267b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/13e1a0b3280c7581d388fb29481e168f1442267b/ColorDB.py
target = 'snow' red, green, blue = colordb.find_byname(target) print target, ':', red, green, blue, hex(rrggbb) name, aliases = colordb.find_byrgb((red, green, blue))
red, green, blue = rgbtuple = colordb.find_byname(target) print target, ':', red, green, blue, triplet_to_rrggbb(rgbtuple) name, aliases = colordb.find_byrgb(rgbtuple)
def triplet_to_pmwrgb(rgbtuple): return map(operator.__div__, rgbtuple, _maxtuple)
13e1a0b3280c7581d388fb29481e168f1442267b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/13e1a0b3280c7581d388fb29481e168f1442267b/ColorDB.py
nearest = apply(colordb.nearest, target)
nearest = colordb.nearest(target)
def triplet_to_pmwrgb(rgbtuple): return map(operator.__div__, rgbtuple, _maxtuple)
13e1a0b3280c7581d388fb29481e168f1442267b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/13e1a0b3280c7581d388fb29481e168f1442267b/ColorDB.py
methodname = 'repr_' + join(split(type(x).__name__), '_') if hasattr(self, methodname): return getattr(self, methodname)(x, level) else: return self.escape(cram(stripid(repr(x)), self.maxother))
if hasattr(type(x), '__name__'): methodname = 'repr_' + join(split(type(x).__name__), '_') if hasattr(self, methodname): return getattr(self, methodname)(x, level) return self.escape(cram(stripid(repr(x)), self.maxother))
def repr1(self, x, level): methodname = 'repr_' + join(split(type(x).__name__), '_') if hasattr(self, methodname): return getattr(self, methodname)(x, level) else: return self.escape(cram(stripid(repr(x)), self.maxother))
5116634b0f20a8f78616509e5ec3b24e4b07704a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5116634b0f20a8f78616509e5ec3b24e4b07704a/pydoc.py
methodname = 'repr_' + join(split(type(x).__name__), '_') if hasattr(self, methodname): return getattr(self, methodname)(x, level) else: return cram(stripid(repr(x)), self.maxother)
if hasattr(type(x), '__name__'): methodname = 'repr_' + join(split(type(x).__name__), '_') if hasattr(self, methodname): return getattr(self, methodname)(x, level) return cram(stripid(repr(x)), self.maxother)
def repr1(self, x, level): methodname = 'repr_' + join(split(type(x).__name__), '_') if hasattr(self, methodname): return getattr(self, methodname)(x, level) else: return cram(stripid(repr(x)), self.maxother)
5116634b0f20a8f78616509e5ec3b24e4b07704a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5116634b0f20a8f78616509e5ec3b24e4b07704a/pydoc.py
errors.append((srcname, dstname, why))
errors.append((srcname, dstname, str(why)))
def copytree(src, dst, symlinks=False): """Recursively copy a directory tree using copy2(). The destination directory must not already exist. If exception(s) occur, an Error is raised with a list of reasons. If the optional symlinks flag is true, symbolic links in the source tree result in symbolic links in the desti...
392d25aadc2e3a53b406b031a4a824c6b20ab98d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/392d25aadc2e3a53b406b031a4a824c6b20ab98d/shutil.py
__version__ = "
__version__ = "
def testMultiply(self): self.assertEquals((0 * 10), 0) self.assertEquals((5 * 8), 40)
f1389f9b53e039ce4256956c358a75f0e88ba016 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f1389f9b53e039ce4256956c358a75f0e88ba016/unittest.py
(self.__class__, self.testsRun, len(self.errors),
(_strclass(self.__class__), self.testsRun, len(self.errors),
def __repr__(self): return "<%s run=%i errors=%i failures=%i>" % \ (self.__class__, self.testsRun, len(self.errors), len(self.failures))
f1389f9b53e039ce4256956c358a75f0e88ba016 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f1389f9b53e039ce4256956c358a75f0e88ba016/unittest.py
return "%s.%s" % (self.__class__, self.__testMethodName)
return "%s.%s" % (_strclass(self.__class__), self.__testMethodName)
def id(self): return "%s.%s" % (self.__class__, self.__testMethodName)
f1389f9b53e039ce4256956c358a75f0e88ba016 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f1389f9b53e039ce4256956c358a75f0e88ba016/unittest.py
(self.__class__, self.__testMethodName)
(_strclass(self.__class__), self.__testMethodName)
def __repr__(self): return "<%s testMethod=%s>" % \ (self.__class__, self.__testMethodName)
f1389f9b53e039ce4256956c358a75f0e88ba016 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f1389f9b53e039ce4256956c358a75f0e88ba016/unittest.py
return "<%s tests=%s>" % (self.__class__, self._tests)
return "<%s tests=%s>" % (_strclass(self.__class__), self._tests)
def __repr__(self): return "<%s tests=%s>" % (self.__class__, self._tests)
f1389f9b53e039ce4256956c358a75f0e88ba016 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f1389f9b53e039ce4256956c358a75f0e88ba016/unittest.py
return "%s (%s)" % (self.__class__, self.__testFunc.__name__)
return "%s (%s)" % (_strclass(self.__class__), self.__testFunc.__name__)
def __str__(self): return "%s (%s)" % (self.__class__, self.__testFunc.__name__)
f1389f9b53e039ce4256956c358a75f0e88ba016 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f1389f9b53e039ce4256956c358a75f0e88ba016/unittest.py
return "<%s testFunc=%s>" % (self.__class__, self.__testFunc)
return "<%s testFunc=%s>" % (_strclass(self.__class__), self.__testFunc)
def __repr__(self): return "<%s testFunc=%s>" % (self.__class__, self.__testFunc)
f1389f9b53e039ce4256956c358a75f0e88ba016 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f1389f9b53e039ce4256956c358a75f0e88ba016/unittest.py
"hooktestpackage.sub.subber": (False, test_co),
"hooktestpackage.sub.subber": (True, test_co),
def find_module(self, fullname, path=None): self.imports.append(fullname) return None
318667d7da006e095462f3bbeb4beaa114200a18 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/318667d7da006e095462f3bbeb4beaa114200a18/test_importhooks.py
inst.poll()
if inst.poll(_deadstate=sys.maxint) >= 0: try: _active.remove(inst) except ValueError: pass
def _cleanup(): for inst in _active[:]: inst.poll()
99e74eb75aa5fb5b5bab90702df013f031690af7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/99e74eb75aa5fb5b5bab90702df013f031690af7/subprocess.py
_active.append(self)
def __init__(self, args, bufsize=0, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, close_fds=False, shell=False, cwd=None, env=None, universal_newlines=False, startupinfo=None, creationflags=0): """Create new Popen instance.""" _cleanup()
99e74eb75aa5fb5b5bab90702df013f031690af7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/99e74eb75aa5fb5b5bab90702df013f031690af7/subprocess.py
def poll(self):
def poll(self, _deadstate=None):
def poll(self): """Check if child process has terminated. Returns returncode attribute.""" if self.returncode is None: if WaitForSingleObject(self._handle, 0) == WAIT_OBJECT_0: self.returncode = GetExitCodeProcess(self._handle) _active.remove(self) return self.returncode
99e74eb75aa5fb5b5bab90702df013f031690af7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/99e74eb75aa5fb5b5bab90702df013f031690af7/subprocess.py
_active.remove(self)
def poll(self): """Check if child process has terminated. Returns returncode attribute.""" if self.returncode is None: if WaitForSingleObject(self._handle, 0) == WAIT_OBJECT_0: self.returncode = GetExitCodeProcess(self._handle) _active.remove(self) return self.returncode
99e74eb75aa5fb5b5bab90702df013f031690af7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/99e74eb75aa5fb5b5bab90702df013f031690af7/subprocess.py
_active.remove(self)
def wait(self): """Wait for child process to terminate. Returns returncode attribute.""" if self.returncode is None: obj = WaitForSingleObject(self._handle, INFINITE) self.returncode = GetExitCodeProcess(self._handle) _active.remove(self) return self.returncode
99e74eb75aa5fb5b5bab90702df013f031690af7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/99e74eb75aa5fb5b5bab90702df013f031690af7/subprocess.py
_active.remove(self) def poll(self):
def poll(self, _deadstate=None):
def _handle_exitstatus(self, sts): if os.WIFSIGNALED(sts): self.returncode = -os.WTERMSIG(sts) elif os.WIFEXITED(sts): self.returncode = os.WEXITSTATUS(sts) else: # Should never happen raise RuntimeError("Unknown child exit status!")
99e74eb75aa5fb5b5bab90702df013f031690af7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/99e74eb75aa5fb5b5bab90702df013f031690af7/subprocess.py
pass
if _deadstate is not None: self.returncode = _deadstate
def poll(self): """Check if child process has terminated. Returns returncode attribute.""" if self.returncode is None: try: pid, sts = os.waitpid(self.pid, os.WNOHANG) if pid == self.pid: self._handle_exitstatus(sts) except os.error: pass return self.returncode
99e74eb75aa5fb5b5bab90702df013f031690af7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/99e74eb75aa5fb5b5bab90702df013f031690af7/subprocess.py
interp = interp[:-5] = interp[-4:]
interp = interp[:-5] + interp[-4:]
def run_cgi(self): """Execute a CGI script.""" dir, rest = self.cgi_info i = rest.rfind('?') if i >= 0: rest, query = rest[:i], rest[i+1:] else: query = '' i = rest.find('/') if i >= 0: script, rest = rest[:i], rest[i:] else: script, rest = rest, '' scriptname = dir + '/' + script scriptfile = self.translate_path(scrip...
c396d9007bdbc87e4d874c73ea316c0c04cbaae1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c396d9007bdbc87e4d874c73ea316c0c04cbaae1/CGIHTTPServer.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 =...
d316b08d61a73a0ba2022020fc9ec71966774488 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d316b08d61a73a0ba2022020fc9ec71966774488/PythonIDEMain.py
if verbose: if output: print "%s %% %s =? %s ..." %\ (repr(formatstr), repr(args), repr(output)), else: print "%s %% %s works? ..." % (repr(formatstr), repr(args)), try: result = formatstr % args except OverflowError: if verbose: print 'overflow (this is fine)' else: if output and result != output: if verbose: print 'n...
if verbose: if output: print "%s %% %s =? %s ..." %\ (repr(formatstr), repr(args), repr(output)), else: print "%s %% %s works? ..." % (repr(formatstr), repr(args)), try: result = formatstr % args except OverflowError: if not overflowok: raise if verbose: print 'overflow (this is fine)' else: if output and result != out...
def testformat(formatstr, args, output=None): if verbose: if output: print "%s %% %s =? %s ..." %\ (repr(formatstr), repr(args), repr(output)), else: print "%s %% %s works? ..." % (repr(formatstr), repr(args)), try: result = formatstr % args except OverflowError: if verbose: print 'overflow (this is fine)' else: if out...
ed3a0213844b76a6b417eefe0b447af4b2c98fb2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ed3a0213844b76a6b417eefe0b447af4b2c98fb2/test_format.py
testformat(formatstr, *args) testformat(unicode(formatstr), *args)
testformat(formatstr, *args) testformat(unicode(formatstr), *args)
def testboth(formatstr, *args): testformat(formatstr, *args) testformat(unicode(formatstr), *args)
ed3a0213844b76a6b417eefe0b447af4b2c98fb2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ed3a0213844b76a6b417eefe0b447af4b2c98fb2/test_format.py
if line[:2] == '|-': break
def emparse_cts(fp): while 1: line = fp.readline() if not line: raise Unparseable line = line[:-1] # Check that we're not in the returned message yet if string.lower(line)[:5] == 'from:': raise Unparseable line = string.split(line) if len(line) > 3 and line[0][:2] == '|-' and line[1] == 'Failed' \ and line[2] == 'addr...
0f0868875df15188ecad6c9928e6b00ccfa7f42f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0f0868875df15188ecad6c9928e6b00ccfa7f42f/mailerdaemon.py
ret
return [None, None]
def _synthesize(browser): """Attempt to synthesize a controller base on existing controllers. This is useful to create a controller when a user specifies a path to an entry in the BROWSER environment variable -- we can copy a general controller to operate using a specific installation of the desired browser in this wa...
a68f3ddcc75b81ffdd2ee7fcf8cca8006d12c6a0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a68f3ddcc75b81ffdd2ee7fcf8cca8006d12c6a0/webbrowser.py
for name in ('lib', 'purelib', 'platlib',
for name in ('libbase', 'lib', 'purelib', 'platlib',
def finalize_options (self):
2fbf6a9826aa06b3c7b39458e124918ab6f1a7c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2fbf6a9826aa06b3c7b39458e124918ab6f1a7c6/install.py
k, v = item.split(':', 1) k = k.strip().lower() v = v.strip() self._info[k] = v
if ':' in item: k, v = item.split(':', 1) k = k.strip().lower() v = v.strip() self._info[k] = v lastk = k elif lastk: self._info[lastk] += '\n' + item
def _parse(self, fp): """Override this method to support alternative .mo formats.""" unpack = struct.unpack filename = getattr(fp, 'name', '') # Parse the .mo file header, which consists of 5 little endian 32 # bit words. self._catalog = catalog = {} self.plural = lambda n: int(n != 1) # germanic plural by default buf ...
efb723a5eeb15fa9cee9707cecfce17b5a9825b3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/efb723a5eeb15fa9cee9707cecfce17b5a9825b3/gettext.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)
c8e4d1d844dd07294a77284d7a0df1a7539cf51b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c8e4d1d844dd07294a77284d7a0df1a7539cf51b/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.)"""
c8e4d1d844dd07294a77284d7a0df1a7539cf51b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c8e4d1d844dd07294a77284d7a0df1a7539cf51b/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...
c8e4d1d844dd07294a77284d7a0df1a7539cf51b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c8e4d1d844dd07294a77284d7a0df1a7539cf51b/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)
c8e4d1d844dd07294a77284d7a0df1a7539cf51b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c8e4d1d844dd07294a77284d7a0df1a7539cf51b/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)
c8e4d1d844dd07294a77284d7a0df1a7539cf51b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c8e4d1d844dd07294a77284d7a0df1a7539cf51b/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...
c8e4d1d844dd07294a77284d7a0df1a7539cf51b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c8e4d1d844dd07294a77284d7a0df1a7539cf51b/cmd.py
self.prefix = sys.prefix
self.prefix = os.path.normpath (sys.prefix)
def set_final_options (self):
f0a18abab7ed197a1eae965cc7198ad45b4bc275 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f0a18abab7ed197a1eae965cc7198ad45b4bc275/install.py
self.exec_prefix = sys.exec_prefix
self.exec_prefix = os.path.normpath (sys.exec_prefix)
def set_final_options (self):
f0a18abab7ed197a1eae965cc7198ad45b4bc275 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f0a18abab7ed197a1eae965cc7198ad45b4bc275/install.py
sys_prefix = sys.exec_prefix
sys_prefix = os.path.normpath (sys.exec_prefix)
def replace_sys_prefix (self, config_attr, fallback_postfix, use_exec=0): """Attempts to glean a simple pattern from an installation directory available as a 'sysconfig' attribute: if the directory name starts with the "system prefix" (the one hard-coded in the Makefile and compiled into Python), then replace it with t...
f0a18abab7ed197a1eae965cc7198ad45b4bc275 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f0a18abab7ed197a1eae965cc7198ad45b4bc275/install.py
sys_prefix = sys.prefix
sys_prefix = os.path.normpath (sys.prefix)
def replace_sys_prefix (self, config_attr, fallback_postfix, use_exec=0): """Attempts to glean a simple pattern from an installation directory available as a 'sysconfig' attribute: if the directory name starts with the "system prefix" (the one hard-coded in the Makefile and compiled into Python), then replace it with t...
f0a18abab7ed197a1eae965cc7198ad45b4bc275 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f0a18abab7ed197a1eae965cc7198ad45b4bc275/install.py
def classlink(self, object, modname, *dicts):
def classlink(self, object, modname):
def classlink(self, object, modname, *dicts): """Make a link for a class.""" name = classname(object, modname) for dict in dicts: if dict.has_key(object): return '<a href="%s">%s</a>' % (dict[object], name) return name
93cdc263dcadb71f7d53e01ec576fce416b7907a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/93cdc263dcadb71f7d53e01ec576fce416b7907a/pydoc.py
for dict in dicts: if dict.has_key(object): return '<a href="%s">%s</a>' % (dict[object], name)
if sys.modules.has_key(object.__module__) and \ getattr(sys.modules[object.__module__], object.__name__) is object: return '<a href="%s.html object.__module__, object.__name__, name)
def classlink(self, object, modname, *dicts): """Make a link for a class.""" name = classname(object, modname) for dict in dicts: if dict.has_key(object): return '<a href="%s">%s</a>' % (dict[object], name) return name
93cdc263dcadb71f7d53e01ec576fce416b7907a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/93cdc263dcadb71f7d53e01ec576fce416b7907a/pydoc.py
def formattree(self, tree, modname, classes={}, parent=None):
def formattree(self, tree, modname, parent=None):
def formattree(self, tree, modname, classes={}, parent=None): """Produce HTML for a class tree as given by inspect.getclasstree().""" result = '' for entry in tree: if type(entry) is type(()): c, bases = entry result = result + '<dt><font face="helvetica, arial"><small>' result = result + self.classlink(c, modname, cla...
93cdc263dcadb71f7d53e01ec576fce416b7907a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/93cdc263dcadb71f7d53e01ec576fce416b7907a/pydoc.py
result = result + self.classlink(c, modname, classes)
result = result + self.classlink(c, modname)
def formattree(self, tree, modname, classes={}, parent=None): """Produce HTML for a class tree as given by inspect.getclasstree().""" result = '' for entry in tree: if type(entry) is type(()): c, bases = entry result = result + '<dt><font face="helvetica, arial"><small>' result = result + self.classlink(c, modname, cla...
93cdc263dcadb71f7d53e01ec576fce416b7907a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/93cdc263dcadb71f7d53e01ec576fce416b7907a/pydoc.py
parents.append(self.classlink(base, modname, classes))
parents.append(self.classlink(base, modname))
def formattree(self, tree, modname, classes={}, parent=None): """Produce HTML for a class tree as given by inspect.getclasstree().""" result = '' for entry in tree: if type(entry) is type(()): c, bases = entry result = result + '<dt><font face="helvetica, arial"><small>' result = result + self.classlink(c, modname, cla...
93cdc263dcadb71f7d53e01ec576fce416b7907a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/93cdc263dcadb71f7d53e01ec576fce416b7907a/pydoc.py
entry, modname, classes, c)
entry, modname, c)
def formattree(self, tree, modname, classes={}, parent=None): """Produce HTML for a class tree as given by inspect.getclasstree().""" result = '' for entry in tree: if type(entry) is type(()): c, bases = entry result = result + '<dt><font face="helvetica, arial"><small>' result = result + self.classlink(c, modname, cla...
93cdc263dcadb71f7d53e01ec576fce416b7907a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/93cdc263dcadb71f7d53e01ec576fce416b7907a/pydoc.py
contents = [self.formattree( inspect.getclasstree(classlist, 1), name, cdict)]
contents = [ self.formattree(inspect.getclasstree(classlist, 1), name)]
def docmodule(self, object, name=None, mod=None): """Produce HTML documentation for a module object.""" name = object.__name__ # ignore the passed-in name parts = split(name, '.') links = [] for i in range(len(parts)-1): links.append( '<a href="%s.html"><font color="#ffffff">%s</font></a>' % (join(parts[:i+1], '.'), pa...
93cdc263dcadb71f7d53e01ec576fce416b7907a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/93cdc263dcadb71f7d53e01ec576fce416b7907a/pydoc.py
parents.append( self.classlink(base, object.__module__, classes))
parents.append(self.classlink(base, object.__module__))
def docclass(self, object, name=None, mod=None, funcs={}, classes={}): """Produce HTML documentation for a class object.""" realname = object.__name__ name = name or realname bases = object.__bases__ contents = ''
93cdc263dcadb71f7d53e01ec576fce416b7907a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/93cdc263dcadb71f7d53e01ec576fce416b7907a/pydoc.py
url = '%s.html imclass.__module__, imclass.__name__, name) note = ' from <a href="%s">%s</a>' % ( url, classname(imclass, mod))
note = ' from ' + self.classlink(imclass, mod)
def docroutine(self, object, name=None, mod=None, funcs={}, classes={}, methods={}, cl=None): """Produce HTML documentation for a function or method object.""" realname = object.__name__ name = name or realname anchor = (cl and cl.__name__ or '') + '-' + name note = '' skipdocs = 0 if inspect.ismethod(object): imclass ...
93cdc263dcadb71f7d53e01ec576fce416b7907a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/93cdc263dcadb71f7d53e01ec576fce416b7907a/pydoc.py
inst = object.im_self note = (inst and ' method of %s instance' % classname(inst.__class__, mod) or ' unbound %s method' % classname(imclass, mod))
if object.im_self: note = ' method of %s instance' % self.classlink( object.im_self.__class__, mod) else: note = ' unbound %s method' % self.classlink(imclass,mod)
def docroutine(self, object, name=None, mod=None, funcs={}, classes={}, methods={}, cl=None): """Produce HTML documentation for a function or method object.""" realname = object.__name__ name = name or realname anchor = (cl and cl.__name__ or '') + '-' + name note = '' skipdocs = 0 if inspect.ismethod(object): imclass ...
93cdc263dcadb71f7d53e01ec576fce416b7907a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/93cdc263dcadb71f7d53e01ec576fce416b7907a/pydoc.py
inst = object.im_self note = (inst and ' method of %s instance' % classname(inst.__class__, mod) or ' unbound %s method' % classname(imclass, mod))
if object.im_self: note = ' method of %s instance' % classname( object.im_self.__class__, mod) else: note = ' unbound %s method' % classname(imclass,mod)
def docroutine(self, object, name=None, mod=None, cl=None): """Produce text documentation for a function or method object.""" realname = object.__name__ name = name or realname note = '' skipdocs = 0 if inspect.ismethod(object): imclass = object.im_class if cl: if imclass is not cl: note = ' from ' + classname(imclass,...
93cdc263dcadb71f7d53e01ec576fce416b7907a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/93cdc263dcadb71f7d53e01ec576fce416b7907a/pydoc.py
print 'new.code()'
def break_yolks(self): self.yolks = self.yolks - 2
ee00f96c9cb66fe4ba0972e4670ddf7a64ea06f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ee00f96c9cb66fe4ba0972e4670ddf7a64ea06f4/test_new.py
def _call_chain(self, chain, kind, meth_name, *args): # XXX raise an exception if no one else should try to handle # this url. return None if you can't but someone else could. handlers = chain.get(kind, ()) for handler in handlers: func = getattr(handler, meth_name)
76a954ed2f1cfc4effb47f24b375a75683375bec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/76a954ed2f1cfc4effb47f24b375a75683375bec/urllib2.py
class CustomProxy: def __init__(self, proto, func=None, proxy_addr=None): self.proto = proto self.func = func self.addr = proxy_addr def handle(self, req): if self.func and self.func(req): return 1 def get_proxy(self): return self.addr class CustomProxyHandler(BaseHandler): handler_order = 100 def __init__(sel...
def proxy_open(self, req, proxy, type): orig_type = req.get_type() proxy_type, user, password, hostport = _parse_proxy(proxy) if proxy_type is None: proxy_type = orig_type if user and password: user_pass = '%s:%s' % (unquote(user), unquote(password)) creds = base64.encodestring(user_pass).strip() req.add_header('Proxy-...
76a954ed2f1cfc4effb47f24b375a75683375bec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/76a954ed2f1cfc4effb47f24b375a75683375bec/urllib2.py
class OpenerFactory: default_handlers = [UnknownHandler, HTTPHandler, HTTPDefaultErrorHandler, HTTPRedirectHandler, FTPHandler, FileHandler] handlers = [] replacement_handlers = [] def add_handler(self, h): self.handlers = self.handlers + [h] def replace_handler(self, h): pass def build_opener(self): opener = Ope...
def gopher_open(self, req): import gopherlib # this raises DeprecationWarning in 2.5 host = req.get_host() if not host: raise GopherError('no host given') host = unquote(host) selector = req.get_selector() type, selector = splitgophertype(selector) selector, query = splitquery(selector) selector = unquote(selector) if...
76a954ed2f1cfc4effb47f24b375a75683375bec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/76a954ed2f1cfc4effb47f24b375a75683375bec/urllib2.py
else: _tryorder = filter(lambda x: _browsers.has_key(x.lower()) or x.find("%s") > -1, _tryorder)
for cmd in _tryorder: if not _browsers.has_key(cmd.lower()): if _iscommand(cmd.lower()): register(cmd.lower(), None, GenericBrowser("%s %%s" % cmd.lower())) _tryorder = filter(lambda x: _browsers.has_key(x.lower()) or x.find("%s") > -1, _tryorder)
def open_new(self, url): # Deprecated. May be removed in 2.1. self.open(url)
fbc70cb1c75ca8cb00305cc37a7eb431d7b099bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fbc70cb1c75ca8cb00305cc37a7eb431d7b099bb/webbrowser.py
0x00b4: 0x0403,
0x00b4: 0x0404,
def getregentry(): return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
2d0f5f6f0e71a0817a36e934e05943f55633a035 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2d0f5f6f0e71a0817a36e934e05943f55633a035/koi8_u.py
print self.skip, self.stack,
print '!'*self.debugging, 'process:', self.skip, self.stack,
def process(self, accu): if self.debugging > 1: print self.skip, self.stack, if accu: print accu[0][:30], if accu[0][30:] or accu[1:]: print '...', print if self.stack and self.stack[-1] == 'menu': # XXX should be done differently for line in accu: mo = miprog.match(line) if not mo: line = string.strip(line) + '\n' sel...
0e58802a83c0ef801f65d198692c71f60b73fb54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0e58802a83c0ef801f65d198692c71f60b73fb54/texi2html.py
if self.stack and self.stack[-1] == 'menu':
if self.inmenu():
def process(self, accu): if self.debugging > 1: print self.skip, self.stack, if accu: print accu[0][:30], if accu[0][30:] or accu[1:]: print '...', print if self.stack and self.stack[-1] == 'menu': # XXX should be done differently for line in accu: mo = miprog.match(line) if not mo: line = string.strip(line) + '\n' sel...
0e58802a83c0ef801f65d198692c71f60b73fb54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0e58802a83c0ef801f65d198692c71f60b73fb54/texi2html.py
if self.debugging: print '--> file', `file`
print '!'*self.debugging, '--> file', `file`
def do_include(self, args): file = args file = os.path.join(self.includedir, file) try: fp = open(file, 'r') except IOError, msg: print '*** Can\'t open include file', `file` return if self.debugging: print '--> file', `file` save_done = self.done save_skip = self.skip save_stack = self.stack self.includedepth = self.i...
0e58802a83c0ef801f65d198692c71f60b73fb54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0e58802a83c0ef801f65d198692c71f60b73fb54/texi2html.py
if self.debugging: print '<-- file', `file`
print '!'*self.debugging, '<-- file', `file`
def do_include(self, args): file = args file = os.path.join(self.includedir, file) try: fp = open(file, 'r') except IOError, msg: print '*** Can\'t open include file', `file` return if self.debugging: print '--> file', `file` save_done = self.done save_skip = self.skip save_stack = self.stack self.includedepth = self.i...
0e58802a83c0ef801f65d198692c71f60b73fb54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0e58802a83c0ef801f65d198692c71f60b73fb54/texi2html.py
print self.skip, self.stack, '@' + cmd, args
print '!'*self.debugging, 'command:', self.skip, self.stack, \ '@' + cmd, args
def command(self, line, mo): a, b = mo.span(1) cmd = line[a:b] args = string.strip(line[b:]) if self.debugging > 1: print self.skip, self.stack, '@' + cmd, args try: func = getattr(self, 'do_' + cmd) except AttributeError: try: func = getattr(self, 'bgn_' + cmd) except AttributeError: # don't complain if we are skippin...
0e58802a83c0ef801f65d198692c71f60b73fb54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0e58802a83c0ef801f65d198692c71f60b73fb54/texi2html.py
print self.values
def do_set(self, args): fields = string.splitfields(args, ' ') key = fields[0] if len(fields) == 1: value = 1 else: value = string.joinfields(fields[1:], ' ') self.values[key] = value print self.values
0e58802a83c0ef801f65d198692c71f60b73fb54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0e58802a83c0ef801f65d198692c71f60b73fb54/texi2html.py
print self.stack print self.stackinfo if self.stackinfo[len(self.stack) + 1]: self.skip = self.skip - 1 del self.stackinfo[len(self.stack) + 1]
try: if self.stackinfo[len(self.stack) + 1]: self.skip = self.skip - 1 del self.stackinfo[len(self.stack) + 1] except KeyError: print '*** end_ifset: KeyError :', len(self.stack) + 1
def end_ifset(self): print self.stack print self.stackinfo if self.stackinfo[len(self.stack) + 1]: self.skip = self.skip - 1 del self.stackinfo[len(self.stack) + 1]
0e58802a83c0ef801f65d198692c71f60b73fb54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0e58802a83c0ef801f65d198692c71f60b73fb54/texi2html.py
end_ifclear = end_ifset
def end_ifclear(self): try: if self.stackinfo[len(self.stack) + 1]: self.skip = self.skip - 1 del self.stackinfo[len(self.stack) + 1] except KeyError: print '*** end_ifclear: KeyError :', len(self.stack) + 1
def bgn_ifclear(self, args): if args in self.values.keys() \ and self.values[args] is not None: self.skip = self.skip + 1 self.stackinfo[len(self.stack)] = 1 else: self.stackinfo[len(self.stack)] = 0
0e58802a83c0ef801f65d198692c71f60b73fb54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0e58802a83c0ef801f65d198692c71f60b73fb54/texi2html.py
print args
def do_settitle(self, args): print args self.startsaving() self.expand(args) self.title = self.collectsavings() print self.title
0e58802a83c0ef801f65d198692c71f60b73fb54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0e58802a83c0ef801f65d198692c71f60b73fb54/texi2html.py
print self.title
def do_settitle(self, args): print args self.startsaving() self.expand(args) self.title = self.collectsavings() print self.title
0e58802a83c0ef801f65d198692c71f60b73fb54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0e58802a83c0ef801f65d198692c71f60b73fb54/texi2html.py
if self.debugging: print '--- writing', file
if self.debugging: print '!'*self.debugging, '--- writing', file
def do_node(self, args): self.endnode() self.nodelineno = 0 parts = string.splitfields(args, ',') while len(parts) < 4: parts.append('') for i in range(4): parts[i] = string.strip(parts[i]) self.nodelinks = parts [name, next, prev, up] = parts[:4] file = self.dirname + '/' + makefile(name) if self.filenames.has_key(fil...
0e58802a83c0ef801f65d198692c71f60b73fb54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0e58802a83c0ef801f65d198692c71f60b73fb54/texi2html.py
if self.itemarg[0] == '@' and self.itemarg[1:2] and \
if self.itemarg[0] == '@' and self.itemarg[1] and \
def do_item(self, args): if self.itemindex: self.index(self.itemindex, args) if self.itemarg: if self.itemarg[0] == '@' and self.itemarg[1:2] and \ self.itemarg[1] in string.ascii_letters: args = self.itemarg + '{' + args + '}' else: # some other character, e.g. '-' args = self.itemarg + ' ' + args if self.itemnumber <...
0e58802a83c0ef801f65d198692c71f60b73fb54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0e58802a83c0ef801f65d198692c71f60b73fb54/texi2html.py
print '--- Generating', self.indextitle[name], 'index'
print '!'*self.debugging, '--- Generating', \ self.indextitle[name], 'index'
def prindex(self, name): iscodeindex = (name not in self.noncodeindices) index = self.whichindex[name] if not index: return if self.debugging: print '--- Generating', self.indextitle[name], 'index' # The node already provides a title index1 = [] junkprog = re.compile('^(@[a-z]+)?{') for key, node in index: sortkey = s...
0e58802a83c0ef801f65d198692c71f60b73fb54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0e58802a83c0ef801f65d198692c71f60b73fb54/texi2html.py
if self.debugging > 1: print key, ':', node
if self.debugging > 1: print '!'*self.debugging, key, ':', node
def prindex(self, name): iscodeindex = (name not in self.noncodeindices) index = self.whichindex[name] if not index: return if self.debugging: print '--- Generating', self.indextitle[name], 'index' # The node already provides a title index1 = [] junkprog = re.compile('^(@[a-z]+)?{') for key, node in index: sortkey = s...
0e58802a83c0ef801f65d198692c71f60b73fb54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0e58802a83c0ef801f65d198692c71f60b73fb54/texi2html.py
while sys.argv[1:2] == ['-d']:
htmlhelp = '' while sys.argv[1] == ['-d']:
def test(): import sys debugging = 0 print_headers = 0 cont = 0 html3 = 0 while sys.argv[1:2] == ['-d']: debugging = debugging + 1 del sys.argv[1:2] if sys.argv[1] == '-p': print_headers = 1 del sys.argv[1] if sys.argv[1] == '-c': cont = 1 del sys.argv[1] if sys.argv[1] == '-3': html3 = 1 del sys.argv[1] if len(sys.ar...
0e58802a83c0ef801f65d198692c71f60b73fb54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0e58802a83c0ef801f65d198692c71f60b73fb54/texi2html.py
del sys.argv[1:2]
del sys.argv[1]
def test(): import sys debugging = 0 print_headers = 0 cont = 0 html3 = 0 while sys.argv[1:2] == ['-d']: debugging = debugging + 1 del sys.argv[1:2] if sys.argv[1] == '-p': print_headers = 1 del sys.argv[1] if sys.argv[1] == '-c': cont = 1 del sys.argv[1] if sys.argv[1] == '-3': html3 = 1 del sys.argv[1] if len(sys.ar...
0e58802a83c0ef801f65d198692c71f60b73fb54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0e58802a83c0ef801f65d198692c71f60b73fb54/texi2html.py
print 'usage: texi2html [-d [-d]] [-p] [-c] inputfile outputdirectory'
print 'usage: texi2hh [-d [-d]] [-p] [-c] [-3] [-H htmlhelp]', \ 'inputfile outputdirectory'
def test(): import sys debugging = 0 print_headers = 0 cont = 0 html3 = 0 while sys.argv[1:2] == ['-d']: debugging = debugging + 1 del sys.argv[1:2] if sys.argv[1] == '-p': print_headers = 1 del sys.argv[1] if sys.argv[1] == '-c': cont = 1 del sys.argv[1] if sys.argv[1] == '-3': html3 = 1 del sys.argv[1] if len(sys.ar...
0e58802a83c0ef801f65d198692c71f60b73fb54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0e58802a83c0ef801f65d198692c71f60b73fb54/texi2html.py
parser.setdirname(sys.argv[2]) if file == '-': fp = sys.stdin else:
dirname = sys.argv[2] parser.setdirname(dirname)
def test(): import sys debugging = 0 print_headers = 0 cont = 0 html3 = 0 while sys.argv[1:2] == ['-d']: debugging = debugging + 1 del sys.argv[1:2] if sys.argv[1] == '-p': print_headers = 1 del sys.argv[1] if sys.argv[1] == '-c': cont = 1 del sys.argv[1] if sys.argv[1] == '-3': html3 = 1 del sys.argv[1] if len(sys.ar...
0e58802a83c0ef801f65d198692c71f60b73fb54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0e58802a83c0ef801f65d198692c71f60b73fb54/texi2html.py
_monthnames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] _daynames = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
_monthnames = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec', 'january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'] _daynames = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun']
def dump_address_pair(pair): """Dump a (name, address) pair in a canonicalized form.""" if pair[0]: return '"' + pair[0] + '" <' + pair[1] + '>' else: return pair[1]
bc7a73da2036ee7693857fcf046c4a19feecfc9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bc7a73da2036ee7693857fcf046c4a19feecfc9e/rfc822.py
if data[0][-1] == ',' or data[0] in _daynames:
if data[0][-1] in (',', '.') or string.lower(data[0]) in _daynames:
def parsedate_tz(data): """Convert a date string to a time tuple. Accounts for military timezones. """ data = string.split(data) if data[0][-1] == ',' or data[0] in _daynames: # There's a dayname here. Skip it del data[0] if len(data) == 3: # RFC 850 date, deprecated stuff = string.split(data[0], '-') if len(stuff) ==...
bc7a73da2036ee7693857fcf046c4a19feecfc9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bc7a73da2036ee7693857fcf046c4a19feecfc9e/rfc822.py
dd, mm, yy, tm, tz = mm, dd, tm, yy, tz
dd, mm = mm, string.lower(dd)
def parsedate_tz(data): """Convert a date string to a time tuple. Accounts for military timezones. """ data = string.split(data) if data[0][-1] == ',' or data[0] in _daynames: # There's a dayname here. Skip it del data[0] if len(data) == 3: # RFC 850 date, deprecated stuff = string.split(data[0], '-') if len(stuff) ==...
bc7a73da2036ee7693857fcf046c4a19feecfc9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bc7a73da2036ee7693857fcf046c4a19feecfc9e/rfc822.py
lexer.wordchars = lexer.wordchars + '.'
lexer.wordchars = lexer.wordchars + '.-@'
def __init__(self, file=None): if not file: file = os.path.join(os.environ['HOME'], ".netrc") try: fp = open(file) except: return None self.hosts = {} self.macros = {} lexer = shlex.shlex(fp) lexer.wordchars = lexer.wordchars + '.' while 1: # Look for a machine, default, or macdef top-level keyword toplevel = tt = lexe...
bb6b560c8437ab50012ffe2ff2f0b4c56832e20f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bb6b560c8437ab50012ffe2ff2f0b4c56832e20f/netrc.py
if prog.match(line) == len(line):
if prog.match(line) >= 0:
def pickline(file, key, casefold = 1): try: f = open(file, 'r') except IOError: return None pat = key + ':' if casefold: prog = regex.compile(pat, regex.casefold) else: prog = regex.compile(pat) while 1: line = f.readline() if not line: break if prog.match(line) == len(line): text = line[len(key)+1:] while 1: line = f....
05e8d362fb39bf6940eaeaa368cb4692a36107b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/05e8d362fb39bf6940eaeaa368cb4692a36107b1/mhlib.py
websucker.Sucker.savefilename(self, url))
websucker.Sucker.savefilename(self.sucker, url))
def go(self, event=None): if not self.msgq: self.msgq = Queue.Queue(0) self.check_msgq() if not self.sucker: self.sucker = SuckerThread(self.msgq) if self.sucker.stopit: return self.url_entry.selection_range(0, END) url = self.url_entry.get() url = url.strip() if not url: self.top.bell() self.message("[Error: No URL en...
eb1d4610db87d34e21cd0f552f914a837af7d7f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/eb1d4610db87d34e21cd0f552f914a837af7d7f0/wsgui.py
builtin = r"([^\\.]\b|^)" + any("BUILTIN", builtinlist) + r"\b"
builtin = r"([^.'\"\\]\b|^)" + any("BUILTIN", builtinlist) + r"\b"
def make_pat(): kw = r"\b" + any("KEYWORD", keyword.kwlist) + r"\b" builtinlist = [str(name) for name in dir(__builtin__) if not name.startswith('_')] builtin = r"([^\\.]\b|^)" + any("BUILTIN", builtinlist) + r"\b" comment = any("COMMENT", [r"#[^\n]*"]) sqstring = r"(\b[rR])?'[^'\\\n]*(\\.[^'\\\n]*)*'?" dqstring = r'(\...
23c51b7e2ad0cd0ebfb1f2688c21f331403da4b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/23c51b7e2ad0cd0ebfb1f2688c21f331403da4b8/ColorDelegator.py
return kw + "|" + builtin + "|" + comment + "|" + string + "|" + any("SYNC", [r"\n"])
return kw + "|" + builtin + "|" + comment + "|" + string +\ "|" + any("SYNC", [r"\n"])
def make_pat(): kw = r"\b" + any("KEYWORD", keyword.kwlist) + r"\b" builtinlist = [str(name) for name in dir(__builtin__) if not name.startswith('_')] builtin = r"([^\\.]\b|^)" + any("BUILTIN", builtinlist) + r"\b" comment = any("COMMENT", [r"#[^\n]*"]) sqstring = r"(\b[rR])?'[^'\\\n]*(\\.[^'\\\n]*)*'?" dqstring = r'(\...
23c51b7e2ad0cd0ebfb1f2688c21f331403da4b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/23c51b7e2ad0cd0ebfb1f2688c21f331403da4b8/ColorDelegator.py
allow_colorizing = 1 colorizing = 0
allow_colorizing = True colorizing = False
def delete(self, index1, index2=None): index1 = self.index(index1) self.delegate.delete(index1, index2) self.notify_range(index1)
23c51b7e2ad0cd0ebfb1f2688c21f331403da4b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/23c51b7e2ad0cd0ebfb1f2688c21f331403da4b8/ColorDelegator.py
self.stop_colorizing = 1
self.stop_colorizing = True
def notify_range(self, index1, index2=None): self.tag_add("TODO", index1, index2) if self.after_id: if DEBUG: print "colorizing already scheduled" return if self.colorizing: self.stop_colorizing = 1 if DEBUG: print "stop colorizing" if self.allow_colorizing: if DEBUG: print "schedule colorizing" self.after_id = self.af...
23c51b7e2ad0cd0ebfb1f2688c21f331403da4b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/23c51b7e2ad0cd0ebfb1f2688c21f331403da4b8/ColorDelegator.py
self.allow_colorizing = 0 self.stop_colorizing = 1
self.allow_colorizing = False self.stop_colorizing = True
def close(self, close_when_done=None): if self.after_id: after_id = self.after_id self.after_id = None if DEBUG: print "cancel scheduled recolorizer" self.after_cancel(after_id) self.allow_colorizing = 0 self.stop_colorizing = 1 if close_when_done: if not self.colorizing: close_when_done.destroy() else: self.close_when...
23c51b7e2ad0cd0ebfb1f2688c21f331403da4b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/23c51b7e2ad0cd0ebfb1f2688c21f331403da4b8/ColorDelegator.py
self.stop_colorizing = 1
self.stop_colorizing = True
def toggle_colorize_event(self, event): if self.after_id: after_id = self.after_id self.after_id = None if DEBUG: print "cancel scheduled recolorizer" self.after_cancel(after_id) if self.allow_colorizing and self.colorizing: if DEBUG: print "stop colorizing" self.stop_colorizing = 1 self.allow_colorizing = not self.all...
23c51b7e2ad0cd0ebfb1f2688c21f331403da4b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/23c51b7e2ad0cd0ebfb1f2688c21f331403da4b8/ColorDelegator.py
print "auto colorizing turned", self.allow_colorizing and "on" or "off"
print "auto colorizing turned",\ self.allow_colorizing and "on" or "off"
def toggle_colorize_event(self, event): if self.after_id: after_id = self.after_id self.after_id = None if DEBUG: print "cancel scheduled recolorizer" self.after_cancel(after_id) if self.allow_colorizing and self.colorizing: if DEBUG: print "stop colorizing" self.stop_colorizing = 1 self.allow_colorizing = not self.all...
23c51b7e2ad0cd0ebfb1f2688c21f331403da4b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/23c51b7e2ad0cd0ebfb1f2688c21f331403da4b8/ColorDelegator.py
self.stop_colorizing = 0 self.colorizing = 1
self.stop_colorizing = False self.colorizing = True
def recolorize(self): self.after_id = None if not self.delegate: if DEBUG: print "no delegate" return if not self.allow_colorizing: if DEBUG: print "auto colorizing is off" return if self.colorizing: if DEBUG: print "already colorizing" return try: self.stop_colorizing = 0 self.colorizing = 1 if DEBUG: print "colorizin...
23c51b7e2ad0cd0ebfb1f2688c21f331403da4b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/23c51b7e2ad0cd0ebfb1f2688c21f331403da4b8/ColorDelegator.py
self.colorizing = 0
self.colorizing = False
def recolorize(self): self.after_id = None if not self.delegate: if DEBUG: print "no delegate" return if not self.allow_colorizing: if DEBUG: print "auto colorizing is off" return if self.colorizing: if DEBUG: print "already colorizing" return try: self.stop_colorizing = 0 self.colorizing = 1 if DEBUG: print "colorizin...
23c51b7e2ad0cd0ebfb1f2688c21f331403da4b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/23c51b7e2ad0cd0ebfb1f2688c21f331403da4b8/ColorDelegator.py
while 1:
while True:
def recolorize_main(self): next = "1.0" while 1: item = self.tag_nextrange("TODO", next) if not item: break head, tail = item self.tag_remove("SYNC", head, tail) item = self.tag_prevrange("SYNC", head) if item: head = item[1] else: head = "1.0"
23c51b7e2ad0cd0ebfb1f2688c21f331403da4b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/23c51b7e2ad0cd0ebfb1f2688c21f331403da4b8/ColorDelegator.py
ok = 0
ok = False
def recolorize_main(self): next = "1.0" while 1: item = self.tag_nextrange("TODO", next) if not item: break head, tail = item self.tag_remove("SYNC", head, tail) item = self.tag_prevrange("SYNC", head) if item: head = item[1] else: head = "1.0"
23c51b7e2ad0cd0ebfb1f2688c21f331403da4b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/23c51b7e2ad0cd0ebfb1f2688c21f331403da4b8/ColorDelegator.py