rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
if not os.path.exists (dest): self.execute (os.link, (file, dest), "linking %s -> %s" % (file, dest))
if link: if not os.path.exists (dest): self.execute (os.link, (file, dest), "linking %s -> %s" % (file, dest)) else: self.copy_file (file, dest)
def make_release_tree (self, base_dir, files):
295279b0a41fae4e77cc443c4f7827918bfcba06 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/295279b0a41fae4e77cc443c4f7827918bfcba06/dist.py
("unable to create zip file '%s.zip':" +
("unable to create zip file '%s.zip': " +
def make_zipfile (self, base_dir):
295279b0a41fae4e77cc443c4f7827918bfcba06 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/295279b0a41fae4e77cc443c4f7827918bfcba06/dist.py
def buildapplet(top, dummy, list): """Create python applets""" template = buildtools.findtemplate() for src, dst in list: if src[-3:] != '.py': raise 'Should end in .py', src base = os.path.basename(src) #dst = os.path.join(top, base)[:-3] src = os.path.join(top, src) dst = os.path.join(top, dst) try: os.unlink(dst) ex...
3c23d163ab1b2d840df29822c807dfeaa07fcc9f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3c23d163ab1b2d840df29822c807dfeaa07fcc9f/fullbuild.py
class Konquerer: """Controller for the KDE File Manager (kfm, or Konquerer).
class Konqueror: """Controller for the KDE File Manager (kfm, or Konqueror).
def open_new(self, url): self._remote("openURL(%s, new-window)" % url)
e02b2141ab57f5cdbf02e7a6b55b4eea9e97da84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e02b2141ab57f5cdbf02e7a6b55b4eea9e97da84/webbrowser.py
for more information on the Konquerer remote-control interface.
for more information on the Konqueror remote-control interface.
def open_new(self, url): self._remote("openURL(%s, new-window)" % url)
e02b2141ab57f5cdbf02e7a6b55b4eea9e97da84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e02b2141ab57f5cdbf02e7a6b55b4eea9e97da84/webbrowser.py
register("kfm", Konquerer)
register("kfm", Konqueror)
def open_new(self, url): self._remote("openURL %s" % url)
e02b2141ab57f5cdbf02e7a6b55b4eea9e97da84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e02b2141ab57f5cdbf02e7a6b55b4eea9e97da84/webbrowser.py
self.unixsocket = 1
def __init__(self, address=('localhost', SYSLOG_UDP_PORT), facility=LOG_USER): """ Initialize a handler.
5fdf48b9a69b627138e98658c92a55390a4c30af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5fdf48b9a69b627138e98658c92a55390a4c30af/handlers.py
self.unixsocket = 0
def __init__(self, address=('localhost', SYSLOG_UDP_PORT), facility=LOG_USER): """ Initialize a handler.
5fdf48b9a69b627138e98658c92a55390a4c30af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5fdf48b9a69b627138e98658c92a55390a4c30af/handlers.py
if not os.isatty(slave_fd): raise TestFailed, "slave_fd is not a tty"
def debug(msg): pass
17672c56a052cdccc89073dd74a15562a29d6d6e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/17672c56a052cdccc89073dd74a15562a29d6d6e/test_pty.py
args['compiler_so'] = compiler
(ccshared,) = sysconfig.get_config_vars('CCSHARED') args['compiler_so'] = compiler + ' ' + ccshared
def build_extensions(self):
6f3eef26d04c75653b53d64224391072222b0d07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6f3eef26d04c75653b53d64224391072222b0d07/setup.py
self.temp_files.append(prog)
def _link (self, body, headers, include_dirs, libraries, library_dirs, lang): (src, obj) = self._compile(body, headers, include_dirs, lang) prog = os.path.splitext(os.path.basename(src))[0] self.temp_files.append(prog) # XXX should be prog + exe_ext self.compiler.link_executable([obj], prog, libraries=libraries, lib...
35d55aa44505fc3fe326d00a510c1a6022c363a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/35d55aa44505fc3fe326d00a510c1a6022c363a7/config.py
self.openedurl = '%s:%s' % (type, url)
def open(self, fullurl, data=None): fullurl = unwrap(fullurl) if self.tempcache and self.tempcache.has_key(fullurl): filename, headers = self.tempcache[fullurl] fp = open(filename, 'rb') return addinfourl(fp, headers, fullurl) type, url = splittype(fullurl) if not type: type = 'file' self.openedurl = '%s:%s' % (type, u...
d235b035f3ba4a205107a167f09c5b3e3927e6f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d235b035f3ba4a205107a167f09c5b3e3927e6f5/urllib.py
self.openedurl = url
def retrieve(self, url, filename=None): url = unwrap(url) self.openedurl = url if self.tempcache and self.tempcache.has_key(url): return self.tempcache[url] type, url1 = splittype(url) if not filename and (not type or type == 'file'): try: fp = self.open_local_file(url1) del fp return url2pathname(splithost(url1)[1]), ...
d235b035f3ba4a205107a167f09c5b3e3927e6f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d235b035f3ba4a205107a167f09c5b3e3927e6f5/urllib.py
return addinfourl(fp, headers, self.openedurl)
return addinfourl(fp, headers, "http:" + url)
def open_http(self, url, data=None): import httplib if type(url) is type(""): host, selector = splithost(url) user_passwd, host = splituser(host) realhost = host else: host, selector = url urltype, rest = splittype(selector) user_passwd = None if string.lower(urltype) != 'http': realhost = None else: realhost, rest = s...
d235b035f3ba4a205107a167f09c5b3e3927e6f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d235b035f3ba4a205107a167f09c5b3e3927e6f5/urllib.py
return addinfourl(fp, noheaders(), self.openedurl)
return addinfourl(fp, noheaders(), "gopher:" + url)
def open_gopher(self, url): import gopherlib host, selector = splithost(url) if not host: raise IOError, ('gopher error', 'no host given') type, selector = splitgophertype(selector) selector, query = splitquery(selector) selector = unquote(selector) if query: query = unquote(query) fp = gopherlib.send_query(selector, q...
d235b035f3ba4a205107a167f09c5b3e3927e6f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d235b035f3ba4a205107a167f09c5b3e3927e6f5/urllib.py
ftpwrapper(user, passwd, host, port, dirs)
ftpwrapper(user, passwd, host, port, dirs)
def open_ftp(self, url): host, path = splithost(url) if not host: raise IOError, ('ftp error', 'no host given') host, port = splitport(host) user, host = splituser(host) if user: user, passwd = splitpasswd(user) else: passwd = None host = socket.gethostbyname(host) if not port: import ftplib port = ftplib.FTP_PORT else...
d235b035f3ba4a205107a167f09c5b3e3927e6f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d235b035f3ba4a205107a167f09c5b3e3927e6f5/urllib.py
noheaders(), self.openedurl)
noheaders(), "ftp:" + url)
def open_ftp(self, url): host, path = splithost(url) if not host: raise IOError, ('ftp error', 'no host given') host, port = splitport(host) user, host = splituser(host) if user: user, passwd = splitpasswd(user) else: passwd = None host = socket.gethostbyname(host) if not port: import ftplib port = ftplib.FTP_PORT else...
d235b035f3ba4a205107a167f09c5b3e3927e6f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d235b035f3ba4a205107a167f09c5b3e3927e6f5/urllib.py
return addinfourl(fp, headers, self.openedurl)
return addinfourl(fp, headers, "http:" + url)
def http_error_default(self, url, fp, errcode, errmsg, headers): return addinfourl(fp, headers, self.openedurl)
d235b035f3ba4a205107a167f09c5b3e3927e6f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d235b035f3ba4a205107a167f09c5b3e3927e6f5/urllib.py
log.warn(("warngin: no files found matching '%s' " +
log.warn(("warning: no files found matching '%s' " +
def process_template_line (self, line):
615687d879e8110b4414e99d5fbeb52a96276b9f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/615687d879e8110b4414e99d5fbeb52a96276b9f/filelist.py
self.lineno = self.lineno + string.count(rawdata[i:i], '\n')
self.lineno = self.lineno + string.count(rawdata[i:k], '\n')
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 ...
4ff63fb625144f23bffc0b05ca082a326f91bd4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4ff63fb625144f23bffc0b05ca082a326f91bd4a/xmllib.py
method = self.elements.get(tag, (None, None))[1] if method is not None: self.handle_endtag(tag, method) else: self.unknown_endtag(tag)
def finish_endtag(self, tag): if not tag: self.syntax_error('name-less end tag') found = len(self.stack) - 1 if found < 0: self.unknown_endtag(tag) return else: found = -1 for i in range(len(self.stack)): if tag == self.stack[i][0]: found = i if found == -1: self.syntax_error('unopened end tag') method = self.elements....
4ff63fb625144f23bffc0b05ca082a326f91bd4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4ff63fb625144f23bffc0b05ca082a326f91bd4a/xmllib.py
def maketables():
def maketables(trace=0):
def maketables(): unicode = UnicodeData(UNICODE_DATA) # extract unicode properties dummy = (0, 0, 0, 0) table = [dummy] cache = {0: dummy} index = [0] * len(unicode.chars) # 1) database properties for char in unicode.chars: record = unicode.table[char] if record: # extract database properties category = CATEGORY_NAM...
f70c0d142ca2d51d6b27a5b66866f40595929c59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f70c0d142ca2d51d6b27a5b66866f40595929c59/makeunicodedata.py
index1, index2, shift = splitbins(index)
index1, index2, shift = splitbins(index, trace)
def maketables(): unicode = UnicodeData(UNICODE_DATA) # extract unicode properties dummy = (0, 0, 0, 0) table = [dummy] cache = {0: dummy} index = [0] * len(unicode.chars) # 1) database properties for char in unicode.chars: record = unicode.table[char] if record: # extract database properties category = CATEGORY_NAM...
f70c0d142ca2d51d6b27a5b66866f40595929c59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f70c0d142ca2d51d6b27a5b66866f40595929c59/makeunicodedata.py
index1, index2, shift = splitbins(decomp_index)
index1, index2, shift = splitbins(decomp_index, trace)
def maketables(): unicode = UnicodeData(UNICODE_DATA) # extract unicode properties dummy = (0, 0, 0, 0) table = [dummy] cache = {0: dummy} index = [0] * len(unicode.chars) # 1) database properties for char in unicode.chars: record = unicode.table[char] if record: # extract database properties category = CATEGORY_NAM...
f70c0d142ca2d51d6b27a5b66866f40595929c59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f70c0d142ca2d51d6b27a5b66866f40595929c59/makeunicodedata.py
print len(table), "ctype entries"
def maketables(): unicode = UnicodeData(UNICODE_DATA) # extract unicode properties dummy = (0, 0, 0, 0) table = [dummy] cache = {0: dummy} index = [0] * len(unicode.chars) # 1) database properties for char in unicode.chars: record = unicode.table[char] if record: # extract database properties category = CATEGORY_NAM...
f70c0d142ca2d51d6b27a5b66866f40595929c59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f70c0d142ca2d51d6b27a5b66866f40595929c59/makeunicodedata.py
index1, index2, shift = splitbins(index)
index1, index2, shift = splitbins(index, trace)
def maketables(): unicode = UnicodeData(UNICODE_DATA) # extract unicode properties dummy = (0, 0, 0, 0) table = [dummy] cache = {0: dummy} index = [0] * len(unicode.chars) # 1) database properties for char in unicode.chars: record = unicode.table[char] if record: # extract database properties category = CATEGORY_NAM...
f70c0d142ca2d51d6b27a5b66866f40595929c59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f70c0d142ca2d51d6b27a5b66866f40595929c59/makeunicodedata.py
def __init__(self, filename):
def __init__(self, filename, expand=1):
def __init__(self, filename): file = open(filename) table = [None] * 65536 while 1: s = file.readline() if not s: break s = string.split(string.strip(s), ";") char = string.atoi(s[0], 16) table[char] = s
f70c0d142ca2d51d6b27a5b66866f40595929c59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f70c0d142ca2d51d6b27a5b66866f40595929c59/makeunicodedata.py
If optional arg trace is true (default false), progress info is printed to sys.stderr.
If optional arg trace is non-zero (default zero), progress info is printed to sys.stderr. The higher the value, the more info you'll get.
def splitbins(t, trace=0): """t, trace=0 -> (t1, t2, shift). Split a table to save space. t is a sequence of ints. This function can be useful to save space if many of the ints are the same. t1 and t2 are lists of ints, and shift is an int, chosen to minimize the combined size of t1 and t2 (in C code), and where fo...
f70c0d142ca2d51d6b27a5b66866f40595929c59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f70c0d142ca2d51d6b27a5b66866f40595929c59/makeunicodedata.py
if trace:
if trace > 1:
def dump(t1, t2, shift, bytes): print >>sys.stderr, "%d+%d bins at shift %d; %d bytes" % ( len(t1), len(t2), shift, bytes)
f70c0d142ca2d51d6b27a5b66866f40595929c59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f70c0d142ca2d51d6b27a5b66866f40595929c59/makeunicodedata.py
maketables()
maketables(1)
def dump(t1, t2, shift, bytes): print >>sys.stderr, "%d+%d bins at shift %d; %d bytes" % ( len(t1), len(t2), shift, bytes)
f70c0d142ca2d51d6b27a5b66866f40595929c59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f70c0d142ca2d51d6b27a5b66866f40595929c59/makeunicodedata.py
elif sys.platform[:5] == "hp-ux":
elif sys.platform[:5] == "hp-ux":
def runtime_library_dir_option(self, dir): # XXX Hackish, at the very least. See Python bug #445902: # http://sourceforge.net/tracker/index.php # ?func=detail&aid=445902&group_id=5470&atid=105470 # Linkers on different platforms need different options to # specify that directories need to be added to the list of # d...
7224f31027a87b615b0f8452134f745d64259381 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7224f31027a87b615b0f8452134f745d64259381/unixccompiler.py
elif compiler[:3] == "gcc" or compiler[:3] == "g++":
elif compiler[:3] == "gcc" or compiler[:3] == "g++":
def runtime_library_dir_option(self, dir): # XXX Hackish, at the very least. See Python bug #445902: # http://sourceforge.net/tracker/index.php # ?func=detail&aid=445902&group_id=5470&atid=105470 # Linkers on different platforms need different options to # specify that directories need to be added to the list of # d...
7224f31027a87b615b0f8452134f745d64259381 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7224f31027a87b615b0f8452134f745d64259381/unixccompiler.py
gen.startElementNS((ns_uri, "doc"), "ns:doc", {}) gen.endElementNS((ns_uri, "doc"), "ns:doc")
gen.startElementNS((ns_uri, "doc"), "ns1:doc", {}) gen.endElementNS((ns_uri, "doc"), "ns1:doc")
def test_xmlgen_ns(): result = StringIO() gen = XMLGenerator(result) gen.startDocument() gen.startPrefixMapping("ns1", ns_uri) gen.startElementNS((ns_uri, "doc"), "ns:doc", {}) gen.endElementNS((ns_uri, "doc"), "ns:doc") gen.endPrefixMapping("ns1") gen.endDocument() return result.getvalue() == start + ('<ns1:doc xmln...
638b4bde45f9fa549eaa74f4f76f143beb655065 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/638b4bde45f9fa549eaa74f4f76f143beb655065/test_sax.py
content = open(filename).read()
content = open(filename,'rb').read()
def upload_file(self, command, pyversion, filename): # Sign if requested if self.sign: spawn(("gpg", "--detach-sign", "-a", filename), dry_run=self.dry_run)
3e45ebe1bf2afd549df81ef0022eeb45b6844d98 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3e45ebe1bf2afd549df81ef0022eeb45b6844d98/upload.py
The QUESTION strign ca be at most 255 characters.
The QUESTION string can be at most 255 characters.
def AskYesNoCancel(question, default = 0, yes=None, no=None, cancel=None, id=262): """Display a QUESTION string which can be answered with Yes or No. Return 1 when the user clicks the Yes button. Return 0 when the user clicks the No button. Return -1 when the user clicks the Cancel button. When the user presses Retur...
405955499eea21b34d0bc76a18d405ad210bf150 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/405955499eea21b34d0bc76a18d405ad210bf150/EasyDialogs.py
if os.name == "posix" and os.path.basename(sys.path[-1]) == "Modules":
if (os.name == "posix" and sys.path and os.path.basename(sys.path[-1]) == "Modules"):
def makepath(*paths): dir = os.path.abspath(os.path.join(*paths)) return dir, os.path.normcase(dir)
e63aede965557b39e6e5d68d3e3ba3dd5cf7afba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e63aede965557b39e6e5d68d3e3ba3dd5cf7afba/site.py
def shared_object_filename (self, source_filename): """Return the shared object filename corresponding to a specified source filename.""" return self._change_extensions( source_filenames, self._shared_lib_ext )
8dbd7fc1610d7509e0ca462d411ff9091ae2f737 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8dbd7fc1610d7509e0ca462d411ff9091ae2f737/msvccompiler.py
return "lib%s%s" %( libname, self._static_lib_ext )
return "%s%s" %( libname, self._static_lib_ext )
def library_filename (self, libname): """Return the static library filename corresponding to the specified library name.""" return "lib%s%s" %( libname, self._static_lib_ext )
8dbd7fc1610d7509e0ca462d411ff9091ae2f737 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8dbd7fc1610d7509e0ca462d411ff9091ae2f737/msvccompiler.py
return "lib%s%s" %( libname, self._shared_lib_ext )
return "%s%s" %( libname, self._shared_lib_ext )
def shared_library_filename (self, libname): """Return the shared library filename corresponding to the specified library name.""" return "lib%s%s" %( libname, self._shared_lib_ext )
8dbd7fc1610d7509e0ca462d411ff9091ae2f737 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8dbd7fc1610d7509e0ca462d411ff9091ae2f737/msvccompiler.py
check_syntax("def f(): global time; import ")
check_syntax("def f(): global time; import ")
71196b618582b4109b85ab015e5d905d528d83c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/71196b618582b4109b85ab015e5d905d528d83c8/test_grammar.py
time.tzname = ("PDT", "PDT")
time.tzname = (tz_name, tz_name)
def test_bad_timezone(self): # Explicitly test possibility of bad timezone; # when time.tzname[0] == time.tzname[1] and time.daylight if sys.platform == "mac": return #MacOS9 has severely broken timezone support. try: original_tzname = time.tzname original_daylight = time.daylight time.tzname = ("PDT", "PDT") time.dayl...
73cb9cf18ef43f0249d6cf8e9a816681aea3a7c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/73cb9cf18ef43f0249d6cf8e9a816681aea3a7c8/test_strptime.py
tz_value = _strptime.strptime("PDT", "%Z")[8]
tz_value = _strptime.strptime(tz_name, "%Z")[8]
def test_bad_timezone(self): # Explicitly test possibility of bad timezone; # when time.tzname[0] == time.tzname[1] and time.daylight if sys.platform == "mac": return #MacOS9 has severely broken timezone support. try: original_tzname = time.tzname original_daylight = time.daylight time.tzname = ("PDT", "PDT") time.dayl...
73cb9cf18ef43f0249d6cf8e9a816681aea3a7c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/73cb9cf18ef43f0249d6cf8e9a816681aea3a7c8/test_strptime.py
if os.environ.get('TERM') in ('dumb', 'emacs'): return plainpager
def getpager(): """Decide what method to use for paging through text.""" if type(sys.stdout) is not types.FileType: return plainpager if not sys.stdin.isatty() or not sys.stdout.isatty(): return plainpager if os.environ.get('TERM') in ('dumb', 'emacs'): return plainpager if 'PAGER' in os.environ: if sys.platform == 'wi...
4cededd55506ce3f67f08d026671725e0fcb101a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4cededd55506ce3f67f08d026671725e0fcb101a/pydoc.py
def __init__(self, completekey='tab'):
def __init__(self, completekey='tab', stdin=None, stdout=None):
def __init__(self, completekey='tab'): """Instantiate a line-oriented interpreter framework.
5cfb0c082eb272eba0c1782c2d88426ad04a99e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5cfb0c082eb272eba0c1782c2d88426ad04a99e0/cmd.py
The optional argument is the readline name of a completion key; it defaults to the Tab key. If completekey is not None and the readline module is available, command completion is done automatically. """
The optional argument 'completekey' is the readline name of a completion key; it defaults to the Tab key. If completekey is not None and the readline module is available, command completion is done automatically. The optional arguments stdin and stdout specify alternate input and output file objects; if not specified, ...
def __init__(self, completekey='tab'): """Instantiate a line-oriented interpreter framework.
5cfb0c082eb272eba0c1782c2d88426ad04a99e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5cfb0c082eb272eba0c1782c2d88426ad04a99e0/cmd.py
print self.intro
self.stdout.write(str(self.intro)+"\n")
def cmdloop(self, intro=None): """Repeatedly issue a prompt, accept input, parse an initial prefix off the received input, and dispatch to action methods, passing them the remainder of the line as argument.
5cfb0c082eb272eba0c1782c2d88426ad04a99e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5cfb0c082eb272eba0c1782c2d88426ad04a99e0/cmd.py
sys.stdout.write(self.prompt) sys.stdout.flush() line = sys.stdin.readline()
self.stdout.write(self.prompt) self.stdout.flush() line = self.stdin.readline()
def cmdloop(self, intro=None): """Repeatedly issue a prompt, accept input, parse an initial prefix off the received input, and dispatch to action methods, passing them the remainder of the line as argument.
5cfb0c082eb272eba0c1782c2d88426ad04a99e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5cfb0c082eb272eba0c1782c2d88426ad04a99e0/cmd.py
print '*** Unknown syntax:', line
self.stdout.write('*** Unknown syntax: %s\n'%line)
def default(self, line): """Called on an input line when the command prefix is not recognized.
5cfb0c082eb272eba0c1782c2d88426ad04a99e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5cfb0c082eb272eba0c1782c2d88426ad04a99e0/cmd.py
print doc
self.stdout.write("%s\n"%str(doc))
def do_help(self, arg): if arg: # XXX check arg syntax try: func = getattr(self, 'help_' + arg) except AttributeError: try: doc=getattr(self, 'do_' + arg).__doc__ if doc: print doc return except AttributeError: pass print self.nohelp % (arg,) return func() else: names = self.get_names() cmds_doc = [] cmds_undoc = [] he...
5cfb0c082eb272eba0c1782c2d88426ad04a99e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5cfb0c082eb272eba0c1782c2d88426ad04a99e0/cmd.py
print self.nohelp % (arg,)
self.stdout.write("%s\n"%str(self.nohelp % (arg,)))
def do_help(self, arg): if arg: # XXX check arg syntax try: func = getattr(self, 'help_' + arg) except AttributeError: try: doc=getattr(self, 'do_' + arg).__doc__ if doc: print doc return except AttributeError: pass print self.nohelp % (arg,) return func() else: names = self.get_names() cmds_doc = [] cmds_undoc = [] he...
5cfb0c082eb272eba0c1782c2d88426ad04a99e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5cfb0c082eb272eba0c1782c2d88426ad04a99e0/cmd.py
print self.doc_leader
self.stdout.write("%s\n"%str(self.doc_leader))
def do_help(self, arg): if arg: # XXX check arg syntax try: func = getattr(self, 'help_' + arg) except AttributeError: try: doc=getattr(self, 'do_' + arg).__doc__ if doc: print doc return except AttributeError: pass print self.nohelp % (arg,) return func() else: names = self.get_names() cmds_doc = [] cmds_undoc = [] he...
5cfb0c082eb272eba0c1782c2d88426ad04a99e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5cfb0c082eb272eba0c1782c2d88426ad04a99e0/cmd.py
print header
self.stdout.write("%s\n"%str(header))
def print_topics(self, header, cmds, cmdlen, maxcol): if cmds: print header if self.ruler: print self.ruler * len(header) self.columnize(cmds, maxcol-1) print
5cfb0c082eb272eba0c1782c2d88426ad04a99e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5cfb0c082eb272eba0c1782c2d88426ad04a99e0/cmd.py
print self.ruler * len(header)
self.stdout.write("%s\n"%str(self.ruler * len(header)))
def print_topics(self, header, cmds, cmdlen, maxcol): if cmds: print header if self.ruler: print self.ruler * len(header) self.columnize(cmds, maxcol-1) print
5cfb0c082eb272eba0c1782c2d88426ad04a99e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5cfb0c082eb272eba0c1782c2d88426ad04a99e0/cmd.py
print
self.stdout.write("\n")
def print_topics(self, header, cmds, cmdlen, maxcol): if cmds: print header if self.ruler: print self.ruler * len(header) self.columnize(cmds, maxcol-1) print
5cfb0c082eb272eba0c1782c2d88426ad04a99e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5cfb0c082eb272eba0c1782c2d88426ad04a99e0/cmd.py
print "<empty>"
self.stdout.write("<empty>\n")
def columnize(self, list, displaywidth=80): """Display a list of strings as a compact set of columns.
5cfb0c082eb272eba0c1782c2d88426ad04a99e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5cfb0c082eb272eba0c1782c2d88426ad04a99e0/cmd.py
print list[0]
self.stdout.write('%s\n'%str(list[0]))
def columnize(self, list, displaywidth=80): """Display a list of strings as a compact set of columns.
5cfb0c082eb272eba0c1782c2d88426ad04a99e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5cfb0c082eb272eba0c1782c2d88426ad04a99e0/cmd.py
print " ".join(texts)
self.stdout.write("%s\n"%str(" ".join(texts)))
def columnize(self, list, displaywidth=80): """Display a list of strings as a compact set of columns.
5cfb0c082eb272eba0c1782c2d88426ad04a99e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5cfb0c082eb272eba0c1782c2d88426ad04a99e0/cmd.py
def search_function(encoding): # Cache lookup entry = _cache.get(encoding,_unknown) if entry is not _unknown: return entry # Import the module modname = encoding.replace('-', '_') modname = aliases.aliases.get(modname,modname) try: mod = __import__(modname,globals(),locals(),'*') except ImportError,why: _cache[encodi...
317c8803ab350aa0393542d622f6f31a09110230 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/317c8803ab350aa0393542d622f6f31a09110230/__init__.py
_cache[alias] = entry
if not aliases.aliases.has_key(alias): aliases.aliases[alias] = modname
def search_function(encoding): # Cache lookup entry = _cache.get(encoding,_unknown) if entry is not _unknown: return entry # Import the module modname = encoding.replace('-', '_') modname = aliases.aliases.get(modname,modname) try: mod = __import__(modname,globals(),locals(),'*') except ImportError,why: _cache[encodi...
317c8803ab350aa0393542d622f6f31a09110230 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/317c8803ab350aa0393542d622f6f31a09110230/__init__.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 = {}
edb1ba0d80cc59bbc7f2b07f4cecdc5ecfc43f6d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/edb1ba0d80cc59bbc7f2b07f4cecdc5ecfc43f6d/urllib2.py
h.putheader(*args)
if name not in req.headers: h.putheader(*args)
def do_open(self, http_class, req): host = req.get_host() if not host: raise URLError('no host given')
edb1ba0d80cc59bbc7f2b07f4cecdc5ecfc43f6d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/edb1ba0d80cc59bbc7f2b07f4cecdc5ecfc43f6d/urllib2.py
self.__buf = self.__buf + \ (chr(int(x>>24 & 0xff)) + chr(int(x>>16 & 0xff)) + \ chr(int(x>>8 & 0xff)) + chr(int(x & 0xff))) if _USE_MACHINE_REP: def pack_uint(self, x): if type(x) == LongType: x = int((x + 0x80000000L) % 0x100000000L - 0x80000000L) self.__buf = self.__buf + struct.pack('l', x)
self.__buf = self.__buf + struct.pack('>L', x)
def pack_uint(self, x):
2872566e68635b18cf8277829ca192eaee5921be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2872566e68635b18cf8277829ca192eaee5921be/xdrlib.py
raise ConversionError('Not supported')
try: self.__buf = self.__buf + struct.pack('>f', x) except struct.error, msg: raise ConversionError(msg)
def pack_float(self, x):
2872566e68635b18cf8277829ca192eaee5921be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2872566e68635b18cf8277829ca192eaee5921be/xdrlib.py
raise ConversionError('Not supported') if _xdr: def pack_float(self, x): try: self.__buf = self.__buf + _xdr.pack_float(x) except _xdr.error, msg: raise ConversionError(msg) def pack_double(self, x): try: self.__buf = self.__buf + _xdr.pack_double(x) except _xdr.error, msg: raise ConversionError(msg)
try: self.__buf = self.__buf + struct.pack('>d', x) except struct.error, msg: raise ConversionError(msg)
def pack_double(self, x):
2872566e68635b18cf8277829ca192eaee5921be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2872566e68635b18cf8277829ca192eaee5921be/xdrlib.py
x = long(ord(data[0]))<<24 | ord(data[1])<<16 | \ ord(data[2])<<8 | ord(data[3]) if x < 0x80000000L: x = int(x) return x if _USE_MACHINE_REP: def unpack_uint(self): i = self.__pos self.__pos = j = i+4 data = self.__buf[i:j] if len(data) < 4: raise EOFError return struct.unpack('l', data)[0]
x = struct.unpack('>L', data)[0] try: return int(x) except OverflowError: return x
def unpack_uint(self):
2872566e68635b18cf8277829ca192eaee5921be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2872566e68635b18cf8277829ca192eaee5921be/xdrlib.py
x = self.unpack_uint() if x >= 0x80000000L: x = x - 0x100000000L return int(x)
i = self.__pos self.__pos = j = i+4 data = self.__buf[i:j] if len(data) < 4: raise EOFError return struct.unpack('>l', data)[0]
def unpack_int(self):
2872566e68635b18cf8277829ca192eaee5921be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2872566e68635b18cf8277829ca192eaee5921be/xdrlib.py
raise ConversionError('Not supported')
i = self.__pos self.__pos = j = i+4 data = self.__buf[i:j] if len(data) < 4: raise EOFError return struct.unpack('>f', data)[0]
def unpack_float(self):
2872566e68635b18cf8277829ca192eaee5921be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2872566e68635b18cf8277829ca192eaee5921be/xdrlib.py
raise ConversionError('Not supported') if _xdr: def unpack_float(self): i = self.__pos self.__pos = j = i+4 data = self.__buf[i:j] if len(data) < 4: raise EOFError try: return _xdr.unpack_float(data) except _xdr.error, msg: raise ConversionError(msg) def unpack_double(self): i = self.__pos self.__pos = j = i+8 data =...
i = self.__pos self.__pos = j = i+8 data = self.__buf[i:j] if len(data) < 8: raise EOFError return struct.unpack('>d', data)[0]
def unpack_double(self):
2872566e68635b18cf8277829ca192eaee5921be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2872566e68635b18cf8277829ca192eaee5921be/xdrlib.py
def testboth(formatstr, *args): testformat(formatstr, *args) if have_unicode: testformat(unicode(formatstr), *args)
5910653d2ed56d64ff29162ef905344317163ef5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5910653d2ed56d64ff29162ef905344317163ef5/test_format.py
def testboth(formatstr, *args): testformat(formatstr, *args) if have_unicode: testformat(unicode(formatstr), *args)
5910653d2ed56d64ff29162ef905344317163ef5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5910653d2ed56d64ff29162ef905344317163ef5/test_format.py
n[i] = n[i].split(os.sep) if os.altsep and len(n[i]) == 1: n[i] = n[i].split(os.altsep)
n[i] = n[i].split("/")
def commonprefix(m): "Given a list of pathnames, returns the longest common leading component" if not m: return '' n = m[:] for i in range(len(n)): n[i] = n[i].split(os.sep) # if os.sep didn't have any effect, try os.altsep if os.altsep and len(n[i]) == 1: n[i] = n[i].split(os.altsep) prefix = n[0] for item in n: for ...
32a917b45870b1ac7b5158870d1464f9a2994533 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/32a917b45870b1ac7b5158870d1464f9a2994533/posixpath.py
return os.sep.join(prefix)
return "/".join(prefix)
def commonprefix(m): "Given a list of pathnames, returns the longest common leading component" if not m: return '' n = m[:] for i in range(len(n)): n[i] = n[i].split(os.sep) # if os.sep didn't have any effect, try os.altsep if os.altsep and len(n[i]) == 1: n[i] = n[i].split(os.altsep) prefix = n[0] for item in n: for ...
32a917b45870b1ac7b5158870d1464f9a2994533 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/32a917b45870b1ac7b5158870d1464f9a2994533/posixpath.py
elif usage.startswith("usage: "):
elif usage.lower().startswith("usage: "):
def set_usage (self, usage): if usage is None: self.usage = "%prog [options]" elif usage is SUPPRESS_USAGE: self.usage = None elif usage.startswith("usage: "): # for backwards compatibility with Optik 1.3 and earlier self.usage = usage[7:] else: self.usage = usage
8bfcc472a239359744909bb242eeb8f10c680917 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8bfcc472a239359744909bb242eeb8f10c680917/optparse.py
data = convert_path(f[1])
data = convert_path(data)
def run (self): self.mkpath(self.install_dir) for f in self.data_files: if type(f) == StringType: # it's a simple file, so copy it f = convert_path(f) if self.warn_dir: self.warn("setup script did not provide a directory for " "'%s' -- installing right in '%s'" % (f, self.install_dir)) (out, _) = self.copy_file(f, self...
c2679318d21980573d4b82d2ce90df890e2767e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c2679318d21980573d4b82d2ce90df890e2767e4/install_data.py
filename = words[-1] infostuff = words[-5:-1]
filename = string.join(words[8:]) infostuff = words[5:]
def mirrorsubdir(f, localdir): pwd = f.pwd() if localdir and not os.path.isdir(localdir): if verbose: print 'Creating local directory', localdir try: makedir(localdir) except os.error, msg: print "Failed to establish local directory", localdir return infofilename = os.path.join(localdir, '.mirrorinfo') try: text = open...
b14f39a09df1d0e0a2bc906153e21625ee610c83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b14f39a09df1d0e0a2bc906153e21625ee610c83/ftpmirror.py
del _active[_get_ident()]
if _sys.modules.has_key('dummy_threading'): try: del _active[_get_ident()] except KeyError: pass else: del _active[_get_ident()]
def __delete(self): _active_limbo_lock.acquire() del _active[_get_ident()] _active_limbo_lock.release()
af5950f0a4c93d272979064de4989be5532c8022 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/af5950f0a4c93d272979064de4989be5532c8022/threading.py
'Library', 'Python', sys.version[:3], 'site-packages')
'Library', 'Python', sys.version[:3], 'site-packages')
def _init(): import macresource import sys, os macresource.need('DITL', 468, "PythonIDE.rsrc") widgetrespathsegs = [sys.exec_prefix, "Mac", "Tools", "IDE", "Widgets.rsrc"] widgetresfile = os.path.join(*widgetrespathsegs) if not os.path.exists(widgetresfile): widgetrespathsegs = [os.pardir, "Tools", "IDE", "Widgets.rsrc...
d0421802b28eb8d1cf616b78a4ea48a02fa6fa17 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d0421802b28eb8d1cf616b78a4ea48a02fa6fa17/PackageManager.py
rv = 0
rv = 0
def _quit(self):
d0421802b28eb8d1cf616b78a4ea48a02fa6fa17 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d0421802b28eb8d1cf616b78a4ea48a02fa6fa17/PackageManager.py
self.packages = self.pimpdb.list()
packages = self.pimpdb.list() if show_hidden: self.packages = packages else: self.packages = [] for pkg in packages: name = pkg.fullname() if name[0] == '(' and name[-1] == ')' and not show_hidden: continue self.packages.append(pkg)
def getbrowserdata(self, show_hidden=1): self.packages = self.pimpdb.list() rv = [] for pkg in self.packages: name = pkg.fullname() if name[0] == '(' and name[-1] == ')' and not show_hidden: continue status, _ = pkg.installed() description = pkg.description() rv.append((status, name, description)) return rv
d0421802b28eb8d1cf616b78a4ea48a02fa6fa17 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d0421802b28eb8d1cf616b78a4ea48a02fa6fa17/PackageManager.py
if name[0] == '(' and name[-1] == ')' and not show_hidden: continue
def getbrowserdata(self, show_hidden=1): self.packages = self.pimpdb.list() rv = [] for pkg in self.packages: name = pkg.fullname() if name[0] == '(' and name[-1] == ')' and not show_hidden: continue status, _ = pkg.installed() description = pkg.description() rv.append((status, name, description)) return rv
d0421802b28eb8d1cf616b78a4ea48a02fa6fa17 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d0421802b28eb8d1cf616b78a4ea48a02fa6fa17/PackageManager.py
result = f % val fields = string.split(result, ".")
result = f % abs(val) fields = result.split(".")
def format(f,val,grouping=0): """Formats a value in the same way that the % formatting would use, but takes the current locale into account. Grouping is applied if the third parameter is true.""" result = f % val fields = string.split(result, ".") if grouping: fields[0]=_group(fields[0]) if len(fields)==2: return field...
0d4d81590f82ee1ba817c28f0a091353a2e69b59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0d4d81590f82ee1ba817c28f0a091353a2e69b59/locale.py
return fields[0]+localeconv()['decimal_point']+fields[1]
res = fields[0]+localeconv()['decimal_point']+fields[1]
def format(f,val,grouping=0): """Formats a value in the same way that the % formatting would use, but takes the current locale into account. Grouping is applied if the third parameter is true.""" result = f % val fields = string.split(result, ".") if grouping: fields[0]=_group(fields[0]) if len(fields)==2: return field...
0d4d81590f82ee1ba817c28f0a091353a2e69b59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0d4d81590f82ee1ba817c28f0a091353a2e69b59/locale.py
return fields[0]
res = fields[0]
def format(f,val,grouping=0): """Formats a value in the same way that the % formatting would use, but takes the current locale into account. Grouping is applied if the third parameter is true.""" result = f % val fields = string.split(result, ".") if grouping: fields[0]=_group(fields[0]) if len(fields)==2: return field...
0d4d81590f82ee1ba817c28f0a091353a2e69b59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0d4d81590f82ee1ba817c28f0a091353a2e69b59/locale.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...
bb8f94c6f346fecdf3230a57d410b799ddf05642 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bb8f94c6f346fecdf3230a57d410b799ddf05642/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
bb8f94c6f346fecdf3230a57d410b799ddf05642 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bb8f94c6f346fecdf3230a57d410b799ddf05642/esis2sgml.py
output_dir=None):
output_dir=None, debug=0):
def link_static_lib (self, objects, output_libname, output_dir=None):
1a1611dd2a217ae6813b1293cb7f52a70463ba56 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1a1611dd2a217ae6813b1293cb7f52a70463ba56/unixccompiler.py
['response', ['mesg_num octets', ...]].
['response', ['mesg_num octets', ...], octets].
def list(self, which=None): """Request listing, return result.
2b315792cca6fea1ab84344227f59d2bb272647e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2b315792cca6fea1ab84344227f59d2bb272647e/poplib.py
frozendllmain_c, extensions_c] + files
frozendllmain_c, os.path.basename(extensions_c)] + files
def main(): # overridable context prefix = None # settable with -p option exec_prefix = None # settable with -P option extensions = [] exclude = [] # settable with -x option addn_link = [] # settable with -l, but only honored under Windows. path = sys.p...
94f9614360fc8ebe4364718f3af599c648d629f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/94f9614360fc8ebe4364718f3af599c648d629f7/freeze.py
if s[0] in ('-', '+'):
if s[:1] in ('-', '+'):
def zfill(x, width): """zfill(x, width) -> string Pad a numeric string x with zeros on the left, to fill a field of the specified width. The string x is never truncated. """ if type(x) == type(''): s = x else: s = `x` n = len(s) if n >= width: return s sign = '' if s[0] in ('-', '+'): sign, s = s[0], s[1:] return si...
c9bd845ea6af67fca6027db65a3b5e44322d616c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c9bd845ea6af67fca6027db65a3b5e44322d616c/string.py
elif sys.platform.startswith("netbsd"):
elif sys.platform.startswith("netbsd") or sys.platform.startswith("openbsd"):
def test_load(self): if os.name == "nt": name = "msvcrt" elif os.name == "ce": name = "coredll" elif sys.platform == "darwin": name = "libc.dylib" elif sys.platform.startswith("freebsd"): name = "libc.so" elif sys.platform == "sunos5": name = "libc.so" elif sys.platform.startswith("netbsd"): name = "libc.so" else: name...
65f353dd849c255b0e0b60b9d69ec330df1182ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/65f353dd849c255b0e0b60b9d69ec330df1182ec/test_loading.py
If the population has repeated elements, then each occurence is
If the population has repeated elements, then each occurrence is
def sample(self, population, k, random=None, int=int): """Chooses k unique random elements from a population sequence.
6f68c25d5262d7494b811f26217f67f8c4d621c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6f68c25d5262d7494b811f26217f67f8c4d621c3/random.py
if os.name == 'mac': def getproxies():
if sys.platform == 'darwin': def getproxies_internetconfig():
def getproxies_environment(): """Return a dictionary of scheme -> proxy server URL mappings. Scan the environment for variables named <scheme>_proxy; this seems to be the standard convention. If you need a different way, you can pass a proxies dictionary to the [Fancy]URLopener constructor. """ proxies = {} for name...
79fa06313b55f6f7edeeccd22bad17eec6fc2e1e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/79fa06313b55f6f7edeeccd22bad17eec6fc2e1e/urllib.py
def translate(self, table, deletechars=""): return self.__class__(self.data.translate(table, deletechars))
def translate(self, *args): return self.__class__(self.data.translate(*args))
def translate(self, table, deletechars=""): return self.__class__(self.data.translate(table, deletechars))
3b9d868dca7ac679ae8c3812a9a5450c94e22b66 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3b9d868dca7ac679ae8c3812a9a5450c94e22b66/UserString.py
if re.match(e[1], result): continue
if re.match(escapestr(e[1], ampm), result): continue
def strftest(now): if verbose: print "strftime test for", time.ctime(now) nowsecs = str(long(now))[:-1] gmt = time.gmtime(now) now = time.localtime(now) if now[3] < 12: ampm='(AM|am)' else: ampm='(PM|pm)' jan1 = time.localtime(time.mktime((now[0], 1, 1, 0, 0, 0, 0, 1, 0))) try: if now[8]: tz = time.tzname[1] else: t...
14862d75c75ae24480c1ab96017a87014f7c45c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/14862d75c75ae24480c1ab96017a87014f7c45c4/test_strftime.py
if re.match(e[1], result):
if re.match(escapestr(e[1], ampm), result):
def strftest(now): if verbose: print "strftime test for", time.ctime(now) nowsecs = str(long(now))[:-1] gmt = time.gmtime(now) now = time.localtime(now) if now[3] < 12: ampm='(AM|am)' else: ampm='(PM|pm)' jan1 = time.localtime(time.mktime((now[0], 1, 1, 0, 0, 0, 0, 1, 0))) try: if now[8]: tz = time.tzname[1] else: t...
14862d75c75ae24480c1ab96017a87014f7c45c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/14862d75c75ae24480c1ab96017a87014f7c45c4/test_strftime.py
directory already exists, return silently. Raise DistutilsFileError if unable to create some directory along the way (eg. some sub-path exists, but is a file rather than a directory). If 'verbose' is true, print a one-line summary of each mkdir to stdout."""
directory already exists (or if 'name' is the empty string, which means the current directory, which of course exists), then do nothing. Raise DistutilsFileError if unable to create some directory along the way (eg. some sub-path exists, but is a file rather than a directory). If 'verbose' is true, print a one-line s...
def mkpath (name, mode=0777, verbose=0, dry_run=0): """Create a directory and any missing ancestor directories. If the directory already exists, return silently. Raise DistutilsFileError if unable to create some directory along the way (eg. some sub-path exists, but is a file rather than a directory). If 'verbose' i...
870a5dc523dc3eec775d824b702988101d6a75bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/870a5dc523dc3eec775d824b702988101d6a75bc/util.py
except os.error, (errno, errstr):
except OSError, exc:
def mkpath (name, mode=0777, verbose=0, dry_run=0): """Create a directory and any missing ancestor directories. If the directory already exists, return silently. Raise DistutilsFileError if unable to create some directory along the way (eg. some sub-path exists, but is a file rather than a directory). If 'verbose' i...
870a5dc523dc3eec775d824b702988101d6a75bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/870a5dc523dc3eec775d824b702988101d6a75bc/util.py
"could not create '%s': %s" % (head, errstr)
"could not create '%s': %s" % (head, exc[-1])
def mkpath (name, mode=0777, verbose=0, dry_run=0): """Create a directory and any missing ancestor directories. If the directory already exists, return silently. Raise DistutilsFileError if unable to create some directory along the way (eg. some sub-path exists, but is a file rather than a directory). If 'verbose' i...
870a5dc523dc3eec775d824b702988101d6a75bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/870a5dc523dc3eec775d824b702988101d6a75bc/util.py
archive_basename = "%s.win32" % self.distribution.get_fullname()
fullname = self.distribution.get_fullname() archive_basename = os.path.join(self.bdist_dir, "%s.win32" % fullname)
def run (self):
d632280482e5e5e66cebc993062f0fd1e60755b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d632280482e5e5e66cebc993062f0fd1e60755b5/bdist_wininst.py
self.create_exe (arcname)
self.create_exe (arcname, fullname)
def run (self):
d632280482e5e5e66cebc993062f0fd1e60755b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d632280482e5e5e66cebc993062f0fd1e60755b5/bdist_wininst.py