rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
_platform_cache = platform
_platform_cache[bool(terse)] = platform
def platform(aliased=0, terse=0): """ Returns a single string identifying the underlying platform with as much useful information as possible (but no more :). The output is intended to be human readable rather than machine parseable. It may look different on different platforms and this is intended. If "aliased" is ...
21beb4c2ceb5238a6a3ab83156db55f678ed01ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/21beb4c2ceb5238a6a3ab83156db55f678ed01ec/platform.py
e.append(fd) if obj.readable():
is_r = obj.readable() is_w = obj.writable() if is_r:
def poll(timeout=0.0, map=None): if map is None: map = socket_map if map: r = []; w = []; e = [] for fd, obj in map.items(): e.append(fd) if obj.readable(): r.append(fd) if obj.writable(): w.append(fd) if [] == r == w == e: time.sleep(timeout) else: try: r, w, e = select.select(r, w, e, timeout) except select.error, er...
e47c381c62091d5d8583438b70632eecb96ad29e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e47c381c62091d5d8583438b70632eecb96ad29e/asyncore.py
if obj.writable():
if is_w:
def poll(timeout=0.0, map=None): if map is None: map = socket_map if map: r = []; w = []; e = [] for fd, obj in map.items(): e.append(fd) if obj.readable(): r.append(fd) if obj.writable(): w.append(fd) if [] == r == w == e: time.sleep(timeout) else: try: r, w, e = select.select(r, w, e, timeout) except select.error, er...
e47c381c62091d5d8583438b70632eecb96ad29e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e47c381c62091d5d8583438b70632eecb96ad29e/asyncore.py
flags = select.POLLERR | select.POLLHUP | select.POLLNVAL
flags = 0
def poll2(timeout=0.0, map=None): # Use the poll() support added to the select module in Python 2.0 if map is None: map = socket_map if timeout is not None: # timeout is in milliseconds timeout = int(timeout*1000) pollster = select.poll() if map: for fd, obj in map.items(): flags = select.POLLERR | select.POLLHUP | sel...
e47c381c62091d5d8583438b70632eecb96ad29e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e47c381c62091d5d8583438b70632eecb96ad29e/asyncore.py
1 <= len(macros) <= 2):
1 <= len(macro) <= 2):
def check_extensions_list (self, extensions): """Ensure that the list of extensions (presumably provided as a command option 'extensions') is valid, i.e. it is a list of Extension objects. We also support the old-style list of 2-tuples, where the tuples are (ext_name, build_info), which are converted to Extension inst...
53c1bc3f9bf4d83f01e5dc8c228379ae525a2cbb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/53c1bc3f9bf4d83f01e5dc8c228379ae525a2cbb/build_ext.py
if value < 0: value = value + 0x100000000L
def write32u(output, value): if value < 0: value = value + 0x100000000L output.write(struct.pack("<L", value))
fb0ea525d528153838586bf8ece15a45bbf5ddf3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fb0ea525d528153838586bf8ece15a45bbf5ddf3/gzip.py
xlen=ord(self.fileobj.read(1)) xlen=xlen+256*ord(self.fileobj.read(1))
xlen = ord(self.fileobj.read(1)) xlen = xlen + 256*ord(self.fileobj.read(1))
def _read_gzip_header(self): magic = self.fileobj.read(2) if magic != '\037\213': raise IOError, 'Not a gzipped file' method = ord( self.fileobj.read(1) ) if method != 8: raise IOError, 'Unknown compression method' flag = ord( self.fileobj.read(1) ) # modtime = self.fileobj.read(4) # extraflag = self.fileobj.read(1) # ...
fb0ea525d528153838586bf8ece15a45bbf5ddf3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fb0ea525d528153838586bf8ece15a45bbf5ddf3/gzip.py
s=self.fileobj.read(1) if not s or s=='\000': break
s = self.fileobj.read(1) if not s or s=='\000': break
def _read_gzip_header(self): magic = self.fileobj.read(2) if magic != '\037\213': raise IOError, 'Not a gzipped file' method = ord( self.fileobj.read(1) ) if method != 8: raise IOError, 'Unknown compression method' flag = ord( self.fileobj.read(1) ) # modtime = self.fileobj.read(4) # extraflag = self.fileobj.read(1) # ...
fb0ea525d528153838586bf8ece15a45bbf5ddf3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fb0ea525d528153838586bf8ece15a45bbf5ddf3/gzip.py
s=self.fileobj.read(1) if not s or s=='\000': break
s = self.fileobj.read(1) if not s or s=='\000': break
def _read_gzip_header(self): magic = self.fileobj.read(2) if magic != '\037\213': raise IOError, 'Not a gzipped file' method = ord( self.fileobj.read(1) ) if method != 8: raise IOError, 'Unknown compression method' flag = ord( self.fileobj.read(1) ) # modtime = self.fileobj.read(4) # extraflag = self.fileobj.read(1) # ...
fb0ea525d528153838586bf8ece15a45bbf5ddf3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fb0ea525d528153838586bf8ece15a45bbf5ddf3/gzip.py
if self.fileobj is None: raise EOFError, "Reached EOF"
if self.fileobj is None: raise EOFError, "Reached EOF"
def _read(self, size=1024): if self.fileobj is None: raise EOFError, "Reached EOF"
fb0ea525d528153838586bf8ece15a45bbf5ddf3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fb0ea525d528153838586bf8ece15a45bbf5ddf3/gzip.py
isize = read32(self.fileobj) if crc32%0x100000000L != self.crc%0x100000000L:
isize = U32(read32(self.fileobj)) if U32(crc32) != U32(self.crc):
def _read_eof(self): # We've read to the end of the file, so we have to rewind in order # to reread the 8 bytes containing the CRC and the file size. # We check the that the computed CRC and size of the # uncompressed data matches the stored values. self.fileobj.seek(-8, 1) crc32 = read32(self.fileobj) isize = read32(s...
fb0ea525d528153838586bf8ece15a45bbf5ddf3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fb0ea525d528153838586bf8ece15a45bbf5ddf3/gzip.py
write32(self.fileobj, self.size)
write32u(self.fileobj, self.size)
def close(self): if self.mode == WRITE: self.fileobj.write(self.compress.flush()) write32(self.fileobj, self.crc) write32(self.fileobj, self.size) self.fileobj = None elif self.mode == READ: self.fileobj = None if self.myfileobj: self.myfileobj.close() self.myfileobj = None
fb0ea525d528153838586bf8ece15a45bbf5ddf3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fb0ea525d528153838586bf8ece15a45bbf5ddf3/gzip.py
for i in range(count/1024): self.write(1024*'\0') self.write((count%1024)*'\0')
for i in range(count // 1024): self.write(1024 * '\0') self.write((count % 1024) * '\0')
def seek(self, offset): if self.mode == WRITE: if offset < self.offset: raise IOError('Negative seek in write mode') count = offset - self.offset for i in range(count/1024): self.write(1024*'\0') self.write((count%1024)*'\0') elif self.mode == READ: if offset < self.offset: # for negative seek, rewind and do positive s...
fb0ea525d528153838586bf8ece15a45bbf5ddf3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fb0ea525d528153838586bf8ece15a45bbf5ddf3/gzip.py
for i in range(count/1024): self.read(1024)
for i in range(count // 1024): self.read(1024)
def seek(self, offset): if self.mode == WRITE: if offset < self.offset: raise IOError('Negative seek in write mode') count = offset - self.offset for i in range(count/1024): self.write(1024*'\0') self.write((count%1024)*'\0') elif self.mode == READ: if offset < self.offset: # for negative seek, rewind and do positive s...
fb0ea525d528153838586bf8ece15a45bbf5ddf3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fb0ea525d528153838586bf8ece15a45bbf5ddf3/gzip.py
if sizehint <= 0: sizehint = sys.maxint
if sizehint <= 0: sizehint = sys.maxint
def readlines(self, sizehint=0): # Negative numbers result in reading all the lines if sizehint <= 0: sizehint = sys.maxint L = [] while sizehint > 0: line = self.readline() if line == "": break L.append(line) sizehint = sizehint - len(line)
fb0ea525d528153838586bf8ece15a45bbf5ddf3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fb0ea525d528153838586bf8ece15a45bbf5ddf3/gzip.py
if line == "": break
if line == "": break
def readlines(self, sizehint=0): # Negative numbers result in reading all the lines if sizehint <= 0: sizehint = sys.maxint L = [] while sizehint > 0: line = self.readline() if line == "": break L.append(line) sizehint = sizehint - len(line)
fb0ea525d528153838586bf8ece15a45bbf5ddf3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fb0ea525d528153838586bf8ece15a45bbf5ddf3/gzip.py
path = module.__path__
try: path = module.__path__ except AttributeError: raise ImportError, 'No source for module ' + module.__name__
def _find_module(fullname, path=None): """Version of imp.find_module() that handles hierarchical module names""" file = None for tgt in fullname.split('.'): if file is not None: file.close() # close intermediate files (file, filename, descr) = imp.find_module(tgt, path) if descr[2] == imp.PY_SOURCE: break ...
69e8afcc9fcd8a41a1035893d60893d51fae62f1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/69e8afcc9fcd8a41a1035893d60893d51fae62f1/EditorWindow.py
print (garbage, path)
def retrieve(self, url, filename=None): url = unwrap(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) hdrs = fp.info() del fp return url2pathname(splithost(url1)[1]), hdrs...
c74521acc4d3d08fe557a8ac835c1f827d107e7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c74521acc4d3d08fe557a8ac835c1f827d107e7c/urllib.py
print (garbage, path)
def retrieve(self, url, filename=None): url = unwrap(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) hdrs = fp.info() del fp return url2pathname(splithost(url1)[1]), hdrs...
c74521acc4d3d08fe557a8ac835c1f827d107e7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c74521acc4d3d08fe557a8ac835c1f827d107e7c/urllib.py
print (path, garbage)
def retrieve(self, url, filename=None): url = unwrap(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) hdrs = fp.info() del fp return url2pathname(splithost(url1)[1]), hdrs...
c74521acc4d3d08fe557a8ac835c1f827d107e7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c74521acc4d3d08fe557a8ac835c1f827d107e7c/urllib.py
print (path, garbage)
def retrieve(self, url, filename=None): url = unwrap(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) hdrs = fp.info() del fp return url2pathname(splithost(url1)[1]), hdrs...
c74521acc4d3d08fe557a8ac835c1f827d107e7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c74521acc4d3d08fe557a8ac835c1f827d107e7c/urllib.py
if string.lower(filename[-3:]) == '.py' and os.path.exists(filename):
for suffix, mode, kind in imp.get_suffixes(): if 'b' in mode and string.lower(filename[-len(suffix):]) == suffix: return None if os.path.exists(filename):
def getsourcefile(object): """Return the Python source file an object was defined in, if it exists.""" filename = getfile(object) if string.lower(filename[-4:]) in ['.pyc', '.pyo']: filename = filename[:-4] + '.py' if string.lower(filename[-3:]) == '.py' and os.path.exists(filename): return filename
4eb0c003f8cd892800aa425fbde02ca9ecc76f34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4eb0c003f8cd892800aa425fbde02ca9ecc76f34/inspect.py
"""Return an absolute path to the source file or compiled file for an object. The idea is for each object to have a unique origin, so this routine normalizes the result as much as possible.""" return os.path.normcase(os.path.abspath(getsourcefile(object) or getfile(object)))
"""Return an absolute path to the source or compiled file for an object. The idea is for each object to have a unique origin, so this routine normalizes the result as much as possible.""" return os.path.normcase( os.path.abspath(getsourcefile(object) or getfile(object)))
def getabsfile(object): """Return an absolute path to the source file or compiled file for an object. The idea is for each object to have a unique origin, so this routine normalizes the result as much as possible.""" return os.path.normcase(os.path.abspath(getsourcefile(object) or getfile(object)))
4eb0c003f8cd892800aa425fbde02ca9ecc76f34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4eb0c003f8cd892800aa425fbde02ca9ecc76f34/inspect.py
"""Try to guess which module an object was defined in."""
"""Return the module an object was defined in, or None if not found."""
def getmodule(object): """Try to guess which module an object was defined in.""" if isclass(object): return sys.modules.get(object.__module__) try: file = getabsfile(object) except TypeError: return None if modulesbyfile.has_key(file): return sys.modules[modulesbyfile[file]] for module in sys.modules.values(): if hasat...
4eb0c003f8cd892800aa425fbde02ca9ecc76f34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4eb0c003f8cd892800aa425fbde02ca9ecc76f34/inspect.py
try:
if hasattr(main, object.__name__):
def getmodule(object): """Try to guess which module an object was defined in.""" if isclass(object): return sys.modules.get(object.__module__) try: file = getabsfile(object) except TypeError: return None if modulesbyfile.has_key(file): return sys.modules[modulesbyfile[file]] for module in sys.modules.values(): if hasat...
4eb0c003f8cd892800aa425fbde02ca9ecc76f34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4eb0c003f8cd892800aa425fbde02ca9ecc76f34/inspect.py
if mainobject is object: return main except AttributeError: pass
if mainobject is object: return main
def getmodule(object): """Try to guess which module an object was defined in.""" if isclass(object): return sys.modules.get(object.__module__) try: file = getabsfile(object) except TypeError: return None if modulesbyfile.has_key(file): return sys.modules[modulesbyfile[file]] for module in sys.modules.values(): if hasat...
4eb0c003f8cd892800aa425fbde02ca9ecc76f34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4eb0c003f8cd892800aa425fbde02ca9ecc76f34/inspect.py
try:
if hasattr(builtin, object.__name__):
def getmodule(object): """Try to guess which module an object was defined in.""" if isclass(object): return sys.modules.get(object.__module__) try: file = getabsfile(object) except TypeError: return None if modulesbyfile.has_key(file): return sys.modules[modulesbyfile[file]] for module in sys.modules.values(): if hasat...
4eb0c003f8cd892800aa425fbde02ca9ecc76f34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4eb0c003f8cd892800aa425fbde02ca9ecc76f34/inspect.py
if builtinobject is object: return builtin except AttributeError: pass
if builtinobject is object: return builtin
def getmodule(object): """Try to guess which module an object was defined in.""" if isclass(object): return sys.modules.get(object.__module__) try: file = getabsfile(object) except TypeError: return None if modulesbyfile.has_key(file): return sys.modules[modulesbyfile[file]] for module in sys.modules.values(): if hasat...
4eb0c003f8cd892800aa425fbde02ca9ecc76f34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4eb0c003f8cd892800aa425fbde02ca9ecc76f34/inspect.py
lines = file.readlines() file.close()
def findsource(object): """Return the entire source file and starting line number for an object. The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a list of all the lines in the file and the line number indexes a line in that list. An IOError is r...
4eb0c003f8cd892800aa425fbde02ca9ecc76f34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4eb0c003f8cd892800aa425fbde02ca9ecc76f34/inspect.py
try: lnum = object.co_firstlineno - 1 except AttributeError:
if not hasattr(object, 'co_firstlineno'):
def findsource(object): """Return the entire source file and starting line number for an object. The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a list of all the lines in the file and the line number indexes a line in that list. An IOError is r...
4eb0c003f8cd892800aa425fbde02ca9ecc76f34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4eb0c003f8cd892800aa425fbde02ca9ecc76f34/inspect.py
else: while lnum > 0: if string.split(lines[lnum])[:1] == ['def']: break lnum = lnum - 1 return lines, lnum
lnum = object.co_firstlineno - 1 while lnum > 0: if string.split(lines[lnum])[:1] == ['def']: break lnum = lnum - 1 return lines, lnum
def findsource(object): """Return the entire source file and starting line number for an object. The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a list of all the lines in the file and the line number indexes a line in that list. An IOError is r...
4eb0c003f8cd892800aa425fbde02ca9ecc76f34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4eb0c003f8cd892800aa425fbde02ca9ecc76f34/inspect.py
except: return None
except IOError: return None
def getcomments(object): """Get lines of comments immediately preceding an object's source code.""" try: lines, lnum = findsource(object) except: return None if ismodule(object): # Look for a comment block at the top of the file. start = 0 if lines[0][:2] == '#!': start = 1 while start < len(lines) and string.strip(li...
4eb0c003f8cd892800aa425fbde02ca9ecc76f34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4eb0c003f8cd892800aa425fbde02ca9ecc76f34/inspect.py
except IOError: lines = index = None
def getframeinfo(frame, context=1): """Get information about a frame or traceback object. A tuple of five things is returned: the filename, the line number of the current line, the function name, a list of lines of context from the source code, and the index of the current line within that list. The optional second ar...
4eb0c003f8cd892800aa425fbde02ca9ecc76f34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4eb0c003f8cd892800aa425fbde02ca9ecc76f34/inspect.py
for stack in self.rows + self.suits:
for stack in self.openstacks:
def closeststack(self, card):
a0dc1c4a613f11e1b6e20fa25658823533ca201b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a0dc1c4a613f11e1b6e20fa25658823533ca201b/solitaire.py
for stack in [self.opendeck] + self.suits + self.rows:
for stack in self.openstacks:
def reset(self):
a0dc1c4a613f11e1b6e20fa25658823533ca201b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a0dc1c4a613f11e1b6e20fa25658823533ca201b/solitaire.py
ssl = socket.ssl(sock, self.key_file, self.cert_file)
realsock = sock if hasattr(sock, "_sock"): realsock = sock._sock ssl = socket.ssl(realsock, self.key_file, self.cert_file)
def connect(self): "Connect to a host on a given (SSL) port."
0aee7220db3354ef32b5d1ac92f2c5942bb8eaf8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0aee7220db3354ef32b5d1ac92f2c5942bb8eaf8/httplib.py
def test_main(): # Historically, these tests have sloppy about removing TESTFN. So get # rid of it no matter what. try: run_unittest(AutoFileTests, OtherFileTests) finally: if os.path.exists(TESTFN): os.unlink(TESTFN)
c9778a8951110e9781f51a10882397b1647a609e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c9778a8951110e9781f51a10882397b1647a609e/test_file.py
dir = os.path.join(self.root, dir[1:])
dir = change_root(self.root, dir)
def run (self): self.mkpath(self.install_dir) for f in self.data_files: if type(f) == StringType: # its a simple file, so copy it self.copy_file(f, self.install_dir) else: # its a tuple with path to install to and a list of files dir = f[0] if not os.path.isabs(dir): dir = os.path.join(self.install_dir, dir) elif self....
101de379070c3a7700a9f57bd6d24cab55f7848a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/101de379070c3a7700a9f57bd6d24cab55f7848a/install_data.py
return s[:1] == '/'
return s.startswith('/')
def isabs(s): """Test whether a path is absolute""" return s[:1] == '/'
77cdeaff556447a980fe8632e8cd010499ade2d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77cdeaff556447a980fe8632e8cd010499ade2d0/posixpath.py
if b[:1] == '/':
if b.startswith('/'):
def join(a, *p): """Join two or more pathname components, inserting '/' as needed""" path = a for b in p: if b[:1] == '/': path = b elif path == '' or path[-1:] == '/': path = path + b else: path = path + '/' + b return path
77cdeaff556447a980fe8632e8cd010499ade2d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77cdeaff556447a980fe8632e8cd010499ade2d0/posixpath.py
elif path == '' or path[-1:] == '/': path = path + b
elif path == '' or path.endswith('/'): path += b
def join(a, *p): """Join two or more pathname components, inserting '/' as needed""" path = a for b in p: if b[:1] == '/': path = b elif path == '' or path[-1:] == '/': path = path + b else: path = path + '/' + b return path
77cdeaff556447a980fe8632e8cd010499ade2d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77cdeaff556447a980fe8632e8cd010499ade2d0/posixpath.py
path = path + '/' + b
path += '/' + b
def join(a, *p): """Join two or more pathname components, inserting '/' as needed""" path = a for b in p: if b[:1] == '/': path = b elif path == '' or path[-1:] == '/': path = path + b else: path = path + '/' + b return path
77cdeaff556447a980fe8632e8cd010499ade2d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77cdeaff556447a980fe8632e8cd010499ade2d0/posixpath.py
while head[-1] == '/': head = head[:-1]
head = head.rstrip('/')
def split(p): """Split a pathname. Returns tuple "(head, tail)" where "tail" is everything after the final slash. Either part may be empty.""" i = p.rfind('/') + 1 head, tail = p[:i], p[i:] if head and head != '/'*len(head): while head[-1] == '/': head = head[:-1] return head, tail
77cdeaff556447a980fe8632e8cd010499ade2d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77cdeaff556447a980fe8632e8cd010499ade2d0/posixpath.py
if i == 0: return ''
if i == 0: return ''
def commonprefix(m): "Given a list of pathnames, returns the longest common leading component" if not m: return '' prefix = m[0] for item in m: for i in range(len(prefix)): if prefix[:i+1] != item[:i+1]: prefix = prefix[:i] if i == 0: return '' break return prefix
77cdeaff556447a980fe8632e8cd010499ade2d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77cdeaff556447a980fe8632e8cd010499ade2d0/posixpath.py
if path[:1] != '~':
if not path.startswith('~'):
def expanduser(path): """Expand ~ and ~user constructions. If user or $HOME is unknown, do nothing.""" if path[:1] != '~': return path i, n = 1, len(path) while i < n and path[i] != '/': i = i + 1 if i == 1: if not 'HOME' in os.environ: import pwd userhome = pwd.getpwuid(os.getuid())[5] else: userhome = os.environ['HO...
77cdeaff556447a980fe8632e8cd010499ade2d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77cdeaff556447a980fe8632e8cd010499ade2d0/posixpath.py
i = i + 1
i += 1
def expanduser(path): """Expand ~ and ~user constructions. If user or $HOME is unknown, do nothing.""" if path[:1] != '~': return path i, n = 1, len(path) while i < n and path[i] != '/': i = i + 1 if i == 1: if not 'HOME' in os.environ: import pwd userhome = pwd.getpwuid(os.getuid())[5] else: userhome = os.environ['HO...
77cdeaff556447a980fe8632e8cd010499ade2d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77cdeaff556447a980fe8632e8cd010499ade2d0/posixpath.py
userhome = pwd.getpwuid(os.getuid())[5]
userhome = pwd.getpwuid(os.getuid()).pw_dir
def expanduser(path): """Expand ~ and ~user constructions. If user or $HOME is unknown, do nothing.""" if path[:1] != '~': return path i, n = 1, len(path) while i < n and path[i] != '/': i = i + 1 if i == 1: if not 'HOME' in os.environ: import pwd userhome = pwd.getpwuid(os.getuid())[5] else: userhome = os.environ['HO...
77cdeaff556447a980fe8632e8cd010499ade2d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77cdeaff556447a980fe8632e8cd010499ade2d0/posixpath.py
userhome = pwent[5] if userhome[-1:] == '/': i = i + 1
userhome = pwent.pw_dir if userhome.endswith('/'): i += 1
def expanduser(path): """Expand ~ and ~user constructions. If user or $HOME is unknown, do nothing.""" if path[:1] != '~': return path i, n = 1, len(path) while i < n and path[i] != '/': i = i + 1 if i == 1: if not 'HOME' in os.environ: import pwd userhome = pwd.getpwuid(os.getuid())[5] else: userhome = os.environ['HO...
77cdeaff556447a980fe8632e8cd010499ade2d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77cdeaff556447a980fe8632e8cd010499ade2d0/posixpath.py
if name[:1] == '{' and name[-1:] == '}':
if name.startswith('{') and name.endswith('}'):
def expandvars(path): """Expand shell variables of form $var and ${var}. Unknown variables are left unchanged.""" global _varprog if '$' not in path: return path if not _varprog: import re _varprog = re.compile(r'\$(\w+|\{[^}]*\})') i = 0 while True: m = _varprog.search(path, i) if not m: break i, j = m.span(0) name =...
77cdeaff556447a980fe8632e8cd010499ade2d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77cdeaff556447a980fe8632e8cd010499ade2d0/posixpath.py
path = path + tail
path += tail
def expandvars(path): """Expand shell variables of form $var and ${var}. Unknown variables are left unchanged.""" global _varprog if '$' not in path: return path if not _varprog: import re _varprog = re.compile(r'\$(\w+|\{[^}]*\})') i = 0 while True: m = _varprog.search(path, i) if not m: break i, j = m.span(0) name =...
77cdeaff556447a980fe8632e8cd010499ade2d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77cdeaff556447a980fe8632e8cd010499ade2d0/posixpath.py
filename = EasyDialogs.AskFileForOpen(message='Select file with aeut/aete resource:')
filename = EasyDialogs.AskFileForOpen( message='Select scriptable application', dialogOptionFlags=0x1056)
def main(): if len(sys.argv) > 1: for filename in sys.argv[1:]: processfile(filename) else: filename = EasyDialogs.AskFileForOpen(message='Select file with aeut/aete resource:') if not filename: sys.exit(0) processfile(filename)
fa1bf1c518528ae8ec9b24ce452edc930ec80a7d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fa1bf1c518528ae8ec9b24ce452edc930ec80a7d/gensuitemodule.py
processfile(filename) def processfile(fullname):
try: processfile(filename) except MacOS.Error, arg: print "Error getting terminology:", arg print "Retry, manually parsing resources" processfile_fromresource(filename) def processfile_fromresource(fullname):
def main(): if len(sys.argv) > 1: for filename in sys.argv[1:]: processfile(filename) else: filename = EasyDialogs.AskFileForOpen(message='Select file with aeut/aete resource:') if not filename: sys.exit(0) processfile(filename)
fa1bf1c518528ae8ec9b24ce452edc930ec80a7d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fa1bf1c518528ae8ec9b24ce452edc930ec80a7d/gensuitemodule.py
defaultLocation=DEFAULT_PACKAGEFOLDER)
defaultLocation=DEFAULT_USER_PACKAGEFOLDER)
def compileaete(aete, resinfo, fname): """Generate code for a full aete resource. fname passed for doc purposes""" [version, language, script, suites] = aete major, minor = divmod(version, 256) creatorsignature, dummy = MacOS.GetCreatorAndType(fname) packagename = identify(os.path.splitext(os.path.basename(fname))[0]) ...
fa1bf1c518528ae8ec9b24ce452edc930ec80a7d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fa1bf1c518528ae8ec9b24ce452edc930ec80a7d/gensuitemodule.py
defaultLocation=DEFAULT_PACKAGEFOLDER)
defaultLocation=DEFAULT_STANDARD_PACKAGEFOLDER)
def compileaete(aete, resinfo, fname): """Generate code for a full aete resource. fname passed for doc purposes""" [version, language, script, suites] = aete major, minor = divmod(version, 256) creatorsignature, dummy = MacOS.GetCreatorAndType(fname) packagename = identify(os.path.splitext(os.path.basename(fname))[0]) ...
fa1bf1c518528ae8ec9b24ce452edc930ec80a7d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fa1bf1c518528ae8ec9b24ce452edc930ec80a7d/gensuitemodule.py
print identify('for')
def identify(str): """Turn any string into an identifier: - replace space by _ - replace other illegal chars by _xx_ (hex code) - prepend _ if the result is a python keyword """ if not str: return "empty_ae_name_" rv = '' ok = string.ascii_letters + '_' ok2 = ok + string.digits for c in str: if c in ok: rv = rv + c eli...
fa1bf1c518528ae8ec9b24ce452edc930ec80a7d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fa1bf1c518528ae8ec9b24ce452edc930ec80a7d/gensuitemodule.py
cre = re.compile(r'def\s+%s\s*[(]' % funcname)
cre = re.compile(r'def\s+%s\s*[(]' % re.escape(funcname))
def find_function(funcname, filename): cre = re.compile(r'def\s+%s\s*[(]' % funcname) try: fp = open(filename) except IOError: return None # consumer of this info expects the first line to be 1 lineno = 1 answer = None while 1: line = fp.readline() if line == '': break if cre.match(line): answer = funcname, filename, l...
e6728252a3598527bbda15c7ee17e03bf2c448f1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e6728252a3598527bbda15c7ee17e03bf2c448f1/pdb.py
def __init__(self, host, port=None, **x509): keys = x509.keys() try: keys.remove('key_file') except ValueError: pass try: keys.remove('cert_file') except ValueError: pass if keys: raise IllegalKeywordArgument()
def __init__(self, host, port=None, key_file=None, cert_file=None):
def __init__(self, host, port=None, **x509): keys = x509.keys() try: keys.remove('key_file') except ValueError: pass try: keys.remove('cert_file') except ValueError: pass if keys: raise IllegalKeywordArgument() HTTPConnection.__init__(self, host, port) self.key_file = x509.get('key_file') self.cert_file = x509.get('cer...
7c75c99a10691998b7e1506ede4f98eec28bd226 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7c75c99a10691998b7e1506ede4f98eec28bd226/httplib.py
self.key_file = x509.get('key_file') self.cert_file = x509.get('cert_file')
self.key_file = key_file self.cert_file = cert_file
def __init__(self, host, port=None, **x509): keys = x509.keys() try: keys.remove('key_file') except ValueError: pass try: keys.remove('cert_file') except ValueError: pass if keys: raise IllegalKeywordArgument() HTTPConnection.__init__(self, host, port) self.key_file = x509.get('key_file') self.cert_file = x509.get('cer...
7c75c99a10691998b7e1506ede4f98eec28bd226 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7c75c99a10691998b7e1506ede4f98eec28bd226/httplib.py
pass class IllegalKeywordArgument(HTTPException):
def __init__(self, version): self.version = version
7c75c99a10691998b7e1506ede4f98eec28bd226 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7c75c99a10691998b7e1506ede4f98eec28bd226/httplib.py
lookup = getattr(self, "handle_"+condition) elif condition in ["response", "request"]:
lookup = self.handle_open elif condition == "response":
def add_handler(self, handler): added = False for meth in dir(handler): i = meth.find("_") protocol = meth[:i] condition = meth[i+1:]
f7bf02ded533421a0e231c425ac7ff08b8efc589 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f7bf02ded533421a0e231c425ac7ff08b8efc589/urllib2.py
lookup = getattr(self, "process_"+condition)
lookup = self.process_response elif condition == "request": kind = protocol lookup = self.process_request
def add_handler(self, handler): added = False for meth in dir(handler): i = meth.find("_") protocol = meth[:i] condition = meth[i+1:]
f7bf02ded533421a0e231c425ac7ff08b8efc589 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f7bf02ded533421a0e231c425ac7ff08b8efc589/urllib2.py
str = in_file.readline() while str and str != 'end\n': out_file.write(binascii.a2b_uu(str)) str = in_file.readline()
s = in_file.readline() while s and s != 'end\n': try: data = binascii.a2b_uu(s) except binascii.Error, v: nbytes = (((ord(s[0])-32) & 63) * 4 + 5) / 3 data = binascii.a2b_uu(s[:nbytes]) sys.stderr.write("Warning: %s\n" % str(v)) out_file.write(data) s = in_file.readline()
def decode(in_file, out_file=None, mode=None): """Decode uuencoded file""" # # Open the input file, if needed. # if in_file == '-': in_file = sys.stdin elif type(in_file) == type(''): in_file = open(in_file) # # Read until a begin is encountered or we've exhausted the file # while 1: hdr = in_file.readline() if not hdr...
4494101858cdcc489281c1e22c3172b99ae2cb20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4494101858cdcc489281c1e22c3172b99ae2cb20/uu.py
params, method = xmlrpclib.loads(data)
def _marshaled_dispatch(self, data, dispatch_method = None): """Dispatches an XML-RPC method from marshalled (XML) data.
b9120e772be65492e02beced8b344e98cf5f85d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b9120e772be65492e02beced8b344e98cf5f85d2/SimpleXMLRPCServer.py
print socket.getservbyname('telnet', 'tcp') try: socket.getservbyname('telnet', 'udp') except socket.error: pass
if hasattr(socket, 'getservbyname'): print socket.getservbyname('telnet', 'tcp') try: socket.getservbyname('telnet', 'udp') except socket.error: pass
def missing_ok(str): try: getattr(socket, str) except AttributeError: pass
6870bba459a7c30908c8640b20023e9817e8ac53 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6870bba459a7c30908c8640b20023e9817e8ac53/test_socket.py
self._cont_handler = handler.ContentHandler() self._err_handler = handler.ErrorHandler()
self._cont_handler = handler.ContentHandler() self._err_handler = handler.ErrorHandler()
def __init__(self):
f9059ebede7acc7d498d0703dd97adede37c5016 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f9059ebede7acc7d498d0703dd97adede37c5016/xmlreader.py
"Parse an XML document from a system identifier or an InputSource."
"Parse an XML document from a system identifier or an InputSource."
def parse(self, source):
f9059ebede7acc7d498d0703dd97adede37c5016 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f9059ebede7acc7d498d0703dd97adede37c5016/xmlreader.py
"Register an object to receive basic DTD-related events." self._dtd_handler = handler
"Register an object to receive basic DTD-related events." self._dtd_handler = handler
def setDTDHandler(self, handler):
f9059ebede7acc7d498d0703dd97adede37c5016 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f9059ebede7acc7d498d0703dd97adede37c5016/xmlreader.py
"Register an object to resolve external entities." self._ent_handler = resolver
"Register an object to resolve external entities." self._ent_handler = resolver
def setEntityResolver(self, resolver):
f9059ebede7acc7d498d0703dd97adede37c5016 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f9059ebede7acc7d498d0703dd97adede37c5016/xmlreader.py
"Register an object to receive error-message events." self._err_handler = handler
"Register an object to receive error-message events." self._err_handler = handler
def setErrorHandler(self, handler):
f9059ebede7acc7d498d0703dd97adede37c5016 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f9059ebede7acc7d498d0703dd97adede37c5016/xmlreader.py
"Return the column number where the current event ends." return -1
"Return the column number where the current event ends." return -1
def getColumnNumber(self):
f9059ebede7acc7d498d0703dd97adede37c5016 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f9059ebede7acc7d498d0703dd97adede37c5016/xmlreader.py
"Return the line number where the current event ends." return -1
"Return the line number where the current event ends." return -1
def getLineNumber(self):
f9059ebede7acc7d498d0703dd97adede37c5016 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f9059ebede7acc7d498d0703dd97adede37c5016/xmlreader.py
"Return the public identifier for the current event." return None
"Return the public identifier for the current event." return None
def getPublicId(self):
f9059ebede7acc7d498d0703dd97adede37c5016 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f9059ebede7acc7d498d0703dd97adede37c5016/xmlreader.py
"Return the system identifier for the current event." return None
"Return the system identifier for the current event." return None
def getSystemId(self):
f9059ebede7acc7d498d0703dd97adede37c5016 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f9059ebede7acc7d498d0703dd97adede37c5016/xmlreader.py
if not self._dict['MD5Sum']:
if not self._dict.get('MD5Sum'):
def _archiveOK(self): """Test an archive. It should exist and the MD5 checksum should be correct.""" if not os.path.exists(self.archiveFilename): return 0 if not self._dict['MD5Sum']: sys.stderr.write("Warning: no MD5Sum for %s\n" % self.fullname()) return 1 data = open(self.archiveFilename, 'rb').read() checksum = md...
e71b9f830b0a3829de799c6b826ea2b4450762c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e71b9f830b0a3829de799c6b826ea2b4450762c4/pimp.py
if type(value) != type([]):
if type(value) not in (type([]), type( () )):
def post_to_server(self, data, auth=None): ''' Post a query to the server, and return a string response. '''
0037300f153cb0a84238c5fbe2eafde3102001b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0037300f153cb0a84238c5fbe2eafde3102001b6/register.py
self.doc.append(readme)
self.doc_files.append(readme)
def finalize_package_data (self): self.ensure_string('group', "Development/Libraries") self.ensure_string('vendor', "%s <%s>" % (self.distribution.get_contact(), self.distribution.get_contact_email())) self.ensure_string('packager') self.ensure_string_list('doc_files') if type(self.doc_files) is ListType: for readme in...
0152fbdc7f90b3dc6fed167ebda2392cbb47954b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0152fbdc7f90b3dc6fed167ebda2392cbb47954b/bdist_rpm.py
def getresponse(self): "Get the response from the server."
ca2e79000b869861540015468e1b4873241ec984 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ca2e79000b869861540015468e1b4873241ec984/httplib.py
outputs[-1:] = \
outputs.extend (
def copy_tree (src, dst, preserve_mode=1, preserve_times=1, preserve_symlinks=0, update=0, verbose=0, dry_run=0): """Copy an entire directory tree 'src' to a new location 'dst'. Both 'src' and 'dst' must be directory names. If 'src' is not a directory, raise DistutilsFileError. If 'dst' does not exist, it is creat...
a002edc85b25160cfffe610df9ab7337efc8f0c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a002edc85b25160cfffe610df9ab7337efc8f0c0/util.py
update, verbose, dry_run)
update, verbose, dry_run))
def copy_tree (src, dst, preserve_mode=1, preserve_times=1, preserve_symlinks=0, update=0, verbose=0, dry_run=0): """Copy an entire directory tree 'src' to a new location 'dst'. Both 'src' and 'dst' must be directory names. If 'src' is not a directory, raise DistutilsFileError. If 'dst' does not exist, it is creat...
a002edc85b25160cfffe610df9ab7337efc8f0c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a002edc85b25160cfffe610df9ab7337efc8f0c0/util.py
if not uthread2:
if uthread2:
def execstring(pytext, globals, locals, filename="<string>", debugging=0, modname="__main__", profiling=0): if debugging: import PyDebugger, bdb BdbQuit = bdb.BdbQuit else: BdbQuit = 'BdbQuitDummyException' pytext = string.split(pytext, '\r') pytext = string.join(pytext, '\n') + '\n' W.SetCursor("watch") globals['__nam...
1c0fceeaa78c1cef7b4ed9eded85310135fa3bad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1c0fceeaa78c1cef7b4ed9eded85310135fa3bad/PyEdit.py
code = co.co_code n = len(code) i = 0 lastname = None while i < n: c = code[i] i = i+1 op = ord(c) if op >= dis.HAVE_ARGUMENT: oparg = ord(code[i]) + ord(code[i+1])*256 i = i+2 if op == IMPORT_NAME: name = lastname = co.co_names[oparg] if not self.badmodules.has_key(lastname): try: self.import_hook(name, m) except Impo...
self.scan_code(co, m)
def load_module(self, fqname, fp, pathname, (suffix, mode, type)): self.msgin(2, "load_module", fqname, fp and "fp", pathname) if type == imp.PKG_DIRECTORY: m = self.load_package(fqname, pathname) self.msgout(2, "load_module ->", m) return m if type == imp.PY_SOURCE: co = compile(fp.read(), pathname, 'exec') elif type ...
3c51cf2b6995995fc02771eceb41683fb194c932 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3c51cf2b6995995fc02771eceb41683fb194c932/modulefinder.py
def askopenfilenames(**options): """Ask for multiple filenames to open Returns a list of filenames or empty list if cancel button selected """ options["multiple"]=1 files=Open(**options).show() return files.split()
def asksaveasfilename(**options): "Ask for a filename to save as" return SaveAs(**options).show()
b24e3477dc0f9895573a37b8fcedcf65dc99ef2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b24e3477dc0f9895573a37b8fcedcf65dc99ef2c/tkFileDialog.py
except BClass, v: raise TestFailed except AClass, v:
except BClass, v:
def __init__(self, ignore):
ae631f7f4588adb3f0077ae80c2ccd530fb5ccc5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ae631f7f4588adb3f0077ae80c2ccd530fb5ccc5/test_opcodes.py
else: raise TestFailed
def __init__(self, ignore):
ae631f7f4588adb3f0077ae80c2ccd530fb5ccc5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ae631f7f4588adb3f0077ae80c2ccd530fb5ccc5/test_opcodes.py
libraries, extradirs, extraexportsymbols, outputdir)
libraries, extradirs, extraexportsymbols, outputdir, libraryflags, stdlibraryflags, prefixname)
def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files....
9051e0e5775b0d0d9f6b4d09a15ef262dd936e76 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9051e0e5775b0d0d9f6b4d09a15ef262dd936e76/genpluginprojects.py
libraries, extradirs, extraexportsymbols, outputdir)
libraries, extradirs, extraexportsymbols, outputdir, libraryflags, stdlibraryflags, prefixname)
def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files....
9051e0e5775b0d0d9f6b4d09a15ef262dd936e76 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9051e0e5775b0d0d9f6b4d09a15ef262dd936e76/genpluginprojects.py
genpluginproject("all", "_Res", outputdir="::Lib:Carbon")
genpluginproject("all", "_Res", stdlibraryflags="Debug, WeakImport", outputdir="::Lib:Carbon")
def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files....
9051e0e5775b0d0d9f6b4d09a15ef262dd936e76 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9051e0e5775b0d0d9f6b4d09a15ef262dd936e76/genpluginprojects.py
self.preffilepath = ":Python:PythonIDE preferences"
self.preffilepath = os.path.join("Python", "PythonIDE preferences")
def __init__(self): self.preffilepath = ":Python:PythonIDE preferences" Wapplication.Application.__init__(self, 'Pide') from Carbon import AE from Carbon import AppleEvents AE.AEInstallEventHandler(AppleEvents.kCoreEventClass, AppleEvents.kAEOpenApplication, self.ignoreevent) AE.AEInstallEventHandler(AppleEvents.kCore...
979c53757b5a555725bfab5ee65cfb00b763b46b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/979c53757b5a555725bfab5ee65cfb00b763b46b/PythonIDEMain.py
self.compile = 0
self.compile = None
def initialize_options (self):
b26ca9db2e1efdac62893799c49e3db2c127d56b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b26ca9db2e1efdac62893799c49e3db2c127d56b/install.py
13 0 LOAD_FAST 0 (a)
%-4d 0 LOAD_FAST 0 (a)
def _f(a): print a return 1
26848a34d100f5ff9c3f2710d321d68f73204005 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/26848a34d100f5ff9c3f2710d321d68f73204005/test_dis.py
14 5 LOAD_CONST 1 (1)
%-4d 5 LOAD_CONST 1 (1)
def _f(a): print a return 1
26848a34d100f5ff9c3f2710d321d68f73204005 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/26848a34d100f5ff9c3f2710d321d68f73204005/test_dis.py
"""
"""%(_f.func_code.co_firstlineno + 1, _f.func_code.co_firstlineno + 2) def bug708901(): for res in range(1, 10): pass dis_bug708901 = """\ %-4d 0 SETUP_LOOP 23 (to 26) 3 LOAD_GLOBAL 0 (range) 6 LOAD_CONST 1 (1) %-4d 9 LOAD_CONST 2 (10) 12 CALL_FU...
def _f(a): print a return 1
26848a34d100f5ff9c3f2710d321d68f73204005 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/26848a34d100f5ff9c3f2710d321d68f73204005/test_dis.py
s = StringIO.StringIO() save_stdout = sys.stdout sys.stdout = s dis.dis(_f) sys.stdout = save_stdout got = s.getvalue() lines = got.split('\n') lines = [line.rstrip() for line in lines] got = '\n'.join(lines) self.assertEqual(dis_f, got)
self.do_disassembly_test(_f, dis_f) def test_bug_708901(self): self.do_disassembly_test(bug708901, dis_bug708901)
def test_dis(self): s = StringIO.StringIO() save_stdout = sys.stdout sys.stdout = s dis.dis(_f) sys.stdout = save_stdout got = s.getvalue() # Trim trailing blanks (if any). lines = got.split('\n') lines = [line.rstrip() for line in lines] got = '\n'.join(lines) self.assertEqual(dis_f, got)
26848a34d100f5ff9c3f2710d321d68f73204005 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/26848a34d100f5ff9c3f2710d321d68f73204005/test_dis.py
"""comment: get or set the Finder-comment of the item, displayed in the Get Info window."""
"""comment: get or set the Finder-comment of the item, displayed in the 'Get Info' window."""
def comment(object, comment=None): """comment: get or set the Finder-comment of the item, displayed in the Get Info window.""" object = macfs.FSSpec(object) fss = macfs.FSSpec(object) object_alias = fss.NewAlias() if comment == None: return _getcomment(object_alias) else: return _setcomment(object_alias, comment)
cb100d16e3e7c368179a8b507afd5534c5681eb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cb100d16e3e7c368179a8b507afd5534c5681eb6/findertools.py
print '\nmorefindertools version %s\nTests coming up' %__version__
print '\nmorefindertools version %s\nTests coming up...' %__version__
def _test2(): print '\nmorefindertools version %s\nTests coming up' %__version__ import os import random # miscellaneous print '\tfilesharing on?', filesharing() # is file sharing on, off, starting up? print '\tOS version', OSversion() # the version of the system software # set the soundvolume in a simple way pri...
cb100d16e3e7c368179a8b507afd5534c5681eb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cb100d16e3e7c368179a8b507afd5534c5681eb6/findertools.py
pdict: dictionary containing other parameters of conten-type header
pdict: dictionary containing other parameters of content-type header
def parse_multipart(fp, pdict): """Parse multipart input. Arguments: fp : input file pdict: dictionary containing other parameters of conten-type header Returns a dictionary just like parse_qs(): keys are the field names, each value is a list of values for that field. This is easy to use but not much good if you a...
c7fc10a41873df6dc40055e62385c1dd198e18b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c7fc10a41873df6dc40055e62385c1dd198e18b6/cgi.py
headers = mimetools.Message(fp)
headers = _header_parser.parse(fp)
def parse_multipart(fp, pdict): """Parse multipart input. Arguments: fp : input file pdict: dictionary containing other parameters of conten-type header Returns a dictionary just like parse_qs(): keys are the field names, each value is a list of values for that field. This is easy to use but not much good if you a...
c7fc10a41873df6dc40055e62385c1dd198e18b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c7fc10a41873df6dc40055e62385c1dd198e18b6/cgi.py
headers: a dictionary(-like) object (sometimes rfc822.Message or a subclass thereof) containing *all* headers
headers: a dictionary(-like) object (sometimes email.Message.Message or a subclass thereof) containing *all* headers
def __repr__(self): """Return printable representation.""" return "MiniFieldStorage(%r, %r)" % (self.name, self.value)
c7fc10a41873df6dc40055e62385c1dd198e18b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c7fc10a41873df6dc40055e62385c1dd198e18b6/cgi.py
headers = rfc822.Message(self.fp)
headers = _header_parser.parse(self.fp)
def read_multi(self, environ, keep_blank_values, strict_parsing): """Internal: read a part that is itself multipart.""" ib = self.innerboundary if not valid_boundary(ib): raise ValueError, 'Invalid boundary in multipart form: %r' % (ib,) self.list = [] klass = self.FieldStorageClass or self.__class__ part = klass(self....
c7fc10a41873df6dc40055e62385c1dd198e18b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c7fc10a41873df6dc40055e62385c1dd198e18b6/cgi.py
print>>sys.__stderr__, "** __file__: ", __file__
def view_readme(self, event=None): print>>sys.__stderr__, "** __file__: ", __file__ fn=os.path.join(os.path.abspath(os.path.dirname(__file__)),'README.txt') textView.TextViewer(self.top,'IDLEfork - README',fn)
4ba6067d6bdc2a535e0f691418c1fbb4b4189039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4ba6067d6bdc2a535e0f691418c1fbb4b4189039/EditorWindow.py