rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
'libdirs': ('/usr/lib', '/sw/lib', '/lib'), 'incdirs': ('/usr/include/db2', '/usr/local/include/db2', '/sw/include/db2'),
'libdirs': ('/usr/local/lib', '/sw/lib', '/usr/lib', '/lib'), 'incdirs': ('/usr/local/include/db2', '/sw/include/db2', '/usr/include/db2'),
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')
ccfdde86eb56b5e24d44e18aa1c276be475aeee2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ccfdde86eb56b5e24d44e18aa1c276be475aeee2/setup.py
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')
ccfdde86eb56b5e24d44e18aa1c276be475aeee2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ccfdde86eb56b5e24d44e18aa1c276be475aeee2/setup.py
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')
ccfdde86eb56b5e24d44e18aa1c276be475aeee2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ccfdde86eb56b5e24d44e18aa1c276be475aeee2/setup.py
filename = tempfilename = tempfile.mktemp() if not self.writefile(filename):
(tfd, tempfilename) = tempfile.mkstemp(prefix='IDLE_tmp_') filename = tempfilename os.close(tfd) if not self.writefile(tempfilename):
def print_window(self, event): tempfilename = None saved = self.get_saved() if saved: filename = self.filename # shell undo is reset after every prompt, looks saved, probably isn't if not saved or filename is None: # XXX KBK 08Jun03 Wouldn't it be better to ask the user to save? filename = tempfilename = tempfile.mktem...
61e2c9a402106664142fa1e26ac5d938b2f95d1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/61e2c9a402106664142fa1e26ac5d938b2f95d1b/IOBinding.py
_LegalCharsPatt = r"[\w\d!
_LegalCharsPatt = r"[\w\d!
def OutputString(self, attrs=None): # Build up our result # result = [] RA = result.append
c05abb3bdaa87b6e5ea2d6db1e5d6145ae2b0440 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c05abb3bdaa87b6e5ea2d6db1e5d6145ae2b0440/Cookie.py
""+ _LegalCharsPatt +"+"
""+ _LegalCharsPatt +"+?"
def OutputString(self, attrs=None): # Build up our result # result = [] RA = result.append
c05abb3bdaa87b6e5ea2d6db1e5d6145ae2b0440 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c05abb3bdaa87b6e5ea2d6db1e5d6145ae2b0440/Cookie.py
self.announce(e.msg, log.ERROR)
self.announce(str(e), log.ERROR)
def upload_file(self, command, pyversion, filename): # Sign if requested if self.sign: gpg_args = ["gpg", "--detach-sign", "-a", filename] if self.identity: gpg_args[2:2] = ["--local-user", self.identity] spawn(gpg_args, dry_run=self.dry_run)
137ff79329ceefa9f7318c3bb97277627866c2ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/137ff79329ceefa9f7318c3bb97277627866c2ac/upload.py
pos = f.tell()
pos = int(f.tell())
def _addval(self, val): f = _open(self._datfile, 'rb+') f.seek(0, 2) pos = f.tell()
3f36a085feeba6217f791d683021816fa513c01f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3f36a085feeba6217f791d683021816fa513c01f/dumbdbm.py
expand_tabs if true (default), tabs in input text will be expanded to spaces before further processing. Each tab will become 1 .. 8 spaces, depending on its position in its line. If false, each tab is treated as a single character. replace_whitespace if true (default), all whitespace characters in the input text are r...
expand_tabs (default: true) Expand tabs in input text to spaces before further processing. Each tab will become 1 .. 8 spaces, depending on its position in its line. If false, each tab is treated as a single character. replace_whitespace (default: true) Replace all whitespace characters in the input text by spaces aft...
def islower (c): return c in string.lowercase
62e4f3bf224d6a3a17c04524a674caaa14270753 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/62e4f3bf224d6a3a17c04524a674caaa14270753/textwrap.py
if (chunks[i][-1] == "." and
if (chunks[i][-1] in punct and
def _fix_sentence_endings (self, chunks): """_fix_sentence_endings(chunks : [string])
62e4f3bf224d6a3a17c04524a674caaa14270753 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/62e4f3bf224d6a3a17c04524a674caaa14270753/textwrap.py
self._fix_sentence_endings(chunks)
if self.fix_sentence_endings: self._fix_sentence_endings(chunks)
def wrap (self, text, width): """wrap(text : string, width : int) -> [string]
62e4f3bf224d6a3a17c04524a674caaa14270753 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/62e4f3bf224d6a3a17c04524a674caaa14270753/textwrap.py
return filename
components = string.split(filename, ':') for i in range(1, len(components)): if components[i] == '..': components[i] = '' return string.join(components, ':')
def _filename_to_abs(self, filename): # Some filenames seem to be unix-like. Convert to Mac names.
9020bcebc875463f1acec1b14949db35e1e68ad6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9020bcebc875463f1acec1b14949db35e1e68ad6/mwerkscompiler.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...
e48aa966c1f11ee6d66fc96a92dc4972d52353b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e48aa966c1f11ee6d66fc96a92dc4972d52353b8/mailerdaemon.py
def __init__(self, environ=os.environ): self.dict = self.data = parse(environ=environ)
def __init__(self, environ=os.environ, keep_blank_values=0, strict_parsing=0): self.dict = self.data = parse(environ=environ, keep_blank_values=keep_blank_values, strict_parsing=strict_parsing)
def __init__(self, environ=os.environ): self.dict = self.data = parse(environ=environ) self.query_string = environ['QUERY_STRING']
05b3c450a811b93bd915ea0931b04e2679557390 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/05b3c450a811b93bd915ea0931b04e2679557390/cgi.py
except:
except (ValueError, OverflowError):
def mimify(infile, outfile): """Convert 8bit parts of a MIME mail message to quoted-printable.""" if type(infile) == type(''): ifile = open(infile) if type(outfile) == type('') and infile == outfile: import os d, f = os.path.split(infile) os.rename(infile, os.path.join(d, ',' + f)) else: ifile = infile if type(outfile)...
6274fff287bb084f9511dd4c65c3898427f7c96d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6274fff287bb084f9511dd4c65c3898427f7c96d/mimify.py
return t + data[9] - time.timezone
return t - data[9] - time.timezone
def mktime_tz(data): """Turn a 10-tuple as returned by parsedate_tz() into a UTC timestamp. Minor glitch: this first interprets the first 8 elements as a local time and then compensates for the timezone difference; this may yield a slight error around daylight savings time switch dates. Not enough to worry about for ...
00455b77a66f78679f41e2b33955a439cb66316b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/00455b77a66f78679f41e2b33955a439cb66316b/rfc822.py
attrs['script_name'] = sys.argv[0]
attrs['script_name'] = os.path.basename(sys.argv[0])
def setup (**attrs): """The gateway to the Distutils: do everything your setup script needs to do, in a highly flexible and user-driven way. Briefly: create a Distribution instance; find and parse config files; parse the command line; run each Distutils command found there, customized by the options supplied to 'setup...
8560bb816720a6b8069f9850d5203ed2425e9cbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8560bb816720a6b8069f9850d5203ed2425e9cbc/core.py
self.text.insert(mark, str(s), tags)
self.text.insert(mark, s, tags)
def write(self, s, tags=(), mark="insert"): self.text.insert(mark, str(s), tags) self.text.see(mark) self.text.update()
d01163615ac4656c14c1c83b74526c8e85d094c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d01163615ac4656c14c1c83b74526c8e85d094c2/OutputWindow.py
host = urlparse.urlparse(req.get_full_url())[1]
host = req.get_host()
def do_open(self, http_class, req): host = urlparse.urlparse(req.get_full_url())[1] if not host: raise URLError('no host given')
7667680d703d32c796be342539b9265f9e280e98 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7667680d703d32c796be342539b9265f9e280e98/urllib2.py
post_interp = match.group(1)
post_interp = match.group(1) or ''
def copy_scripts (self): """Copy each script listed in 'self.scripts'; if it's marked as a Python script in the Unix way (first line matches 'first_line_re', ie. starts with "\#!" and contains "python"), then adjust the first line to refer to the current Python interpreter as we copy. """ self.mkpath(self.build_dir) fo...
90294d01be806a96f5196143e4d9ea10a6064965 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/90294d01be806a96f5196143e4d9ea10a6064965/build_scripts.py
skip_msg = "byte-compilation of %s skipped" % f
skip_msg = "skipping byte-compilation of %s" % f
def run (self):
90c74cc4da5b1aa58a37799df16541870ddc4ff7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/90c74cc4da5b1aa58a37799df16541870ddc4ff7/install_lib.py
self.putsequences()
self.putsequences(sequences)
def removefromallsequences(self, list): if hasattr(self, 'last') and self.last in list: del self.last sequences = self.getsequences() changed = 0 for name, seq in sequences.items(): for n in list: if n in seq: seq.remove(n) changed = 1 if not seq: del sequences[name] if changed: self.putsequences()
5f47e5752a31dda81e20a21ed9dc33d0fa9b0db7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5f47e5752a31dda81e20a21ed9dc33d0fa9b0db7/mhlib.py
if inspect.ismodule(object): return self.docmodule(*args) if inspect.isclass(object): return self.docclass(*args) if inspect.isroutine(object): return self.docroutine(*args)
try: if inspect.ismodule(object): return self.docmodule(*args) if inspect.isclass(object): return self.docclass(*args) if inspect.isroutine(object): return self.docroutine(*args) except AttributeError: pass
def document(self, object, name=None, *args): """Generate documentation for an object.""" args = (object, name) + args if inspect.ismodule(object): return self.docmodule(*args) if inspect.isclass(object): return self.docclass(*args) if inspect.isroutine(object): return self.docroutine(*args) return self.docother(*args)
28a4f0f9659e6f64eee8905b21953e7ba6ff68fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/28a4f0f9659e6f64eee8905b21953e7ba6ff68fa/pydoc.py
debug("nonnumeric port: '%s'", port)
_debug("nonnumeric port: '%s'", port)
def request_port(request): host = request.get_host() i = host.find(':') if i >= 0: port = host[i+1:] try: int(port) except ValueError: debug("nonnumeric port: '%s'", port) return None else: port = DEFAULT_HTTP_PORT return port
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" - checking cookie %s=%s", cookie.name, cookie.value)
_debug(" - checking cookie %s=%s", cookie.name, cookie.value)
def set_ok(self, cookie, request): """ If you override .set_ok(), be sure to call this method. If it returns false, so should your subclass (assuming your subclass wants to be more strict about which cookies to accept).
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" Set-Cookie2 without version attribute (%s=%s)", cookie.name, cookie.value)
_debug(" Set-Cookie2 without version attribute (%s=%s)", cookie.name, cookie.value)
def set_ok_version(self, cookie, request): if cookie.version is None: # Version is always set to 0 by parse_ns_headers if it's a Netscape # cookie, so this must be an invalid RFC 2965 cookie. debug(" Set-Cookie2 without version attribute (%s=%s)", cookie.name, cookie.value) return False if cookie.version > 0 and not ...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" RFC 2965 cookies are switched off")
_debug(" RFC 2965 cookies are switched off")
def set_ok_version(self, cookie, request): if cookie.version is None: # Version is always set to 0 by parse_ns_headers if it's a Netscape # cookie, so this must be an invalid RFC 2965 cookie. debug(" Set-Cookie2 without version attribute (%s=%s)", cookie.name, cookie.value) return False if cookie.version > 0 and not ...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" Netscape cookies are switched off")
_debug(" Netscape cookies are switched off")
def set_ok_version(self, cookie, request): if cookie.version is None: # Version is always set to 0 by parse_ns_headers if it's a Netscape # cookie, so this must be an invalid RFC 2965 cookie. debug(" Set-Cookie2 without version attribute (%s=%s)", cookie.name, cookie.value) return False if cookie.version > 0 and not ...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" third-party RFC 2965 cookie during "
_debug(" third-party RFC 2965 cookie during "
def set_ok_verifiability(self, cookie, request): if request.is_unverifiable() and is_third_party(request): if cookie.version > 0 and self.strict_rfc2965_unverifiable: debug(" third-party RFC 2965 cookie during " "unverifiable transaction") return False elif cookie.version == 0 and self.strict_ns_unverifiable: debug("...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" third-party Netscape cookie during "
_debug(" third-party Netscape cookie during "
def set_ok_verifiability(self, cookie, request): if request.is_unverifiable() and is_third_party(request): if cookie.version > 0 and self.strict_rfc2965_unverifiable: debug(" third-party RFC 2965 cookie during " "unverifiable transaction") return False elif cookie.version == 0 and self.strict_ns_unverifiable: debug("...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" illegal name (starts with '$'): '%s'", cookie.name)
_debug(" illegal name (starts with '$'): '%s'", cookie.name)
def set_ok_name(self, cookie, request): # Try and stop servers setting V0 cookies designed to hack other # servers that know both V0 and V1 protocols. if (cookie.version == 0 and self.strict_ns_set_initial_dollar and cookie.name.startswith("$")): debug(" illegal name (starts with '$'): '%s'", cookie.name) return Fals...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" path attribute %s is not a prefix of request " "path %s", cookie.path, req_path)
_debug(" path attribute %s is not a prefix of request " "path %s", cookie.path, req_path)
def set_ok_path(self, cookie, request): if cookie.path_specified: req_path = request_path(request) if ((cookie.version > 0 or (cookie.version == 0 and self.strict_ns_set_path)) and not req_path.startswith(cookie.path)): debug(" path attribute %s is not a prefix of request " "path %s", cookie.path, req_path) return Fa...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" domain %s is in user block-list", cookie.domain)
_debug(" domain %s is in user block-list", cookie.domain)
def set_ok_domain(self, cookie, request): if self.is_blocked(cookie.domain): debug(" domain %s is in user block-list", cookie.domain) return False if self.is_not_allowed(cookie.domain): debug(" domain %s is not in user allow-list", cookie.domain) return False if cookie.domain_specified: req_host, erhn = eff_request...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" domain %s is not in user allow-list", cookie.domain)
_debug(" domain %s is not in user allow-list", cookie.domain)
def set_ok_domain(self, cookie, request): if self.is_blocked(cookie.domain): debug(" domain %s is in user block-list", cookie.domain) return False if self.is_not_allowed(cookie.domain): debug(" domain %s is not in user allow-list", cookie.domain) return False if cookie.domain_specified: req_host, erhn = eff_request...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" country-code second level domain %s", domain)
_debug(" country-code second level domain %s", domain)
def set_ok_domain(self, cookie, request): if self.is_blocked(cookie.domain): debug(" domain %s is in user block-list", cookie.domain) return False if self.is_not_allowed(cookie.domain): debug(" domain %s is not in user allow-list", cookie.domain) return False if cookie.domain_specified: req_host, erhn = eff_request...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" non-local domain %s contains no embedded dot", domain)
_debug(" non-local domain %s contains no embedded dot", domain)
def set_ok_domain(self, cookie, request): if self.is_blocked(cookie.domain): debug(" domain %s is in user block-list", cookie.domain) return False if self.is_not_allowed(cookie.domain): debug(" domain %s is not in user allow-list", cookie.domain) return False if cookie.domain_specified: req_host, erhn = eff_request...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" effective request-host %s (even with added " "initial dot) does not end end with %s", erhn, domain)
_debug(" effective request-host %s (even with added " "initial dot) does not end end with %s", erhn, domain)
def set_ok_domain(self, cookie, request): if self.is_blocked(cookie.domain): debug(" domain %s is in user block-list", cookie.domain) return False if self.is_not_allowed(cookie.domain): debug(" domain %s is not in user allow-list", cookie.domain) return False if cookie.domain_specified: req_host, erhn = eff_request...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" effective request-host %s does not domain-match " "%s", erhn, domain)
_debug(" effective request-host %s does not domain-match " "%s", erhn, domain)
def set_ok_domain(self, cookie, request): if self.is_blocked(cookie.domain): debug(" domain %s is in user block-list", cookie.domain) return False if self.is_not_allowed(cookie.domain): debug(" domain %s is not in user allow-list", cookie.domain) return False if cookie.domain_specified: req_host, erhn = eff_request...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" host prefix %s for domain %s contains a dot", host_prefix, domain)
_debug(" host prefix %s for domain %s contains a dot", host_prefix, domain)
def set_ok_domain(self, cookie, request): if self.is_blocked(cookie.domain): debug(" domain %s is in user block-list", cookie.domain) return False if self.is_not_allowed(cookie.domain): debug(" domain %s is not in user allow-list", cookie.domain) return False if cookie.domain_specified: req_host, erhn = eff_request...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" bad port %s (not numeric)", p)
_debug(" bad port %s (not numeric)", p)
def set_ok_port(self, cookie, request): if cookie.port_specified: req_port = request_port(request) if req_port is None: req_port = "80" else: req_port = str(req_port) for p in cookie.port.split(","): try: int(p) except ValueError: debug(" bad port %s (not numeric)", p) return False if p == req_port: break else: debug...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" request port (%s) not found in %s", req_port, cookie.port)
_debug(" request port (%s) not found in %s", req_port, cookie.port)
def set_ok_port(self, cookie, request): if cookie.port_specified: req_port = request_port(request) if req_port is None: req_port = "80" else: req_port = str(req_port) for p in cookie.port.split(","): try: int(p) except ValueError: debug(" bad port %s (not numeric)", p) return False if p == req_port: break else: debug...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" - checking cookie %s=%s", cookie.name, cookie.value)
_debug(" - checking cookie %s=%s", cookie.name, cookie.value)
def return_ok(self, cookie, request): """ If you override .return_ok(), be sure to call this method. If it returns false, so should your subclass (assuming your subclass wants to be more strict about which cookies to return).
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" RFC 2965 cookies are switched off")
_debug(" RFC 2965 cookies are switched off")
def return_ok_version(self, cookie, request): if cookie.version > 0 and not self.rfc2965: debug(" RFC 2965 cookies are switched off") return False elif cookie.version == 0 and not self.netscape: debug(" Netscape cookies are switched off") return False return True
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" Netscape cookies are switched off")
_debug(" Netscape cookies are switched off")
def return_ok_version(self, cookie, request): if cookie.version > 0 and not self.rfc2965: debug(" RFC 2965 cookies are switched off") return False elif cookie.version == 0 and not self.netscape: debug(" Netscape cookies are switched off") return False return True
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" third-party RFC 2965 cookie during unverifiable " "transaction")
_debug(" third-party RFC 2965 cookie during unverifiable " "transaction")
def return_ok_verifiability(self, cookie, request): if request.is_unverifiable() and is_third_party(request): if cookie.version > 0 and self.strict_rfc2965_unverifiable: debug(" third-party RFC 2965 cookie during unverifiable " "transaction") return False elif cookie.version == 0 and self.strict_ns_unverifiable: debu...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" third-party Netscape cookie during unverifiable " "transaction")
_debug(" third-party Netscape cookie during unverifiable " "transaction")
def return_ok_verifiability(self, cookie, request): if request.is_unverifiable() and is_third_party(request): if cookie.version > 0 and self.strict_rfc2965_unverifiable: debug(" third-party RFC 2965 cookie during unverifiable " "transaction") return False elif cookie.version == 0 and self.strict_ns_unverifiable: debu...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" secure cookie with non-secure request")
_debug(" secure cookie with non-secure request")
def return_ok_secure(self, cookie, request): if cookie.secure and request.get_type() != "https": debug(" secure cookie with non-secure request") return False return True
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" cookie expired")
_debug(" cookie expired")
def return_ok_expires(self, cookie, request): if cookie.is_expired(self._now): debug(" cookie expired") return False return True
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" request port %s does not match cookie port %s", req_port, cookie.port)
_debug(" request port %s does not match cookie port %s", req_port, cookie.port)
def return_ok_port(self, cookie, request): if cookie.port: req_port = request_port(request) if req_port is None: req_port = "80" for p in cookie.port.split(","): if p == req_port: break else: debug(" request port %s does not match cookie port %s", req_port, cookie.port) return False return True
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" cookie with unspecified domain does not string-compare " "equal to request domain")
_debug(" cookie with unspecified domain does not string-compare " "equal to request domain")
def return_ok_domain(self, cookie, request): req_host, erhn = eff_request_host(request) domain = cookie.domain
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" effective request-host name %s does not domain-match " "RFC 2965 cookie domain %s", erhn, domain)
_debug(" effective request-host name %s does not domain-match " "RFC 2965 cookie domain %s", erhn, domain)
def return_ok_domain(self, cookie, request): req_host, erhn = eff_request_host(request) domain = cookie.domain
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" request-host %s does not match Netscape cookie domain " "%s", req_host, domain)
_debug(" request-host %s does not match Netscape cookie domain " "%s", req_host, domain)
def return_ok_domain(self, cookie, request): req_host, erhn = eff_request_host(request) domain = cookie.domain
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
def domain_return_ok(self, domain, request): # Liberal check of. This is here as an optimization to avoid # having to load lots of MSIE cookie files unless necessary. req_host, erhn = eff_request_host(request) if not req_host.startswith("."): req_host = "."+req_host if not erhn.startswith("."): erhn = "."+erhn if not ...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" domain %s is in user block-list", domain)
_debug(" domain %s is in user block-list", domain)
def domain_return_ok(self, domain, request): # Liberal check of. This is here as an optimization to avoid # having to load lots of MSIE cookie files unless necessary. req_host, erhn = eff_request_host(request) if not req_host.startswith("."): req_host = "."+req_host if not erhn.startswith("."): erhn = "."+erhn if not ...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" domain %s is not in user allow-list", domain)
_debug(" domain %s is not in user allow-list", domain)
def domain_return_ok(self, domain, request): # Liberal check of. This is here as an optimization to avoid # having to load lots of MSIE cookie files unless necessary. req_host, erhn = eff_request_host(request) if not req_host.startswith("."): req_host = "."+req_host if not erhn.startswith("."): erhn = "."+erhn if not ...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug("- checking cookie path=%s", path)
_debug("- checking cookie path=%s", path)
def path_return_ok(self, path, request): debug("- checking cookie path=%s", path) req_path = request_path(request) if not req_path.startswith(path): debug(" %s does not path-match %s", req_path, path) return False return True
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" %s does not path-match %s", req_path, path)
_debug(" %s does not path-match %s", req_path, path)
def path_return_ok(self, path, request): debug("- checking cookie path=%s", path) req_path = request_path(request) if not req_path.startswith(path): debug(" %s does not path-match %s", req_path, path) return False return True
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug("Checking %s for cookies to return", domain)
_debug("Checking %s for cookies to return", domain)
def _cookies_for_domain(self, domain, request): cookies = [] if not self._policy.domain_return_ok(domain, request): return [] debug("Checking %s for cookies to return", domain) cookies_by_path = self._cookies[domain] for path in cookies_by_path.keys(): if not self._policy.path_return_ok(path, request): continue cookies...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" not returning cookie")
_debug(" not returning cookie")
def _cookies_for_domain(self, domain, request): cookies = [] if not self._policy.domain_return_ok(domain, request): return [] debug("Checking %s for cookies to return", domain) cookies_by_path = self._cookies[domain] for path in cookies_by_path.keys(): if not self._policy.path_return_ok(path, request): continue cookies...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" it's a match")
_debug(" it's a match")
def _cookies_for_domain(self, domain, request): cookies = [] if not self._policy.domain_return_ok(domain, request): return [] debug("Checking %s for cookies to return", domain) cookies_by_path = self._cookies[domain] for path in cookies_by_path.keys(): if not self._policy.path_return_ok(path, request): continue cookies...
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug("add_cookie_header")
_debug("add_cookie_header")
def add_cookie_header(self, request): """Add correct Cookie: header to request (urllib2.Request object).
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" missing value for domain attribute")
_debug(" missing value for domain attribute")
def _normalized_cookie_tuples(self, attrs_set): """Return list of tuples containing normalised cookie information.
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" missing or invalid value for expires "
_debug(" missing or invalid value for expires "
def _normalized_cookie_tuples(self, attrs_set): """Return list of tuples containing normalised cookie information.
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" missing or invalid (non-numeric) value for "
_debug(" missing or invalid (non-numeric) value for "
def _normalized_cookie_tuples(self, attrs_set): """Return list of tuples containing normalised cookie information.
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" missing value for %s attribute" % k)
_debug(" missing value for %s attribute" % k)
def _normalized_cookie_tuples(self, attrs_set): """Return list of tuples containing normalised cookie information.
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug("Expiring cookie, domain='%s', path='%s', name='%s'", domain, path, name)
_debug("Expiring cookie, domain='%s', path='%s', name='%s'", domain, path, name)
def _cookie_from_cookie_tuple(self, tup, request): # standard is dict of standard cookie-attributes, rest is dict of the # rest of them name, value, standard, rest = tup
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug("extract_cookies: %s", response.info())
_debug("extract_cookies: %s", response.info())
def extract_cookies(self, response, request): """Extract cookies from response, where allowable given the request.""" debug("extract_cookies: %s", response.info()) self._cookies_lock.acquire() self._policy._now = self._now = int(time.time())
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
debug(" setting cookie: %s", cookie)
_debug(" setting cookie: %s", cookie)
def extract_cookies(self, response, request): """Extract cookies from response, where allowable given the request.""" debug("extract_cookies: %s", response.info()) self._cookies_lock.acquire() self._policy._now = self._now = int(time.time())
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
self.disallow_all = 0 self.allow_all = 0
self.disallow_all = False self.allow_all = False
def __init__(self, url=''): self.entries = [] self.default_entry = None self.disallow_all = 0 self.allow_all = 0 self.set_url(url) self.last_checked = 0
31bd529f5307f65702dbe2a0accbb5532b188a5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/31bd529f5307f65702dbe2a0accbb5532b188a5c/robotparser.py
self.disallow_all = 1
self.disallow_all = True
def read(self): """Reads the robots.txt URL and feeds it to the parser.""" opener = URLopener() f = opener.open(self.url) lines = [] line = f.readline() while line: lines.append(line.strip()) line = f.readline() self.errcode = opener.errcode if self.errcode == 401 or self.errcode == 403: self.disallow_all = 1 _debug("d...
31bd529f5307f65702dbe2a0accbb5532b188a5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/31bd529f5307f65702dbe2a0accbb5532b188a5c/robotparser.py
self.allow_all = 1
self.allow_all = True
def read(self): """Reads the robots.txt URL and feeds it to the parser.""" opener = URLopener() f = opener.open(self.url) lines = [] line = f.readline() while line: lines.append(line.strip()) line = f.readline() self.errcode = opener.errcode if self.errcode == 401 or self.errcode == 403: self.disallow_all = 1 _debug("d...
31bd529f5307f65702dbe2a0accbb5532b188a5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/31bd529f5307f65702dbe2a0accbb5532b188a5c/robotparser.py
entry.rulelines.append(RuleLine(line[1], 0))
entry.rulelines.append(RuleLine(line[1], False))
def parse(self, lines): """parse the input lines from a robots.txt file. We allow that a user-agent: line is not preceded by one or more blank lines.""" state = 0 linenumber = 0 entry = Entry()
31bd529f5307f65702dbe2a0accbb5532b188a5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/31bd529f5307f65702dbe2a0accbb5532b188a5c/robotparser.py
entry.rulelines.append(RuleLine(line[1], 1))
entry.rulelines.append(RuleLine(line[1], True))
def parse(self, lines): """parse the input lines from a robots.txt file. We allow that a user-agent: line is not preceded by one or more blank lines.""" state = 0 linenumber = 0 entry = Entry()
31bd529f5307f65702dbe2a0accbb5532b188a5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/31bd529f5307f65702dbe2a0accbb5532b188a5c/robotparser.py
"""A rule line is a single "Allow:" (allowance==1) or "Disallow:" (allowance==0) followed by a path."""
"""A rule line is a single "Allow:" (allowance==True) or "Disallow:" (allowance==False) followed by a path."""
def __str__(self): ret = "" for entry in self.entries: ret = ret + str(entry) + "\n" return ret
31bd529f5307f65702dbe2a0accbb5532b188a5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/31bd529f5307f65702dbe2a0accbb5532b188a5c/robotparser.py
allowance = 1
allowance = True
def __init__(self, path, allowance): if path == '' and not allowance: # an empty value means allow all allowance = 1 self.path = urllib.quote(path) self.allowance = allowance
31bd529f5307f65702dbe2a0accbb5532b188a5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/31bd529f5307f65702dbe2a0accbb5532b188a5c/robotparser.py
return 1
return True
def allowance(self, filename): """Preconditions: - our agent applies to this entry - filename is URL decoded""" for line in self.rulelines: _debug((filename, str(line), line.allowance)) if line.applies_to(filename): return line.allowance return 1
31bd529f5307f65702dbe2a0accbb5532b188a5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/31bd529f5307f65702dbe2a0accbb5532b188a5c/robotparser.py
limit = sqrt(n+1)
limit = sqrt(float(n+1))
def fact(n): if n < 1: raise error # fact() argument should be >= 1 if n == 1: return [] # special case res = [] # Treat even factors special, so we can use i = i+2 later while n%2 == 0: res.append(2) n = n/2 # Try odd numbers up to sqrt(n) limit = sqrt(n+1) i = 3 while i <= limit: if n%i == 0: res.append(i) n = n/i li...
3a585bb964483f2892f5a7bfc8e899806a1dc247 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3a585bb964483f2892f5a7bfc8e899806a1dc247/fact.py
res.append(n)
if n != 1: res.append(n)
def fact(n): if n < 1: raise error # fact() argument should be >= 1 if n == 1: return [] # special case res = [] # Treat even factors special, so we can use i = i+2 later while n%2 == 0: res.append(2) n = n/2 # Try odd numbers up to sqrt(n) limit = sqrt(n+1) i = 3 while i <= limit: if n%i == 0: res.append(i) n = n/i li...
3a585bb964483f2892f5a7bfc8e899806a1dc247 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3a585bb964483f2892f5a7bfc8e899806a1dc247/fact.py
if pathname and pathname[0] == '/':
if not pathname: return pathname if pathname[0] == '/':
def convert_path (pathname): """Return 'pathname' as a name that will work on the native filesystem, i.e. split it on '/' and put it back together again using the current directory separator. Needed because filenames in the setup script are always supplied in Unix style, and have to be converted to the local conventio...
b0df6a1afa585c5f4d097aeb68e41996a9fff9d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b0df6a1afa585c5f4d097aeb68e41996a9fff9d7/util.py
if pathname and pathname[-1] == '/':
if pathname[-1] == '/':
def convert_path (pathname): """Return 'pathname' as a name that will work on the native filesystem, i.e. split it on '/' and put it back together again using the current directory separator. Needed because filenames in the setup script are always supplied in Unix style, and have to be converted to the local conventio...
b0df6a1afa585c5f4d097aeb68e41996a9fff9d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b0df6a1afa585c5f4d097aeb68e41996a9fff9d7/util.py
osname = string.lower(osname)
osname = string.lower(osname) osname = string.replace(osname, '/', '')
def get_platform (): """Return a string that identifies the current platform. This is used mainly to distinguish platform-specific build directories and platform-specific built distributions. Typically includes the OS name and version and the architecture (as supplied by 'os.uname()'), although the exact information ...
83c158fdc9d9acb737172a1a365014514afd4fc9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83c158fdc9d9acb737172a1a365014514afd4fc9/util.py
_nmtoken_rx = re.compile("[a-z][-._a-z0-9]*", re.IGNORECASE)
_nmtoken_rx = re.compile("[a-z][-._a-z0-9]*$", re.IGNORECASE)
def format_attrs(attrs, xml=0): attrs = attrs.items() attrs.sort() s = '' for name, value in attrs: if xml: s = '%s %s="%s"' % (s, name, escape(value)) else: # this is a little bogus, but should do for now if name == value and isnmtoken(value): s = "%s %s" % (s, value) elif istoken(value): s = "%s %s=%s" % (s, name, va...
36dfe58694afff02120f89e5a086593716baf1d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/36dfe58694afff02120f89e5a086593716baf1d7/esis2sgml.py
_token_rx = re.compile("[a-z0-9][-._a-z0-9]*", re.IGNORECASE)
_token_rx = re.compile("[a-z0-9][-._a-z0-9]*$", re.IGNORECASE)
def isnmtoken(s): return _nmtoken_rx.match(s) is not None
36dfe58694afff02120f89e5a086593716baf1d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/36dfe58694afff02120f89e5a086593716baf1d7/esis2sgml.py
__version__ = '1.3'
__version__ = '1.4'
def _(s): return s
63ce5af49660181d129aabb9c096cab07807b54b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/63ce5af49660181d129aabb9c096cab07807b54b/pygettext.py
def _(s): return s
63ce5af49660181d129aabb9c096cab07807b54b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/63ce5af49660181d129aabb9c096cab07807b54b/pygettext.py
if self.__options.docstrings:
if opts.docstrings and not opts.nodocstrings.get(self.__curfile):
def __waiting(self, ttype, tstring, lineno): # Do docstring extractions, if enabled if self.__options.docstrings: # module docstring? if self.__freshmodule: if ttype == tokenize.STRING: self.__addentry(safe_eval(tstring), lineno, isdocstring=1) self.__freshmodule = 0 elif ttype not in (tokenize.COMMENT, tokenize.NL): s...
63ce5af49660181d129aabb9c096cab07807b54b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/63ce5af49660181d129aabb9c096cab07807b54b/pygettext.py
if ttype == tokenize.NAME and tstring in self.__options.keywords:
if ttype == tokenize.NAME and tstring in opts.keywords:
def __waiting(self, ttype, tstring, lineno): # Do docstring extractions, if enabled if self.__options.docstrings: # module docstring? if self.__freshmodule: if ttype == tokenize.STRING: self.__addentry(safe_eval(tstring), lineno, isdocstring=1) self.__freshmodule = 0 elif ttype not in (tokenize.COMMENT, tokenize.NL): s...
63ce5af49660181d129aabb9c096cab07807b54b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/63ce5af49660181d129aabb9c096cab07807b54b/pygettext.py
'ad:DEhk:Kno:p:S:Vvw:x:',
'ad:DEhk:Kno:p:S:Vvw:x:X:',
def main(): global default_keywords try: opts, args = getopt.getopt( sys.argv[1:], 'ad:DEhk:Kno:p:S:Vvw:x:', ['extract-all', 'default-domain=', 'escape', 'help', 'keyword=', 'no-default-keywords', 'add-location', 'no-location', 'output=', 'output-dir=', 'style=', 'verbose', 'version', 'width=', 'exclude-file=', 'docstr...
63ce5af49660181d129aabb9c096cab07807b54b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/63ce5af49660181d129aabb9c096cab07807b54b/pygettext.py
'docstrings',
'docstrings', 'no-docstrings',
def main(): global default_keywords try: opts, args = getopt.getopt( sys.argv[1:], 'ad:DEhk:Kno:p:S:Vvw:x:', ['extract-all', 'default-domain=', 'escape', 'help', 'keyword=', 'no-default-keywords', 'add-location', 'no-location', 'output=', 'output-dir=', 'style=', 'verbose', 'version', 'width=', 'exclude-file=', 'docstr...
63ce5af49660181d129aabb9c096cab07807b54b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/63ce5af49660181d129aabb9c096cab07807b54b/pygettext.py
except ImportError:
termios.tcgetattr, termios.tcsetattr except (ImportError, AttributeError):
def getuser(): """Get the username from the environment or password database. First try various environment variables, then the password database. This works on Windows as long as USERNAME is set. """ import os for name in ('LOGNAME', 'USER', 'LNAME', 'USERNAME'): user = os.environ.get(name) if user: return user ...
201626e00f87a514b4891a65f3014bcb49c5dc88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/201626e00f87a514b4891a65f3014bcb49c5dc88/getpass.py
self.assertEqual( posixpath.expanduser("~") + "/", posixpath.expanduser("~/") )
if posixpath.expanduser("~") != '/': self.assertEqual( posixpath.expanduser("~") + "/", posixpath.expanduser("~/") )
def test_expanduser(self): self.assertEqual(posixpath.expanduser("foo"), "foo") try: import pwd except ImportError: pass else: self.assert_(isinstance(posixpath.expanduser("~/"), basestring)) self.assertEqual( posixpath.expanduser("~") + "/", posixpath.expanduser("~/") ) self.assert_(isinstance(posixpath.expanduser("~r...
168e73d25e965888aa307fd74de597a35b660e1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/168e73d25e965888aa307fd74de597a35b660e1b/test_posixpath.py
return st[stat.ST_MTIME]
return st[stat.ST_ATIME]
def getatime(filename): """Return the last access time of a file, reported by os.stat().""" st = os.stat(filename) return st[stat.ST_MTIME]
9811861e3c31f2cb9d04853460408c4fea3d6f1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9811861e3c31f2cb9d04853460408c4fea3d6f1b/posixpath.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...
f3456912e46ba74233e219a94f48e29c85280abc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f3456912e46ba74233e219a94f48e29c85280abc/cwxmlgen.py
stat_function = (os.stat, statcache.stat)[use_statcache] s1, s2 = _sig(stat_function(f1)), _sig(stat_function(f2)) if s1[0]!=stat.S_IFREG or s2[0]!=stat.S_IFREG: return 0 if shallow and s1 == s2: return 1 if s1[1]!=s2[1]: return 0
if use_statcache: stat_function = statcache.stat else: stat_function = os.stat s1 = _sig(stat_function(f1)) s2 = _sig(stat_function(f2)) if s1[0] != stat.S_IFREG or s2[0] != stat.S_IFREG: return 0 if shallow and s1 == s2: return 1 if s1[1] != s2[1]: return 0
def cmp(f1, f2, shallow=1,use_statcache=0): """Compare two files. Arguments: f1 -- First file name f2 -- Second file name shallow -- Just check stat signature (do not read the files). defaults to 1. use_statcache -- Do not stat() each file directly: go through the statcache module for more efficiency. Return valu...
1916b35f5864b2bfe5e2687b7db4fc0c329c9402 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1916b35f5864b2bfe5e2687b7db4fc0c329c9402/filecmp.py
if result and (s1, s2)==result[:2]:
if result and (s1, s2) == result[:2]:
def cmp(f1, f2, shallow=1,use_statcache=0): """Compare two files. Arguments: f1 -- First file name f2 -- Second file name shallow -- Just check stat signature (do not read the files). defaults to 1. use_statcache -- Do not stat() each file directly: go through the statcache module for more efficiency. Return valu...
1916b35f5864b2bfe5e2687b7db4fc0c329c9402 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1916b35f5864b2bfe5e2687b7db4fc0c329c9402/filecmp.py
def loop(timeout=30.0, use_poll=False, map=None):
def loop(timeout=30.0, use_poll=False, map=None, count=None):
def loop(timeout=30.0, use_poll=False, map=None): if map is None: map = socket_map if use_poll and hasattr(select, 'poll'): poll_fun = poll2 else: poll_fun = poll while map: poll_fun(timeout, map)
d5cf14348269f1faf06322a8c159cc50e98e736b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d5cf14348269f1faf06322a8c159cc50e98e736b/asyncore.py
while map: poll_fun(timeout, map)
if count is None: while map: poll_fun(timeout, map) else: while map and count > 0: poll_fun(timeout, map) count = count - 1
def loop(timeout=30.0, use_poll=False, map=None): if map is None: map = socket_map if use_poll and hasattr(select, 'poll'): poll_fun = poll2 else: poll_fun = poll while map: poll_fun(timeout, map)
d5cf14348269f1faf06322a8c159cc50e98e736b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d5cf14348269f1faf06322a8c159cc50e98e736b/asyncore.py
def install_opener(opener): global _opener _opener = opener
0a4a50dd85fb1f9f30ec6e6ff62c71124c52ade6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0a4a50dd85fb1f9f30ec6e6ff62c71124c52ade6/urllib2.py
if not self.stack and not space.match(data):
if not self.stack and space.match(data) is None:
def goahead(self, end): rawdata = self.rawdata i = 0 n = len(rawdata) while i < n: if i > 0: self.__at_start = 0 if self.nomoretags: data = rawdata[i:n] self.handle_data(data) self.lineno = self.lineno + string.count(data, '\n') i = n break res = interesting.search(rawdata, i) if res: j = res.start(0) else: j = n if i ...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py
if not res:
if res is None:
def parse_comment(self, i): rawdata = self.rawdata if rawdata[i:i+4] <> '<!--': raise RuntimeError, 'unexpected call to handle_comment' res = commentclose.search(rawdata, i+4) if not res: return -1 if doubledash.search(rawdata, i+4, res.start(0)): self.syntax_error("`--' inside comment") if rawdata[res.start(0)-1] == '...
eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py