rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
opts, args = getopt.getopt(sys.argv[1:], 'Rd:m:nqr:t:vx')
opts, args = getopt.getopt(sys.argv[1:], 'Rd:m:nqr:t:vxa')
def main(): checkext = CHECKEXT verbose = VERBOSE maxpage = MAXPAGE roundsize = ROUNDSIZE dumpfile = DUMPFILE restart = 0 norun = 0 try: # Begin SLB 2/24/99: Added -t option here. opts, args = getopt.getopt(sys.argv[1:], 'Rd:m:nqr:t:vx') # End SLB 2/24/99 except getopt.error, msg: sys.stdout = sys.stderr print msg p...
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
if o == '-t': extra_roots.append(a)
if o == '-t': extra_roots.append(a) if o == '-a': nonames = not nonames
def main(): checkext = CHECKEXT verbose = VERBOSE maxpage = MAXPAGE roundsize = ROUNDSIZE dumpfile = DUMPFILE restart = 0 norun = 0 try: # Begin SLB 2/24/99: Added -t option here. opts, args = getopt.getopt(sys.argv[1:], 'Rd:m:nqr:t:vx') # End SLB 2/24/99 except getopt.error, msg: sys.stdout = sys.stderr print msg p...
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
maxpage=maxpage, roundsize=roundsize)
maxpage=maxpage, roundsize=roundsize, nonames=nonames )
def main(): checkext = CHECKEXT verbose = VERBOSE maxpage = MAXPAGE roundsize = ROUNDSIZE dumpfile = DUMPFILE restart = 0 norun = 0 try: # Begin SLB 2/24/99: Added -t option here. opts, args = getopt.getopt(sys.argv[1:], 'Rd:m:nqr:t:vx') # End SLB 2/24/99 except getopt.error, msg: sys.stdout = sys.stderr print msg p...
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
for root in extra_roots: if root[-1] != "/": root = root + "/" c.addroot(root)
for root in extra_roots: if root[-1] != "/": root = root + "/" c.addroot(root, add_to_do = 0)
def main(): checkext = CHECKEXT verbose = VERBOSE maxpage = MAXPAGE roundsize = ROUNDSIZE dumpfile = DUMPFILE restart = 0 norun = 0 try: # Begin SLB 2/24/99: Added -t option here. opts, args = getopt.getopt(sys.argv[1:], 'Rd:m:nqr:t:vx') # End SLB 2/24/99 except getopt.error, msg: sys.stdout = sys.stderr print msg p...
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
self.name_table = {}
self.name_table = {}
def reset(self): self.roots = [] self.todo = {} self.done = {} self.bad = {}
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
def reset(self): self.roots = [] self.todo = {} self.done = {} self.bad = {}
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
def note(self, level, format, *args): if self.verbose > level: if args: format = format%args self.message(format)
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
def addroot(self, root):
def addroot(self, root, add_to_do = 1):
def addroot(self, root): if root not in self.roots: troot = root scheme, netloc, path, params, query, fragment = \ urlparse.urlparse(root) i = string.rfind(path, "/") + 1 if 0 < i < len(path): path = path[:i] troot = urlparse.urlunparse((scheme, netloc, path, params, query, fragment)) self.roots.append(troot) self.addr...
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
self.newlink((root, ""), ("<root>", root))
if add_to_do: self.newlink((root, ""), ("<root>", root))
def addroot(self, root): if root not in self.roots: troot = root scheme, netloc, path, params, query, fragment = \ urlparse.urlparse(root) i = string.rfind(path, "/") + 1 if 0 < i < len(path): path = path[:i] troot = urlparse.urlunparse((scheme, netloc, path, params, query, fragment)) self.roots.append(troot) self.addr...
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
for url, rawlink, msg in triples:
for url, rawlink, msg in triples:
def report_errors(self): if not self.bad: self.message("\nNo errors") return self.message("\nError Report:") sources = self.errors.keys() sources.sort() for source in sources: triples = self.errors[source] self.message("") if len(triples) > 1: self.message("%d Errors in %s", len(triples), source) else: self.message("Er...
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
self.format_url(url), s, msg)
self.format_url(url), s, msg)
def report_errors(self): if not self.bad: self.message("\nNo errors") return self.message("\nError Report:") sources = self.errors.keys() sources.sort() for source in sources: triples = self.errors[source] self.message("") if len(triples) > 1: self.message("%d Errors in %s", len(triples), source) else: self.message("Er...
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
def dopage(self, url_pair):
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
" from", self.todo[url_pair])
" from", self.todo[url_pair])
def dopage(self, url_pair):
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
url, local_fragment = url_pair self.name_table[url] = page if local_fragment and local_fragment not in page.getnames(): self.setbad(url_pair, ("Missing name anchor `%s'" % local_fragment)) for info in page.getlinkinfos():
self.name_table[url] = page if local_fragment and local_fragment not in page.getnames(): self.setbad(url_pair, ("Missing name anchor `%s'" % local_fragment)) for info in page.getlinkinfos():
def dopage(self, url_pair):
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
def dopage(self, url_pair):
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
else: self.name_table[url_pair[0]] = None
else: self.name_table[url_pair[0]] = None
def dopage(self, url_pair):
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
def dopage(self, url_pair):
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
self.done[url].append(origin)
if origin not in self.done[url]: self.done[url].append(origin)
def newdonelink(self, url, origin): self.done[url].append(origin)
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
if self.bad.has_key(url): source, rawlink = origin triple = url, rawlink, self.bad[url] self.seterror(source, triple)
def newdonelink(self, url, origin): self.done[url].append(origin)
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
def newtodolink(self, url, origin):
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
self.todo[url].append(origin)
if origin not in self.todo[url]: self.todo[url].append(origin)
def newtodolink(self, url, origin):
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
def newtodolink(self, url, origin):
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
def format_url(self, url): link, fragment = url if fragment: return link + " else: return link
def format_url(self, url): link, fragment = url if fragment: return link + " else: return link
def format_url(self, url):
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
def inroots(self, url): for root in self.roots: if url[:len(root)] == root: return self.isallowed(root, url) return 0
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
url, fragment = url_pair if self.name_table.has_key(url): return self.name_table[url]
url, fragment = url_pair if self.name_table.has_key(url): return self.name_table[url]
def getpage(self, url_pair):
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
def getpage(self, url_pair):
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
def getpage(self, url_pair):
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
url, fragment = url_pair
url, fragment = url_pair
def readhtml(self, url_pair):
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
url, fragment = url_pair
url, fragment = url_pair
def openhtml(self, url_pair):
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
url, fragment = url_pair
url, fragment = url_pair
def openpage(self, url_pair):
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
def setbad(self, url, msg): if self.bad.has_key(url) and self.bad[url] == msg: self.note(0, "(Seen this error before)") return self.bad[url] = msg self.changed = 1 self.markerror(url)
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
if triple not in self.errors[url]: self.errors[url].append(triple)
if triple not in self.errors[url]: self.errors[url].append(triple)
def seterror(self, url, triple): try: # Begin SLB 2/24/99: Because of the way the # URLs are now processed, I need to check to make # sure the URL hasn't been entered in the error list. # The first element of the triple here is a (URL, fragment) # pair, but the URL key is not, since it's from the # list of origins. if...
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
size = len(self.text)
size = len(self.text)
def __init__(self, text, url, verbose=VERBOSE, maxpage=MAXPAGE, checker=None): self.text = text self.url = url self.verbose = verbose self.maxpage = maxpage self.checker = checker
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
return
return
def __init__(self, text, url, verbose=VERBOSE, maxpage=MAXPAGE, checker=None): self.text = text self.url = url self.verbose = verbose self.maxpage = maxpage self.checker = checker
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
checker=self.checker)
checker=self.checker)
def __init__(self, text, url, verbose=VERBOSE, maxpage=MAXPAGE, checker=None): self.text = text self.url = url self.verbose = verbose self.maxpage = maxpage self.checker = checker
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
def __init__(self, text, url, verbose=VERBOSE, maxpage=MAXPAGE, checker=None): self.text = text self.url = url self.verbose = verbose self.maxpage = maxpage self.checker = checker
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
return self.parser.names
return self.parser.names
def getnames(self):
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
if not self.parser: return []
if not self.parser: return []
def getlinkinfos(self):
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
fragment = t[-1]
fragment = t[-1]
def getlinkinfos(self):
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
infos.append((link, rawlink, fragment))
infos.append((link, rawlink, fragment))
def getlinkinfos(self):
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
if path[-1] != os.sep: url = url + '/'
def open_file(self, url): path = urllib.url2pathname(urllib.unquote(url)) if path[-1] != os.sep: url = url + '/' if os.path.isdir(path): indexpath = os.path.join(path, "index.html") if os.path.exists(indexpath): return self.open_file(url + "index.html") try: names = os.listdir(path) except os.error, msg: raise IOError,...
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
return urllib.FancyURLopener.open_file(self, path)
return urllib.FancyURLopener.open_file(self, url)
def open_file(self, url): path = urllib.url2pathname(urllib.unquote(url)) if path[-1] != os.sep: url = url + '/' if os.path.isdir(path): indexpath = os.path.join(path, "index.html") if os.path.exists(indexpath): return self.open_file(url + "index.html") try: names = os.listdir(path) except os.error, msg: raise IOError,...
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
self.names = [] self.url = url
self.names = [] self.url = url
def __init__(self, url, verbose=VERBOSE, checker=None): self.myverbose = verbose # now unused self.checker = checker self.base = None self.links = {}
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
for name, value in attributes: if name == "name": if value in self.names: self.checker.message("WARNING: duplicate name %s in %s", value, self.url) else: self.names.append(value) break
for name, value in attributes: if name == "name": if value in self.names: self.checker.message("WARNING: duplicate name %s in %s", value, self.url) else: self.names.append(value) break
def start_a(self, attributes): self.link_attr(attributes, 'href')
a870cf128cdb4a76dc17c103820d903325fd04fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a870cf128cdb4a76dc17c103820d903325fd04fb/wcnew.py
def __init__(self, files=[], dir=os.curdir, allfiles=None, warn=None, debug_print=None): # use standard warning and debug functions, if no other given if warn is None: warn = self.__warn if debug_print is None: debug_print = self.__debug_print self.warn = warn self.debug_print = debug_print self.files = files self.dir ...
d8fffdf727fad2fc5a0ff492de610d256099f1af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d8fffdf727fad2fc5a0ff492de610d256099f1af/filelist.py
sys.stderr.write ("warning: template: %s\n" % msg)
sys.stderr.write ("warning: %s\n" % msg)
def __warn (self, msg): sys.stderr.write ("warning: template: %s\n" % msg)
d8fffdf727fad2fc5a0ff492de610d256099f1af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d8fffdf727fad2fc5a0ff492de610d256099f1af/filelist.py
def process_line(self, line): words = string.split (line) action = words[0] if action in ('include','exclude', 'global-include','global-exclude'): if len (words) < 2:
def process_line (self, line): words = string.split (line) action = words[0] if action in ('include','exclude', 'global-include','global-exclude'): if len (words) < 2: self.warn \ ("invalid template line: " + "'%s' expects <pattern1> <pattern2> ..." % action) return pattern_list = map(convert_path, words[1:]) eli...
def process_line(self, line):
d8fffdf727fad2fc5a0ff492de610d256099f1af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d8fffdf727fad2fc5a0ff492de610d256099f1af/filelist.py
("invalid template line: " + "'%s' expects <pattern1> <pattern2> ..." % action) return pattern_list = map(convert_path, words[1:]) elif action in ('recursive-include','recursive-exclude'): if len (words) < 3:
(("no previously-included files matching '%s' " + "found anywhere in distribution") % pattern) elif action == 'recursive-include': self.debug_print("recursive-include %s %s" % (dir, string.join(pattern_list))) for pattern in pattern_list: if not self.select_pattern (pattern, prefix=dir): self.warn (("no files found ma...
def process_line(self, line):
d8fffdf727fad2fc5a0ff492de610d256099f1af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d8fffdf727fad2fc5a0ff492de610d256099f1af/filelist.py
("invalid template line: " + "'%s' expects <dir> <pattern1> <pattern2> ..." % action) return dir = convert_path(words[1]) pattern_list = map (convert_path, words[2:]) elif action in ('graft','prune'): if len (words) != 2: self.warn \ ("invalid template line: " + "'%s' expects a single <dir_pattern>" % action) return ...
(("no previously-included files matching '%s' " + "found under directory '%s'") % (pattern, dir)) elif action == 'graft': self.debug_print("graft " + dir_pattern) if not self.select_pattern(None, prefix=dir_pattern): self.warn ("no directories found matching '%s'" % dir_pattern) elif action == 'prune': self.debug_pri...
def process_line(self, line):
d8fffdf727fad2fc5a0ff492de610d256099f1af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d8fffdf727fad2fc5a0ff492de610d256099f1af/filelist.py
def process_line(self, line):
d8fffdf727fad2fc5a0ff492de610d256099f1af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d8fffdf727fad2fc5a0ff492de610d256099f1af/filelist.py
if iconv_incs: if iconv_libs:
if platform not in ['darwin'] and iconv_incs is not None: if iconv_libs is not None:
def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
1aa2c1d873c94d1c1dc341da3d7870939bf8ec85 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1aa2c1d873c94d1c1dc341da3d7870939bf8ec85/setup.py
raise TypeError, 'string payload expected'
raise TypeError, 'string payload expected: %s' % type(payload)
def _handle_text(self, msg): payload = msg.get_payload() if not isinstance(payload, StringType): raise TypeError, 'string payload expected' if self._mangle_from_: payload = fcre.sub('>From ', payload) self._fp.write(payload)
ace87f9ad44cbb989e3962b99fa40a094a8c4c64 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ace87f9ad44cbb989e3962b99fa40a094a8c4c64/Generator.py
g = self.__class__(s)
g = self.__class__(s, self._mangle_from_, self.__maxheaderlen)
def _handle_multipart(self, msg, isdigest=0): # The trick here is to write out each part separately, merge them all # together, and then make sure that the boundary we've chosen isn't # present in the payload. msgtexts = [] for part in msg.get_payload(): s = StringIO() g = self.__class__(s) g(part, unixfrom=0) msgtexts...
ace87f9ad44cbb989e3962b99fa40a094a8c4c64 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ace87f9ad44cbb989e3962b99fa40a094a8c4c64/Generator.py
def _handle_message_rfc822(self, msg):
def _handle_message_delivery_status(self, msg): blocks = [] for part in msg.get_payload(): s = StringIO() g = self.__class__(s, self._mangle_from_, self.__maxheaderlen) g(part, unixfrom=0) text = s.getvalue() lines = text.split('\n') if lines and lines[-1] == '': blocks.append(NL.join(lines[:-1])) else: blocks.appe...
def _handle_message_rfc822(self, msg): s = StringIO() g = self.__class__(s) # A message/rfc822 should contain a scalar payload which is another # Message object. Extract that object, stringify it, and write that # out. g(msg.get_payload(), unixfrom=0) self._fp.write(s.getvalue())
ace87f9ad44cbb989e3962b99fa40a094a8c4c64 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ace87f9ad44cbb989e3962b99fa40a094a8c4c64/Generator.py
g = self.__class__(s)
g = self.__class__(s, self._mangle_from_, self.__maxheaderlen)
def _handle_message_rfc822(self, msg): s = StringIO() g = self.__class__(s) # A message/rfc822 should contain a scalar payload which is another # Message object. Extract that object, stringify it, and write that # out. g(msg.get_payload(), unixfrom=0) self._fp.write(s.getvalue())
ace87f9ad44cbb989e3962b99fa40a094a8c4c64 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ace87f9ad44cbb989e3962b99fa40a094a8c4c64/Generator.py
if part.get_main_type('text') == 'text':
maintype = part.get_main_type('text') if maintype == 'text':
def _dispatch(self, msg): for part in msg.walk(): if part.get_main_type('text') == 'text': print >> self, part.get_payload(decode=1) else: print >> self, self._fmt % { 'type' : part.get_type('[no MIME type]'), 'maintype' : part.get_main_type('[no main MIME type]'), 'subtype' : part.get_subtype('[no sub-MIME ...
ace87f9ad44cbb989e3962b99fa40a094a8c4c64 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ace87f9ad44cbb989e3962b99fa40a094a8c4c64/Generator.py
except IOError, msg:
except (OSError, IOError), msg:
def addrobot(self, root): root = urlparse.urljoin(root, "/") if self.robots.has_key(root): return url = urlparse.urljoin(root, "/robots.txt") self.robots[root] = rp = robotparser.RobotFileParser() self.note(2, "Parsing %s", url) rp.debug = self.verbose > 3 rp.set_url(url) try: rp.read() except IOError, msg: self.note(1...
679ea385e9bb7c44250d28eea8abc5da7bca7b27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/679ea385e9bb7c44250d28eea8abc5da7bca7b27/webchecker.py
except IOError, msg:
except (OSError, IOError), msg:
def openpage(self, url_pair): url, fragment = url_pair try: return self.urlopener.open(url) except IOError, msg: msg = self.sanitize(msg) self.note(0, "Error %s", msg) if self.verbose > 0: self.show(" HREF ", url, " from", self.todo[url_pair]) self.setbad(url_pair, msg) return None
679ea385e9bb7c44250d28eea8abc5da7bca7b27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/679ea385e9bb7c44250d28eea8abc5da7bca7b27/webchecker.py
z = zipfile.ZipFile (base_dir + ".zip", "wb", compression=zipfile.ZIP_DEFLATED)
z = zipfile.ZipFile (base_dir + ".zip", "wb", compression=zipfile.ZIP_DEFLATED)
def make_zipfile (self, base_dir):
c68d9e2a18864482ff569faf40b2ad7e34018812 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c68d9e2a18864482ff569faf40b2ad7e34018812/dist.py
self.addheaders = [('User-Agent', server_version)]
self.addheaders = [('User-agent', server_version)]
def __init__(self): server_version = "Python-urllib/%s" % __version__ self.addheaders = [('User-Agent', server_version)] # manage the individual handlers self.handlers = [] self.handle_open = {} self.handle_error = {}
097068a20bfbf07c00e3babb07c705119eba42ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/097068a20bfbf07c00e3babb07c705119eba42ac/urllib2.py
req.add_header('Proxy-Authorization', 'Basic ' + user_pass)
req.add_header('Proxy-authorization', 'Basic ' + user_pass)
def proxy_open(self, req, proxy, type): orig_type = req.get_type() type, r_type = splittype(proxy) host, XXX = splithost(r_type) if '@' in host: user_pass, host = host.split('@', 1) if ':' in user_pass: user, password = user_pass.split(':', 1) user_pass = base64.encodestring('%s:%s' % (unquote(user), unquote(password))...
097068a20bfbf07c00e3babb07c705119eba42ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/097068a20bfbf07c00e3babb07c705119eba42ac/urllib2.py
auth_header = 'Proxy-Authorization'
auth_header = 'Proxy-authorization'
def http_error_401(self, req, fp, code, msg, headers): host = urlparse.urlparse(req.get_full_url())[1] return self.http_error_auth_reqed('www-authenticate', host, req, headers)
097068a20bfbf07c00e3babb07c705119eba42ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/097068a20bfbf07c00e3babb07c705119eba42ac/urllib2.py
for args in self.parent.addheaders: name, value = args
for name, value in self.parent.addheaders: name = name.capitalize()
def do_open(self, http_class, req): host = req.get_host() if not host: raise URLError('no host given')
097068a20bfbf07c00e3babb07c705119eba42ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/097068a20bfbf07c00e3babb07c705119eba42ac/urllib2.py
h.putheader(*args)
h.putheader(name, value)
def do_open(self, http_class, req): host = req.get_host() if not host: raise URLError('no host given')
097068a20bfbf07c00e3babb07c705119eba42ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/097068a20bfbf07c00e3babb07c705119eba42ac/urllib2.py
'Content-Type: %s\nContent-Length: %d\nLast-modified: %s\n' %
'Content-type: %s\nContent-length: %d\nLast-modified: %s\n' %
def open_local_file(self, req): host = req.get_host() file = req.get_selector() localfile = url2pathname(file) stats = os.stat(localfile) size = stats.st_size modified = rfc822.formatdate(stats.st_mtime) mtype = mimetypes.guess_type(file)[0] headers = mimetools.Message(StringIO( 'Content-Type: %s\nContent-Length: %d\nL...
097068a20bfbf07c00e3babb07c705119eba42ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/097068a20bfbf07c00e3babb07c705119eba42ac/urllib2.py
headers += "Content-Type: %s\n" % mtype
headers += "Content-type: %s\n" % mtype
def ftp_open(self, req): host = req.get_host() if not host: raise IOError, ('ftp error', 'no host given') # XXX handle custom username & password try: host = socket.gethostbyname(host) except socket.error, msg: raise URLError(msg) host, port = splitport(host) if port is None: port = ftplib.FTP_PORT path, attrs = splita...
097068a20bfbf07c00e3babb07c705119eba42ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/097068a20bfbf07c00e3babb07c705119eba42ac/urllib2.py
headers += "Content-Length: %d\n" % retrlen
headers += "Content-length: %d\n" % retrlen
def ftp_open(self, req): host = req.get_host() if not host: raise IOError, ('ftp error', 'no host given') # XXX handle custom username & password try: host = socket.gethostbyname(host) except socket.error, msg: raise URLError(msg) host, port = splitport(host) if port is None: port = ftplib.FTP_PORT path, attrs = splita...
097068a20bfbf07c00e3babb07c705119eba42ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/097068a20bfbf07c00e3babb07c705119eba42ac/urllib2.py
y = _reconstruct(x, reductor(), 1)
y = _reconstruct(x, reductor(), 1, memo)
def deepcopy(x, memo = None): """Deep copy operation on arbitrary Python objects. See the module's __doc__ string for more info. """ if memo is None: memo = {} d = id(x) if memo.has_key(d): return memo[d] try: copierfunction = _deepcopy_dispatch[type(x)] except KeyError: try: copier = x.__deepcopy__ except AttributeE...
69aa394a60d56aaf0e00893137935bdc97e0d527 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/69aa394a60d56aaf0e00893137935bdc97e0d527/copy.py
def _reconstruct(x, info, deep):
def _reconstruct(x, info, deep, memo=None):
def _reconstruct(x, info, deep): if isinstance(info, str): return x assert isinstance(info, tuple) n = len(info) assert n in (2, 3) callable, args = info[:2] if n > 2: state = info[2] else: state = {} if deep: args = deepcopy(args) y = callable(*args) if state: if deep: state = deepcopy(state) y.__dict__.update(state) ...
69aa394a60d56aaf0e00893137935bdc97e0d527 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/69aa394a60d56aaf0e00893137935bdc97e0d527/copy.py
args = deepcopy(args)
args = deepcopy(args, memo)
def _reconstruct(x, info, deep): if isinstance(info, str): return x assert isinstance(info, tuple) n = len(info) assert n in (2, 3) callable, args = info[:2] if n > 2: state = info[2] else: state = {} if deep: args = deepcopy(args) y = callable(*args) if state: if deep: state = deepcopy(state) y.__dict__.update(state) ...
69aa394a60d56aaf0e00893137935bdc97e0d527 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/69aa394a60d56aaf0e00893137935bdc97e0d527/copy.py
state = deepcopy(state)
state = deepcopy(state, memo)
def _reconstruct(x, info, deep): if isinstance(info, str): return x assert isinstance(info, tuple) n = len(info) assert n in (2, 3) callable, args = info[:2] if n > 2: state = info[2] else: state = {} if deep: args = deepcopy(args) y = callable(*args) if state: if deep: state = deepcopy(state) y.__dict__.update(state) ...
69aa394a60d56aaf0e00893137935bdc97e0d527 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/69aa394a60d56aaf0e00893137935bdc97e0d527/copy.py
"""Base class for client errors."""
def _stringify(string): return string
89fac5392e1732557feb33809495efa89139b1f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89fac5392e1732557feb33809495efa89139b1f0/xmlrpclib.py
"""Indicates an HTTP protocol error."""
def _stringify(string): return string
89fac5392e1732557feb33809495efa89139b1f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89fac5392e1732557feb33809495efa89139b1f0/xmlrpclib.py
"""Indicates a broken response package"""
def __repr__(self): return ( "<ProtocolError for %s: %s %s>" % (self.url, self.errcode, self.errmsg) )
89fac5392e1732557feb33809495efa89139b1f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89fac5392e1732557feb33809495efa89139b1f0/xmlrpclib.py
"""indicates a XML-RPC fault package"""
def __repr__(self): return ( "<ProtocolError for %s: %s %s>" % (self.url, self.errcode, self.errmsg) )
89fac5392e1732557feb33809495efa89139b1f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89fac5392e1732557feb33809495efa89139b1f0/xmlrpclib.py
def __repr__(self): return ( "<Fault %s: %s>" % (self.faultCode, repr(self.faultString)) )
89fac5392e1732557feb33809495efa89139b1f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89fac5392e1732557feb33809495efa89139b1f0/xmlrpclib.py
"""Convert any Python value to XML-RPC boolean."""
def boolean(value, truefalse=(False, True)): # convert any Python value to XML-RPC boolean return truefalse[operator.truth(value)]
89fac5392e1732557feb33809495efa89139b1f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89fac5392e1732557feb33809495efa89139b1f0/xmlrpclib.py
def datetime(data): value = DateTime() value.decode(data) return value
89fac5392e1732557feb33809495efa89139b1f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89fac5392e1732557feb33809495efa89139b1f0/xmlrpclib.py
"""XML parser using xmllib.XMLParser. This is about 10 times slower than sgmlop on roundtrip testing. """
def close(self): self._parser.Parse("", 1) # end of data del self._target, self._parser # get rid of circular references
89fac5392e1732557feb33809495efa89139b1f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89fac5392e1732557feb33809495efa89139b1f0/xmlrpclib.py
"""Generate an XML-RPC params chunk from a Python data structure"""
"""Generate an XML-RPC params chunk from a Python data structure. Create a marshaller instance for each set of parameters, and use "dumps" method to convert your data (represented as a tuple) to a XML-RPC params chunk. to write a fault response, pass a Fault instance instead. You may prefer to use the "dumps" conven...
def __init__(self, target): self.handle_xml = target.xml self.unknown_starttag = target.start self.handle_data = target.data self.unknown_endtag = target.end xmllib.XMLParser.__init__(self)
89fac5392e1732557feb33809495efa89139b1f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89fac5392e1732557feb33809495efa89139b1f0/xmlrpclib.py
"""Unmarshal an XML-RPC response, based on incoming XML event messages (start, data, end). Call close() to get the resulting data structure. Note that this reader is fairly tolerant, and gladly accepts bogus XML-RPC data without complaining (but not bogus XML). """
def dump_instance(self, value): # check for special wrappers if value.__class__ in WRAPPERS: value.encode(self) else: # store instance attributes as a struct (really?) self.dump_struct(value.__dict__)
89fac5392e1732557feb33809495efa89139b1f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/89fac5392e1732557feb33809495efa89139b1f0/xmlrpclib.py
raise error, "illegal range"
raise error, "bad character range"
def _parse(source, state): # parse a simple pattern subpattern = SubPattern(state) while 1: if source.next in ("|", ")"): break # end of subpattern this = source.get() if this is None: break # end of pattern if state.flags & SRE_FLAG_VERBOSE: # skip whitespace and comments if this in WHITESPACE: continue if this ==...
9f35412d2de02eca39105b8e038352389fa2caa3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9f35412d2de02eca39105b8e038352389fa2caa3/sre_parse.py
raise error, "illegal range"
raise error, "bad character range"
def _parse(source, state): # parse a simple pattern subpattern = SubPattern(state) while 1: if source.next in ("|", ")"): break # end of subpattern this = source.get() if this is None: break # end of pattern if state.flags & SRE_FLAG_VERBOSE: # skip whitespace and comments if this in WHITESPACE: continue if this ==...
9f35412d2de02eca39105b8e038352389fa2caa3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9f35412d2de02eca39105b8e038352389fa2caa3/sre_parse.py
if max < min: raise error, "bad repeat interval"
def _parse(source, state): # parse a simple pattern subpattern = SubPattern(state) while 1: if source.next in ("|", ")"): break # end of subpattern this = source.get() if this is None: break # end of pattern if state.flags & SRE_FLAG_VERBOSE: # skip whitespace and comments if this in WHITESPACE: continue if this ==...
9f35412d2de02eca39105b8e038352389fa2caa3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9f35412d2de02eca39105b8e038352389fa2caa3/sre_parse.py
raise error, "illegal character in group name"
raise error, "bad character in group name"
def _parse(source, state): # parse a simple pattern subpattern = SubPattern(state) while 1: if source.next in ("|", ")"): break # end of subpattern this = source.get() if this is None: break # end of pattern if state.flags & SRE_FLAG_VERBOSE: # skip whitespace and comments if this in WHITESPACE: continue if this ==...
9f35412d2de02eca39105b8e038352389fa2caa3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9f35412d2de02eca39105b8e038352389fa2caa3/sre_parse.py
raise error, "illegal character in group name"
raise error, "bad character in group name"
def _parse(source, state): # parse a simple pattern subpattern = SubPattern(state) while 1: if source.next in ("|", ")"): break # end of subpattern this = source.get() if this is None: break # end of pattern if state.flags & SRE_FLAG_VERBOSE: # skip whitespace and comments if this in WHITESPACE: continue if this ==...
9f35412d2de02eca39105b8e038352389fa2caa3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9f35412d2de02eca39105b8e038352389fa2caa3/sre_parse.py
if char is None or char == ")":
if char is None: raise error, "unexpected end of pattern" if char == ")":
def _parse(source, state): # parse a simple pattern subpattern = SubPattern(state) while 1: if source.next in ("|", ")"): break # end of subpattern this = source.get() if this is None: break # end of pattern if state.flags & SRE_FLAG_VERBOSE: # skip whitespace and comments if this in WHITESPACE: continue if this ==...
9f35412d2de02eca39105b8e038352389fa2caa3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9f35412d2de02eca39105b8e038352389fa2caa3/sre_parse.py
raise error, "illegal character in group name"
raise error, "bad character in group name"
def parse_template(source, pattern): # parse 're' replacement string into list of literals and # group references s = Tokenizer(source) p = [] a = p.append while 1: this = s.get() if this is None: break # end of replacement string if this and this[0] == "\\": # group if this == "\\g": name = "" if s.match("<"): while 1...
9f35412d2de02eca39105b8e038352389fa2caa3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9f35412d2de02eca39105b8e038352389fa2caa3/sre_parse.py
def __init__(self, master=None): """Construct a variable with an optional MASTER as master widget. The variable is named PY_VAR_number in Tcl.
def __init__(self, master=None, value=None, name=None): """Construct a variable MASTER can be given as master widget. VALUE is an optional value (defaults to "") NAME is an optional Tcl name (defaults to PY_VARnum). If NAME matches an existing variable and VALUE is omitted then the existing value is retained.
def __init__(self, master=None): """Construct a variable with an optional MASTER as master widget. The variable is named PY_VAR_number in Tcl. """ global _varnum if not master: master = _default_root self._master = master self._tk = master.tk self._name = 'PY_VAR' + repr(_varnum) _varnum = _varnum + 1 self.set(self._de...
d9565dc51f7ac24afa5838b531be5ac7f386c816 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d9565dc51f7ac24afa5838b531be5ac7f386c816/Tkinter.py
self._name = 'PY_VAR' + repr(_varnum) _varnum = _varnum + 1 self.set(self._default)
if name: self._name = name else: self._name = 'PY_VAR' + `_varnum` _varnum += 1 if value != None: self.set(value) elif not self._tk.call("info", "exists", self._name): self.set(self._default)
def __init__(self, master=None): """Construct a variable with an optional MASTER as master widget. The variable is named PY_VAR_number in Tcl. """ global _varnum if not master: master = _default_root self._master = master self._tk = master.tk self._name = 'PY_VAR' + repr(_varnum) _varnum = _varnum + 1 self.set(self._de...
d9565dc51f7ac24afa5838b531be5ac7f386c816 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d9565dc51f7ac24afa5838b531be5ac7f386c816/Tkinter.py
def __init__(self, master=None):
def __init__(self, master=None, value=None, name=None):
def __init__(self, master=None): """Construct a string variable.
d9565dc51f7ac24afa5838b531be5ac7f386c816 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d9565dc51f7ac24afa5838b531be5ac7f386c816/Tkinter.py
MASTER can be given as master widget.""" Variable.__init__(self, master)
MASTER can be given as master widget. VALUE is an optional value (defaults to "") NAME is an optional Tcl name (defaults to PY_VARnum). If NAME matches an existing variable and VALUE is omitted then the existing value is retained. """ Variable.__init__(self, master, value, name)
def __init__(self, master=None): """Construct a string variable.
d9565dc51f7ac24afa5838b531be5ac7f386c816 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d9565dc51f7ac24afa5838b531be5ac7f386c816/Tkinter.py
def __init__(self, master=None):
def __init__(self, master=None, value=None, name=None):
def __init__(self, master=None): """Construct an integer variable.
d9565dc51f7ac24afa5838b531be5ac7f386c816 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d9565dc51f7ac24afa5838b531be5ac7f386c816/Tkinter.py
MASTER can be given as master widget.""" Variable.__init__(self, master)
MASTER can be given as master widget. VALUE is an optional value (defaults to 0) NAME is an optional Tcl name (defaults to PY_VARnum). If NAME matches an existing variable and VALUE is omitted then the existing value is retained. """ Variable.__init__(self, master, value, name)
def __init__(self, master=None): """Construct an integer variable.
d9565dc51f7ac24afa5838b531be5ac7f386c816 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d9565dc51f7ac24afa5838b531be5ac7f386c816/Tkinter.py
def __init__(self, master=None):
def __init__(self, master=None, value=None, name=None):
def __init__(self, master=None): """Construct a float variable.
d9565dc51f7ac24afa5838b531be5ac7f386c816 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d9565dc51f7ac24afa5838b531be5ac7f386c816/Tkinter.py
MASTER can be given as a master widget.""" Variable.__init__(self, master)
MASTER can be given as master widget. VALUE is an optional value (defaults to 0.0) NAME is an optional Tcl name (defaults to PY_VARnum). If NAME matches an existing variable and VALUE is omitted then the existing value is retained. """ Variable.__init__(self, master, value, name)
def __init__(self, master=None): """Construct a float variable.
d9565dc51f7ac24afa5838b531be5ac7f386c816 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d9565dc51f7ac24afa5838b531be5ac7f386c816/Tkinter.py
_default = "false" def __init__(self, master=None):
_default = False def __init__(self, master=None, value=None, name=None):
def get(self): """Return the value of the variable as a float.""" return getdouble(self._tk.globalgetvar(self._name))
d9565dc51f7ac24afa5838b531be5ac7f386c816 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d9565dc51f7ac24afa5838b531be5ac7f386c816/Tkinter.py
MASTER can be given as a master widget.""" Variable.__init__(self, master)
MASTER can be given as master widget. VALUE is an optional value (defaults to False) NAME is an optional Tcl name (defaults to PY_VARnum). If NAME matches an existing variable and VALUE is omitted then the existing value is retained. """ Variable.__init__(self, master, value, name)
def __init__(self, master=None): """Construct a boolean variable.
d9565dc51f7ac24afa5838b531be5ac7f386c816 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d9565dc51f7ac24afa5838b531be5ac7f386c816/Tkinter.py
if hasattr(self.db, 'close'): self.db.close() self.db = None
if hasattr(self.dict, 'close'): self.dict.close() self.dict = None
def close(self): if hasattr(self.db, 'close'): self.db.close() self.db = None
845502b911d91a3218eca6094becdea4677a81b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/845502b911d91a3218eca6094becdea4677a81b5/shelve.py
dict['prefixname'] = 'mwerks_plugin_config.h'
if hasattr(MacOS, 'runtimemodel') and MacOS.runtimemodel == "carbon": dict['prefixname'] = 'mwerks_carbonplugin_config.h' else: dict['prefixname'] = 'mwerks_plugin_config.h'
def __init__(self, dict, templatelist=TEMPLATELIST, templatename=None): if templatename == None: if hasattr(MacOS, 'runtimemodel'): templatename = 'template-%s'%MacOS.runtimemodel else: templatename = 'template' if os.sep in templatename: templatedir = templatename else: try: packagedir = os.path.split(__file__)[0] exc...
0d463d2352c5265c508b1addef0c08e46763949e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0d463d2352c5265c508b1addef0c08e46763949e/cwxmlgen.py