rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
shared = os.path.join (dir, self.shared_library_filename (lib)) static = os.path.join (dir, self.library_filename (lib))
shared = os.path.join ( dir, self.library_filename (lib, lib_type='shared')) static = os.path.join ( dir, self.library_filename (lib, lib_type='static'))
def find_library_file (self, dirs, lib):
1d3ae62e735fefd2ef4416e5f1eaf4a74fe124a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1d3ae62e735fefd2ef4416e5f1eaf4a74fe124a3/unixccompiler.py
codecs.StreamWriter.__init__(self,strict,errors)
codecs.StreamWriter.__init__(self,stream,errors)
def __init__(self,stream,errors='strict',mapping=None):
598260ef704eca7b332e06d17287c0166917fccd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/598260ef704eca7b332e06d17287c0166917fccd/charmap.py
_userprog = re.compile('^([^@]*)@(.*)$')
_userprog = re.compile('^(.*)@(.*)$')
def splituser(host): """splituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'.""" global _userprog if _userprog is None: import re _userprog = re.compile('^([^@]*)@(.*)$') match = _userprog.match(host) if match: return map(unquote, match.group(1, 2)) return None, host
4a9546db82a1940d072f83801e318664c2473801 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4a9546db82a1940d072f83801e318664c2473801/urllib.py
""" finalstuff = finalstuff + """ /* Routines to convert any CF type to/from the corresponding CFxxxObj */ PyObject *CFObj_New(CFTypeRef itself) { if (itself == NULL) { PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL"); return NULL; } if (CFGetTypeID(itself) == CFArrayGetTypeID()) return CFArrayRefObj_New((CFAr...
#ifdef USE_TOOLBOX_OBJECT_GLUE
3d3247f9fa83a2c2bad0a56f2df9cfd138923296 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3d3247f9fa83a2c2bad0a56f2df9cfd138923296/cfsupport.py
self._out.write(' %s="%s"' % (name, escape(value)))
self._out.write(' %s=%s' % (name, quoteattr(value)))
def startElement(self, name, attrs): self._out.write('<' + name) for (name, value) in attrs.items(): self._out.write(' %s="%s"' % (name, escape(value))) self._out.write('>')
b20042ca5c8450cf8fed2a0dda466085eb5b421d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b20042ca5c8450cf8fed2a0dda466085eb5b421d/saxutils.py
self._out.write(' %s="%s"' % (name, escape(value)))
self._out.write(' %s=%s' % (name, quoteattr(value)))
def startElementNS(self, name, qname, attrs): if name[0] is None: # if the name was not namespace-scoped, use the unqualified part name = name[1] else: # else try to restore the original prefix from the namespace name = self._current_context[name[0]] + ":" + name[1] self._out.write('<' + name)
b20042ca5c8450cf8fed2a0dda466085eb5b421d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b20042ca5c8450cf8fed2a0dda466085eb5b421d/saxutils.py
from time import sleep
def demo2(): # exercises some new and improved features speed('fast') width(3) # draw a segmented half-circle setheading(towards(0,0)) x,y = position() r = (x**2+y**2)**.5/2.0 right(90) pendown = True for i in range(18): if pendown: up() pendown = False else: down() pendown = True circle(r,10) sleep(2) reset() left(9...
14c9d540e5257d01aeca6aa16eda9eabc87221d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/14c9d540e5257d01aeca6aa16eda9eabc87221d2/turtle.py
if localename is not None:
if localename:
def getdefaultlocale(envvars=('LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LANG')): """ Tries to determine the default locale settings and returns them as tuple (language code, encoding). According to POSIX, a program which has not called setlocale(LC_ALL, "") runs using the portable 'C' locale. Calling setlocale(LC_ALL, "") l...
8afce4c9ce45f3d9ca61f6c6cc762c0ccac81125 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8afce4c9ce45f3d9ca61f6c6cc762c0ccac81125/locale.py
self._prepareInstall(pkg, force, recursive)
self._prepareInstall(pkg, False, recursive)
def _prepareInstall(self, package, force=0, recursive=1): """Internal routine, recursive engine for prepareInstall. Test whether the package is installed and (if not installed or if force==1) prepend it to the temporary todo list and call ourselves recursively on all prerequisites.""" if not force: status, message = ...
c5e911f5fd8b7876b310b278c71194cc155250a0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c5e911f5fd8b7876b310b278c71194cc155250a0/pimp.py
if dir[-1] == '\n': dir = dir[:-1]
dir = dir.rstrip()
def addpackage(sitedir, name): global _dirs_in_sys_path if _dirs_in_sys_path is None: _init_pathinfo() reset = 1 else: reset = 0 fullname = os.path.join(sitedir, name) try: f = open(fullname) except IOError: return while 1: dir = f.readline() if not dir: break if dir[0] == '#': continue if dir.startswith("import"): exe...
3b3880a21372e3123a0b71949c1d5a7608c41317 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3b3880a21372e3123a0b71949c1d5a7608c41317/site.py
str = self.__rmjunk.sub('', str)
for pattern, replacement in REPLACEMENTS: str = pattern.sub(replacement, str)
def __init__(self, link, str, seqno): self.links = [link] self.seqno = seqno # remove <#\d+#> left in by moving the data out of LaTeX2HTML str = self.__rmjunk.sub('', str) # build up the text self.text = split_entry_text(str) self.key = split_entry_key(str)
1edb5935a113fa21a2c107644c79baa0211e80be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1edb5935a113fa21a2c107644c79baa0211e80be/buildindex.py
try: msg = str(self.msg) except UnicodeError: msg = self.msg
msg = self.msg if type(msg) not in (types.UnicodeType, types.StringType): try: msg = str(self.msg) except UnicodeError: msg = self.msg
def getMessage(self): """ Return the message for this LogRecord.
aac61d252760d1d193b7cc7707523647303e4e5d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/aac61d252760d1d193b7cc7707523647303e4e5d/__init__.py
"""test whether PATH corresponds to a CGI script. Return a tuple (dir, rest) if PATH requires running a
"""Test whether self.path corresponds to a CGI script. Return a tuple (dir, rest) if self.path requires running a
def is_cgi(self): """test whether PATH corresponds to a CGI script.
508dabac60ddd25bfe9e80d24ce242484152da99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/508dabac60ddd25bfe9e80d24ce242484152da99/CGIHTTPServer.py
if not executable(scriptfile): self.send_error(403, "CGI script is not executable (%s)" % `scriptname`) return nobody = nobody_uid()
ispy = self.is_python(scriptname) if not ispy: if not (self.have_fork or self.have_popen2): self.send_error(403, "CGI script is not a Python script (%s)" % `scriptname`) return if not self.is_executable(scriptfile): self.send_error(403, "CGI script is not executable (%s)" % `scriptname`) return env = {} env['SERVER_...
def run_cgi(self): """Execute a CGI script.""" dir, rest = self.cgi_info i = string.rfind(rest, '?') if i >= 0: rest, query = rest[:i], rest[i+1:] else: query = '' i = string.find(rest, '/') if i >= 0: script, rest = rest[:i], rest[i:] else: script, rest = rest, '' scriptname = dir + '/' + script scriptfile = self.tran...
508dabac60ddd25bfe9e80d24ce242484152da99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/508dabac60ddd25bfe9e80d24ce242484152da99/CGIHTTPServer.py
self.wfile.flush() pid = os.fork() if pid != 0: pid, sts = os.waitpid(pid, 0)
decoded_query = string.replace(query, '+', ' ') if self.have_fork: args = [script] if '=' not in decoded_query: args.append(decoded_query) nobody = nobody_uid() self.wfile.flush() pid = os.fork() if pid != 0: pid, sts = os.waitpid(pid, 0) if sts: self.log_error("CGI script exit status % return try: try: os.setuid(...
def run_cgi(self): """Execute a CGI script.""" dir, rest = self.cgi_info i = string.rfind(rest, '?') if i >= 0: rest, query = rest[:i], rest[i+1:] else: query = '' i = string.find(rest, '/') if i >= 0: script, rest = rest[:i], rest[i:] else: script, rest = rest, '' scriptname = dir + '/' + script scriptfile = self.tran...
508dabac60ddd25bfe9e80d24ce242484152da99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/508dabac60ddd25bfe9e80d24ce242484152da99/CGIHTTPServer.py
self.log_error("CGI script exit status x%x" % sts) return try: env = {} env['SERVER_SOFTWARE'] = self.version_string() env['SERVER_NAME'] = self.server.server_name env['GATEWAY_INTERFACE'] = 'CGI/1.1' env['SERVER_PROTOCOL'] = self.protocol_version env['SERVER_PORT'] = str(self.server.server_port) env['REQUEST_METHOD...
self.log_error("CGI script exit status %
def run_cgi(self): """Execute a CGI script.""" dir, rest = self.cgi_info i = string.rfind(rest, '?') if i >= 0: rest, query = rest[:i], rest[i+1:] else: query = '' i = string.find(rest, '/') if i >= 0: script, rest = rest[:i], rest[i:] else: script, rest = rest, '' scriptname = dir + '/' + script scriptfile = self.tran...
508dabac60ddd25bfe9e80d24ce242484152da99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/508dabac60ddd25bfe9e80d24ce242484152da99/CGIHTTPServer.py
env['CONTENT_TYPE'] = self.headers.typeheader length = self.headers.getheader('content-length') if length: env['CONTENT_LENGTH'] = length accept = [] for line in self.headers.getallmatchingheaders('accept'): if line[:1] in string.whitespace: accept.append(string.strip(line)) else: accept = accept + string.split(line[7:...
self.log_error("CGI script exited OK") else: os.environ.update(env) save_argv = sys.argv save_stdin = sys.stdin save_stdout = sys.stdout save_stderr = sys.stderr
def run_cgi(self): """Execute a CGI script.""" dir, rest = self.cgi_info i = string.rfind(rest, '?') if i >= 0: rest, query = rest[:i], rest[i+1:] else: query = '' i = string.find(rest, '/') if i >= 0: script, rest = rest[:i], rest[i:] else: script, rest = rest, '' scriptname = dir + '/' + script scriptfile = self.tran...
508dabac60ddd25bfe9e80d24ce242484152da99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/508dabac60ddd25bfe9e80d24ce242484152da99/CGIHTTPServer.py
os.setuid(nobody) except os.error: pass os.dup2(self.rfile.fileno(), 0) os.dup2(self.wfile.fileno(), 1) print scriptfile, script, decoded_query os.execve(scriptfile, [script, decoded_query], env) except: self.server.handle_error(self.request, self.client_address) os._exit(127)
try: sys.argv = [scriptfile] if '=' not in decoded_query: sys.argv.append(decoded_query) sys.stdout = self.wfile sys.stdin = self.rfile execfile(scriptfile, {"__name__": "__main__"}) finally: sys.argv = save_argv sys.stdin = save_stdin sys.stdout = save_stdout sys.stderr = save_stderr except SystemExit, sts: self.log_e...
def run_cgi(self): """Execute a CGI script.""" dir, rest = self.cgi_info i = string.rfind(rest, '?') if i >= 0: rest, query = rest[:i], rest[i+1:] else: query = '' i = string.find(rest, '/') if i >= 0: script, rest = rest[:i], rest[i:] else: script, rest = rest, '' scriptname = dir + '/' + script scriptfile = self.tran...
508dabac60ddd25bfe9e80d24ce242484152da99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/508dabac60ddd25bfe9e80d24ce242484152da99/CGIHTTPServer.py
import pwd
try: import pwd except ImportError: return -1
def nobody_uid(): """Internal routine to get nobody's uid""" global nobody if nobody: return nobody import pwd try: nobody = pwd.getpwnam('nobody')[2] except KeyError: nobody = 1 + max(map(lambda x: x[2], pwd.getpwall())) return nobody
508dabac60ddd25bfe9e80d24ce242484152da99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/508dabac60ddd25bfe9e80d24ce242484152da99/CGIHTTPServer.py
pass
def __getitem__(self, index): return 2*tuple.__getitem__(self, index)
def test_filter_subclasses(self): # test, that filter() never returns tuple, str or unicode subclasses funcs = (None, lambda x: True) class tuple2(tuple): pass class str2(str): pass inputs = { tuple2: [(), (1,2,3)], str2: ["", "123"] } if have_unicode: class unicode2(unicode): pass inputs[unicode2] = [unicode(), unic...
e03cb0dfb74e6fdef0019740b64cdb246fad25fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e03cb0dfb74e6fdef0019740b64cdb246fad25fa/test_builtin.py
pass
def __getitem__(self, index): return 2*str.__getitem__(self, index)
def test_filter_subclasses(self): # test, that filter() never returns tuple, str or unicode subclasses funcs = (None, lambda x: True) class tuple2(tuple): pass class str2(str): pass inputs = { tuple2: [(), (1,2,3)], str2: ["", "123"] } if have_unicode: class unicode2(unicode): pass inputs[unicode2] = [unicode(), unic...
e03cb0dfb74e6fdef0019740b64cdb246fad25fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e03cb0dfb74e6fdef0019740b64cdb246fad25fa/test_builtin.py
tuple2: [(), (1,2,3)], str2: ["", "123"]
tuple2: {(): (), (1, 2, 3): (1, 2, 3)}, str2: {"": "", "123": "112233"}
def test_filter_subclasses(self): # test, that filter() never returns tuple, str or unicode subclasses funcs = (None, lambda x: True) class tuple2(tuple): pass class str2(str): pass inputs = { tuple2: [(), (1,2,3)], str2: ["", "123"] } if have_unicode: class unicode2(unicode): pass inputs[unicode2] = [unicode(), unic...
e03cb0dfb74e6fdef0019740b64cdb246fad25fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e03cb0dfb74e6fdef0019740b64cdb246fad25fa/test_builtin.py
pass inputs[unicode2] = [unicode(), unicode("123")] for func in funcs: for (cls, inps) in inputs.iteritems(): for inp in inps: out = filter(func, cls(inp)) self.assertEqual(inp, out) self.assert_(not isinstance(out, cls))
def __getitem__(self, index): return 2*unicode.__getitem__(self, index) inputs[unicode2] = { unicode(): unicode(), unicode("123"): unicode("112233") } for (cls, inps) in inputs.iteritems(): for (inp, exp) in inps.iteritems(): self.assertEqual( filter(funcs[0], cls(inp)), filter(funcs[1], cls(inp)) ) for func in func...
def test_filter_subclasses(self): # test, that filter() never returns tuple, str or unicode subclasses funcs = (None, lambda x: True) class tuple2(tuple): pass class str2(str): pass inputs = { tuple2: [(), (1,2,3)], str2: ["", "123"] } if have_unicode: class unicode2(unicode): pass inputs[unicode2] = [unicode(), unic...
e03cb0dfb74e6fdef0019740b64cdb246fad25fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e03cb0dfb74e6fdef0019740b64cdb246fad25fa/test_builtin.py
z = zipfile.ZipFile(zip_filename, "wb",
z = zipfile.ZipFile(zip_filename, "w",
def visit (z, dirname, names): for name in names: path = os.path.normpath(os.path.join(dirname, name)) if os.path.isfile(path): z.write(path, path)
67fcd5b13a40bee688f7df65bd52ee592a620ffc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/67fcd5b13a40bee688f7df65bd52ee592a620ffc/archive_util.py
Optional keyword arg "name" gives the name of the file; by default use the file's name.
Optional keyword arg "name" gives the name of the test; by default use the file's basename.
def testfile(filename, module_relative=True, name=None, package=None, globs=None, verbose=None, report=True, optionflags=0, extraglobs=None, raise_on_error=False): """ Test examples in the given file. Return (#failures, #tests). Optional keyword arg "module_relative" specifies how filenames should be interpreted: - ...
512554883ce339c292aad011060756fcfd9cc849 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/512554883ce339c292aad011060756fcfd9cc849/doctest.py
name = os.path.split(filename)[-1]
name = os.path.basename(filename)
def testfile(filename, module_relative=True, name=None, package=None, globs=None, verbose=None, report=True, optionflags=0, extraglobs=None, raise_on_error=False): """ Test examples in the given file. Return (#failures, #tests). Optional keyword arg "module_relative" specifies how filenames should be interpreted: - ...
512554883ce339c292aad011060756fcfd9cc849 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/512554883ce339c292aad011060756fcfd9cc849/doctest.py
package The name of a Python package. Text-file paths will be interpreted relative to the directory containing this package. The package may be supplied as a package object or as a dotted package name.
def DocTestSuite(module=None, globs=None, extraglobs=None, test_finder=None, **options): """ Convert doctest tests for a module to a unittest test suite. This converts each documentation string in a module that contains doctest tests to a unittest test case. If any of the tests in a doc string fail, then the test cas...
512554883ce339c292aad011060756fcfd9cc849 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/512554883ce339c292aad011060756fcfd9cc849/doctest.py
The name of a set-up function. This is called before running the
A set-up function. This is called before running the
def DocTestSuite(module=None, globs=None, extraglobs=None, test_finder=None, **options): """ Convert doctest tests for a module to a unittest test suite. This converts each documentation string in a module that contains doctest tests to a unittest test case. If any of the tests in a doc string fail, then the test cas...
512554883ce339c292aad011060756fcfd9cc849 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/512554883ce339c292aad011060756fcfd9cc849/doctest.py
The name of a tear-down function. This is called after running the
A tear-down function. This is called after running the
def DocTestSuite(module=None, globs=None, extraglobs=None, test_finder=None, **options): """ Convert doctest tests for a module to a unittest test suite. This converts each documentation string in a module that contains doctest tests to a unittest test case. If any of the tests in a doc string fail, then the test cas...
512554883ce339c292aad011060756fcfd9cc849 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/512554883ce339c292aad011060756fcfd9cc849/doctest.py
name = os.path.split(path)[-1]
name = os.path.basename(path)
def DocFileTest(path, module_relative=True, package=None, globs=None, **options): if globs is None: globs = {} if package and not module_relative: raise ValueError("Package may only be specified for module-" "relative paths.") # Relativize the path. if module_relative: package = _normalize_module(package) path = _mod...
512554883ce339c292aad011060756fcfd9cc849 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/512554883ce339c292aad011060756fcfd9cc849/doctest.py
The name of a set-up function. This is called before running the
A set-up function. This is called before running the
def DocFileSuite(*paths, **kw): """A unittest suite for one or more doctest files. The path to each doctest file is given as a string; the interpretation of that string depends on the keyword argument "module_relative". A number of options may be provided as keyword arguments: module_relative If "module_relative" is...
512554883ce339c292aad011060756fcfd9cc849 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/512554883ce339c292aad011060756fcfd9cc849/doctest.py
The name of a tear-down function. This is called after running the
A tear-down function. This is called after running the
def DocFileSuite(*paths, **kw): """A unittest suite for one or more doctest files. The path to each doctest file is given as a string; the interpretation of that string depends on the keyword argument "module_relative". A number of options may be provided as keyword arguments: module_relative If "module_relative" is...
512554883ce339c292aad011060756fcfd9cc849 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/512554883ce339c292aad011060756fcfd9cc849/doctest.py
__builtin__.credits = _Printer("credits", "Python development is led by BeOpen PythonLabs (www.pythonlabs.com).")
if sys.platform[:4] == 'java': __builtin__.credits = _Printer( "credits", "Jython is maintained by the Jython developers (www.jython.org).") else: __builtin__.credits = _Printer("credits", """\ Thanks to CWI, CNRI, BeOpen.com, Digital Creations and a cast of thousands for supporting Python development. See www.python....
def __call__(self): self.__setup() prompt = 'Hit Return for more, or q (and Return) to quit: ' lineno = 0 while 1: try: for i in range(lineno, lineno + self.MAXLINES): print self.__lines[i] except IndexError: break else: lineno += self.MAXLINES key = None while key is None: key = raw_input(prompt) if key not in ('', 'q...
689a5e3f35f9818cec8d4aa8759faf50f9fe6cbb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/689a5e3f35f9818cec8d4aa8759faf50f9fe6cbb/site.py
def __call__(self): self.__setup() prompt = 'Hit Return for more, or q (and Return) to quit: ' lineno = 0 while 1: try: for i in range(lineno, lineno + self.MAXLINES): print self.__lines[i] except IndexError: break else: lineno += self.MAXLINES key = None while key is None: key = raw_input(prompt) if key not in ('', 'q...
689a5e3f35f9818cec8d4aa8759faf50f9fe6cbb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/689a5e3f35f9818cec8d4aa8759faf50f9fe6cbb/site.py
ctype = msg.get_content_type() main, sub = ctype.split('/')
main = msg.get_content_maintype() sub = msg.get_content_subtype()
def _dispatch(self, msg): # Get the Content-Type: for the message, then try to dispatch to # self._handle_<maintype>_<subtype>(). If there's no handler for the # full MIME type, then dispatch to self._handle_<maintype>(). If # that's missing too, then dispatch to self._writeBody(). ctype = msg.get_content_type() # We...
6ddc394742066416e294e40a3b4e15c56d3654e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6ddc394742066416e294e40a3b4e15c56d3654e5/Generator.py
dict = readmodule_ex(module, path)
dict = _readmodule(module, path)
def readmodule(module, path=[]): '''Backwards compatible interface. Call readmodule_ex() and then only keep Class objects from the resulting dictionary.''' dict = readmodule_ex(module, path) res = {} for key, value in dict.items(): if isinstance(value, Class): res[key] = value return res
69689ec153ac01a51540a5bb3eafceb7eb9c7ba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/69689ec153ac01a51540a5bb3eafceb7eb9c7ba7/pyclbr.py
def readmodule_ex(module, path=[], inpackage=None):
def readmodule_ex(module, path=[]):
def readmodule_ex(module, path=[], inpackage=None): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module. If INPACKAGE is true, it must be the dotted name of the package in ...
69689ec153ac01a51540a5bb3eafceb7eb9c7ba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/69689ec153ac01a51540a5bb3eafceb7eb9c7ba7/pyclbr.py
return _readmodule(module, path) def _readmodule(module, path, inpackage=None): '''Do the hard work for readmodule[_ex].'''
def readmodule_ex(module, path=[], inpackage=None): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module. If INPACKAGE is true, it must be the dotted name of the package in ...
69689ec153ac01a51540a5bb3eafceb7eb9c7ba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/69689ec153ac01a51540a5bb3eafceb7eb9c7ba7/pyclbr.py
parent = readmodule_ex(package, path, inpackage)
parent = _readmodule(package, path, inpackage)
def readmodule_ex(module, path=[], inpackage=None): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module. If INPACKAGE is true, it must be the dotted name of the package in ...
69689ec153ac01a51540a5bb3eafceb7eb9c7ba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/69689ec153ac01a51540a5bb3eafceb7eb9c7ba7/pyclbr.py
return readmodule_ex(submodule, parent['__path__'], package)
return _readmodule(submodule, parent['__path__'], package)
def readmodule_ex(module, path=[], inpackage=None): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module. If INPACKAGE is true, it must be the dotted name of the package in ...
69689ec153ac01a51540a5bb3eafceb7eb9c7ba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/69689ec153ac01a51540a5bb3eafceb7eb9c7ba7/pyclbr.py
classstack = []
stack = []
def readmodule_ex(module, path=[], inpackage=None): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module. If INPACKAGE is true, it must be the dotted name of the package in ...
69689ec153ac01a51540a5bb3eafceb7eb9c7ba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/69689ec153ac01a51540a5bb3eafceb7eb9c7ba7/pyclbr.py
if token == 'def':
if tokentype == DEDENT:
def readmodule_ex(module, path=[], inpackage=None): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module. If INPACKAGE is true, it must be the dotted name of the package in ...
69689ec153ac01a51540a5bb3eafceb7eb9c7ba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/69689ec153ac01a51540a5bb3eafceb7eb9c7ba7/pyclbr.py
while classstack and \ classstack[-1][1] >= thisindent: del classstack[-1] if classstack: cur_class = classstack[-1][0] cur_class._addmethod(meth_name, lineno)
if stack: cur_class = stack[-1][0] if isinstance(cur_class, Class): cur_class._addmethod(meth_name, lineno)
def readmodule_ex(module, path=[], inpackage=None): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module. If INPACKAGE is true, it must be the dotted name of the package in ...
69689ec153ac01a51540a5bb3eafceb7eb9c7ba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/69689ec153ac01a51540a5bb3eafceb7eb9c7ba7/pyclbr.py
while classstack and \ classstack[-1][1] >= thisindent: del classstack[-1]
def readmodule_ex(module, path=[], inpackage=None): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module. If INPACKAGE is true, it must be the dotted name of the package in ...
69689ec153ac01a51540a5bb3eafceb7eb9c7ba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/69689ec153ac01a51540a5bb3eafceb7eb9c7ba7/pyclbr.py
dict[class_name] = cur_class classstack.append((cur_class, thisindent))
if not stack: dict[class_name] = cur_class stack.append((cur_class, thisindent))
def readmodule_ex(module, path=[], inpackage=None): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module. If INPACKAGE is true, it must be the dotted name of the package in ...
69689ec153ac01a51540a5bb3eafceb7eb9c7ba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/69689ec153ac01a51540a5bb3eafceb7eb9c7ba7/pyclbr.py
readmodule_ex(mod, path)
_readmodule(mod, path)
def readmodule_ex(module, path=[], inpackage=None): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module. If INPACKAGE is true, it must be the dotted name of the package in ...
69689ec153ac01a51540a5bb3eafceb7eb9c7ba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/69689ec153ac01a51540a5bb3eafceb7eb9c7ba7/pyclbr.py
readmodule_ex(mod, path, inpackage)
_readmodule(mod, path, inpackage)
def readmodule_ex(module, path=[], inpackage=None): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module. If INPACKAGE is true, it must be the dotted name of the package in ...
69689ec153ac01a51540a5bb3eafceb7eb9c7ba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/69689ec153ac01a51540a5bb3eafceb7eb9c7ba7/pyclbr.py
readmodule_ex(mod)
_readmodule(mod, [])
def readmodule_ex(module, path=[], inpackage=None): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module. If INPACKAGE is true, it must be the dotted name of the package in ...
69689ec153ac01a51540a5bb3eafceb7eb9c7ba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/69689ec153ac01a51540a5bb3eafceb7eb9c7ba7/pyclbr.py
d = readmodule_ex(mod, path, inpackage)
d = _readmodule(mod, path, inpackage)
def readmodule_ex(module, path=[], inpackage=None): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module. If INPACKAGE is true, it must be the dotted name of the package in ...
69689ec153ac01a51540a5bb3eafceb7eb9c7ba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/69689ec153ac01a51540a5bb3eafceb7eb9c7ba7/pyclbr.py
def readmodule_ex(module, path=[], inpackage=None): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module. If INPACKAGE is true, it must be the dotted name of the package in ...
69689ec153ac01a51540a5bb3eafceb7eb9c7ba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/69689ec153ac01a51540a5bb3eafceb7eb9c7ba7/pyclbr.py
if n[0] != '_' and not n in dict:
if n[0] != '_':
def readmodule_ex(module, path=[], inpackage=None): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module. If INPACKAGE is true, it must be the dotted name of the package in ...
69689ec153ac01a51540a5bb3eafceb7eb9c7ba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/69689ec153ac01a51540a5bb3eafceb7eb9c7ba7/pyclbr.py
gui = GUI(Tkinter.Tk()) Tkinter.mainloop()
root = Tkinter.Tk() try: gui = GUI(root) root.mainloop() finally: root.destroy()
def hide(self, event=None): self.stop() self.collapse()
0ee415817fd80544b2e20b98cdc027acc114828e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0ee415817fd80544b2e20b98cdc027acc114828e/pydoc.py
def __init__(self, verbose=0): self.verbose = verbose self.reset()
06ec258349d5b4b9505b011a46f51a2988dc4ad2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/06ec258349d5b4b9505b011a46f51a2988dc4ad2/sgmllib.py
def reset(self): self.rawdata = '' self.stack = [] self.lasttag = '???' self.nomoretags = 0 self.literal = 0
06ec258349d5b4b9505b011a46f51a2988dc4ad2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/06ec258349d5b4b9505b011a46f51a2988dc4ad2/sgmllib.py
def setnomoretags(self): self.nomoretags = self.literal = 1
06ec258349d5b4b9505b011a46f51a2988dc4ad2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/06ec258349d5b4b9505b011a46f51a2988dc4ad2/sgmllib.py
def setliteral(self, *args): self.literal = 1
06ec258349d5b4b9505b011a46f51a2988dc4ad2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/06ec258349d5b4b9505b011a46f51a2988dc4ad2/sgmllib.py
def feed(self, data): self.rawdata = self.rawdata + data self.goahead(0)
06ec258349d5b4b9505b011a46f51a2988dc4ad2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/06ec258349d5b4b9505b011a46f51a2988dc4ad2/sgmllib.py
def report_unbalanced(self, tag): if self.verbose: print '*** Unbalanced </' + tag + '>' print '*** Stack:', self.stack
06ec258349d5b4b9505b011a46f51a2988dc4ad2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/06ec258349d5b4b9505b011a46f51a2988dc4ad2/sgmllib.py
def handle_charref(self, name): try: n = int(name) except ValueError: self.unknown_charref(name) return if not 0 <= n <= 255: self.unknown_charref(name) return self.handle_data(chr(n))
06ec258349d5b4b9505b011a46f51a2988dc4ad2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/06ec258349d5b4b9505b011a46f51a2988dc4ad2/sgmllib.py
curses.pair_content(curses.COLOR_PAIRS)
curses.pair_content(curses.COLOR_PAIRS - 1)
def module_funcs(stdscr): "Test module-level functions" for func in [curses.baudrate, curses.beep, curses.can_change_color, curses.cbreak, curses.def_prog_mode, curses.doupdate, curses.filter, curses.flash, curses.flushinp, curses.has_colors, curses.has_ic, curses.has_il, curses.isendwin, curses.killchar, curses.longn...
0275989c0677b932496d3b5af800041705490549 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0275989c0677b932496d3b5af800041705490549/test_curses.py
pp_opts = _gen_preprocess_options (self.macros + macros, self.include_dirs + includes)
pp_opts = gen_preprocess_options (self.macros + macros, self.include_dirs + includes)
def compile (self, sources, macros=None, includes=None):
dae51d9c5c035e54f5c1d89d17d19642275de37c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dae51d9c5c035e54f5c1d89d17d19642275de37c/unixccompiler.py
def compile (self, sources, macros=None, includes=None):
dae51d9c5c035e54f5c1d89d17d19642275de37c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dae51d9c5c035e54f5c1d89d17d19642275de37c/unixccompiler.py
return self.object_filenames (sources)
def compile (self, sources, macros=None, includes=None):
dae51d9c5c035e54f5c1d89d17d19642275de37c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dae51d9c5c035e54f5c1d89d17d19642275de37c/unixccompiler.py
lib_opts = _gen_lib_options (self.libraries + libraries, self.library_dirs + library_dirs)
lib_opts = gen_lib_options (self.libraries + libraries, self.library_dirs + library_dirs, "-l%s", "-L%s")
def link_shared_object (self, objects, output_filename, libraries=None, library_dirs=None, build_info=None):
dae51d9c5c035e54f5c1d89d17d19642275de37c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dae51d9c5c035e54f5c1d89d17d19642275de37c/unixccompiler.py
def link_shared_object (self, objects, output_filename, libraries=None, library_dirs=None, build_info=None):
dae51d9c5c035e54f5c1d89d17d19642275de37c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dae51d9c5c035e54f5c1d89d17d19642275de37c/unixccompiler.py
def shared_library_filename (self, libname): return "lib%s%s" % (libname, self._shared_lib_ext )
dae51d9c5c035e54f5c1d89d17d19642275de37c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dae51d9c5c035e54f5c1d89d17d19642275de37c/unixccompiler.py
def _gen_preprocess_options (macros, includes): pp_opts = [] for macro in macros: if len (macro) == 1: pp_opts.append ("-U%s" % macro[0]) elif len (macro) == 2: if macro[1] is None: pp_opts.append ("-D%s" % macro[0]) else: pp_opts.append ("-D%s=%s" % macro) for dir in includes: pp_opts.append ("-I%s...
def _split_command (cmd): """Split a command string up into the progam to run (a string) and the list of arguments; return them as (cmd, arglist).""" args = string.split (cmd) return (args[0], args[1:])
dae51d9c5c035e54f5c1d89d17d19642275de37c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dae51d9c5c035e54f5c1d89d17d19642275de37c/unixccompiler.py
cmd = sys.argv[0]
cmd = os.path.basename(sys.argv[0])
def stopped(): print 'pydoc server stopped'
62970a4831d22159269462ae8ec5ca840089ee40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/62970a4831d22159269462ae8ec5ca840089ee40/pydoc.py
g['SO'] = '.ppc.slb'
g['SO'] = '.ppc.slb'
def _init_mac(): """Initialize the module as appropriate for Macintosh systems""" g = {} # set basic install directories g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) # XXX hmmm.. a normal install puts include files here g['INCLUDEPY'] ...
5c10be2bceef819da3ad2838cbf8a78e0d90fc88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5c10be2bceef819da3ad2838cbf8a78e0d90fc88/sysconfig.py
self.passiveserver = 0
self.passiveserver = 1
def connect(self, host = '', port = 0): '''Connect to host. Arguments are: - host: hostname to connect to (string, default previous host) - port: port to connect to (integer, default previous port)''' if host: self.host = host if port: self.port = port self.passiveserver = 0 self.sock = socket.socket(socket.AF_INET, s...
02460e54bc1dbf22607bba735b24824802054edb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/02460e54bc1dbf22607bba735b24824802054edb/ftplib.py
self.compiler = new_compiler (compiler=self.compiler,
self.compiler = new_compiler ( compiler="msvc",
def run (self):
c99d45c8e6af0eee6a4fe351d4786a13ee7f5e03 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c99d45c8e6af0eee6a4fe351d4786a13ee7f5e03/build_ext.py
self.precompile_hook()
def build_extensions (self):
c99d45c8e6af0eee6a4fe351d4786a13ee7f5e03 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c99d45c8e6af0eee6a4fe351d4786a13ee7f5e03/build_ext.py
self.prelink_hook()
if self.compiler.compiler_type == 'msvc': self.msvc_prelink_hack(sources, ext, extra_args)
def build_extensions (self):
c99d45c8e6af0eee6a4fe351d4786a13ee7f5e03 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c99d45c8e6af0eee6a4fe351d4786a13ee7f5e03/build_ext.py
def precompile_hook (self): pass def prelink_hook (self):
def msvc_prelink_hack (self, sources, ext, extra_args):
def find_swig (self): """Return the name of the SWIG executable. On Unix, this is just "swig" -- it should be in the PATH. Tries a bit harder on Windows. """
c99d45c8e6af0eee6a4fe351d4786a13ee7f5e03 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c99d45c8e6af0eee6a4fe351d4786a13ee7f5e03/build_ext.py
if self.compiler.compiler_type == 'msvc': def_file = ext.export_symbol_file if def_file is None: source_dir = os.path.dirname (sources[0]) ext_base = (string.split (ext.name, '.'))[-1] def_file = os.path.join (source_dir, "%s.def" % ext_base) if not os.path.exists (def_file): def_file = None if def_file is not None: e...
def_file = ext.export_symbol_file if def_file is None: source_dir = os.path.dirname (sources[0]) ext_base = (string.split (ext.name, '.'))[-1] def_file = os.path.join (source_dir, "%s.def" % ext_base) if not os.path.exists (def_file): def_file = None if def_file is not None: extra_args.append ('/DEF:' + def_file) els...
def prelink_hook (self):
c99d45c8e6af0eee6a4fe351d4786a13ee7f5e03 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c99d45c8e6af0eee6a4fe351d4786a13ee7f5e03/build_ext.py
def __init__ (self, option_table=None):
61444d2ffebbf180ab1822b82e0de94296448214 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/61444d2ffebbf180ab1822b82e0de94296448214/fancy_getopt.py
assert "invalid option tuple: %r" % (option,)
raise ValueError, "invalid option tuple: %r" % (option,)
def _grok_option_table (self): """Populate the various data structures that keep tabs on the option table. Called by 'getopt()' before it can do anything worthwhile. """ self.long_opts = [] self.short_opts = [] self.short2long.clear() self.repeat = {}
61444d2ffebbf180ab1822b82e0de94296448214 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/61444d2ffebbf180ab1822b82e0de94296448214/fancy_getopt.py
verify(tuple(a).__class__ is tuple)
def rev(self): if self._rev is not None: return self._rev L = list(self) L.reverse() self._rev = self.__class__(L) return self._rev
564d0ea6fb4a27d5dbd1fa2e069af02eb6ba24f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/564d0ea6fb4a27d5dbd1fa2e069af02eb6ba24f9/test_descr.py
def __init__(self, s, charset=None, maxlinelen=MAXLINELEN, header_name=None):
def __init__(self, s, charset=None, maxlinelen=None, header_name=None):
def __init__(self, s, charset=None, maxlinelen=MAXLINELEN, header_name=None): """Create a MIME-compliant header that can contain many languages.
6e140bb39c554f1c25c4fbddbd50829e7ad353ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6e140bb39c554f1c25c4fbddbd50829e7ad353ea/Header.py
The maximum line length can either be specified by maxlinelen, or you can pass in the name of the header field (e.g. "Subject") to let this class guess the best line length to use to prevent wrapping. The default maxlinelen is 76.
The maximum line length can be specified explicitly via maxlinelen. You can also pass None for maxlinelen and the name of a header field (e.g. "Subject") to let the constructor guess the best line length to use. The default maxlinelen is 76.
def __init__(self, s, charset=None, maxlinelen=MAXLINELEN, header_name=None): """Create a MIME-compliant header that can contain many languages.
6e140bb39c554f1c25c4fbddbd50829e7ad353ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6e140bb39c554f1c25c4fbddbd50829e7ad353ea/Header.py
self._maxlinelen = maxlinelen if header_name is not None: self.guess_maxlinelen(header_name)
if maxlinelen is None: if header_name is None: self._maxlinelen = MAXLINELEN else: self.guess_maxlinelen(header_name) else: self._maxlinelen = maxlinelen
def __init__(self, s, charset=None, maxlinelen=MAXLINELEN, header_name=None): """Create a MIME-compliant header that can contain many languages.
6e140bb39c554f1c25c4fbddbd50829e7ad353ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6e140bb39c554f1c25c4fbddbd50829e7ad353ea/Header.py
if charset.encoded_header_len(encoded) < self._maxlinelen:
elen = charset.encoded_header_len(encoded) if elen <= self._maxlinelen:
def _split(self, s, charset): # Split up a header safely for use with encode_chunks. BAW: this # appears to be a private convenience method. splittable = charset.to_splittable(s) encoded = charset.from_splittable(splittable) if charset.encoded_header_len(encoded) < self._maxlinelen: return [(encoded, charset)] else: ...
6e140bb39c554f1c25c4fbddbd50829e7ad353ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6e140bb39c554f1c25c4fbddbd50829e7ad353ea/Header.py
halfway = len(splittable) // 2
halfway = _intdiv2(len(splittable))
def _split(self, s, charset): # Split up a header safely for use with encode_chunks. BAW: this # appears to be a private convenience method. splittable = charset.to_splittable(s) encoded = charset.from_splittable(splittable) if charset.encoded_header_len(encoded) < self._maxlinelen: return [(encoded, charset)] else: ...
6e140bb39c554f1c25c4fbddbd50829e7ad353ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6e140bb39c554f1c25c4fbddbd50829e7ad353ea/Header.py
f="&xxx;" g='&
f="&xxx;" g='& i='x?a=b&c=d;' j='&amp;
def test_attr_values_entities(self): """Substitution of entities and charrefs in attribute values""" # SF bug #1452246 self.check_events("""<a b=&lt; c=&lt;&gt; d=&lt-&gt; e='&lt; ' f="&xxx;" g='&#32;&#33;' h='&#500;' i='x?a=b&c=d;'>""", [("starttag", "a", [("b", "<"), ("c", "<>"), ("d", "&lt->"), ("e", "< "), ("f", "&...
2e812127ee1359e065e6ebb03abf812c9ae2d965 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2e812127ee1359e065e6ebb03abf812c9ae2d965/test_sgmllib.py
("i", "x?a=b&c=d;"), ])])
("i", "x?a=b&c=d;"), ("j", "& ("k", "& ])])
def test_attr_values_entities(self): """Substitution of entities and charrefs in attribute values""" # SF bug #1452246 self.check_events("""<a b=&lt; c=&lt;&gt; d=&lt-&gt; e='&lt; ' f="&xxx;" g='&#32;&#33;' h='&#500;' i='x?a=b&c=d;'>""", [("starttag", "a", [("b", "<"), ("c", "<>"), ("d", "&lt->"), ("e", "< "), ("f", "&...
2e812127ee1359e065e6ebb03abf812c9ae2d965 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2e812127ee1359e065e6ebb03abf812c9ae2d965/test_sgmllib.py
if not self.untagged_responses.has_key('READ-WRITE') \
if self.untagged_responses.has_key('READ-ONLY') \
def select(self, mailbox='INBOX', readonly=None): """Select a mailbox.
1bdb417e4cd336860743322b43795d78449d858b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1bdb417e4cd336860743322b43795d78449d858b/imaplib.py
if self.untagged_responses.has_key('READ-WRITE') \ and self.untagged_responses.has_key('READ-ONLY'): del self.untagged_responses['READ-WRITE']
if self.untagged_responses.has_key('READ-ONLY') \ and not self.is_readonly:
def _command(self, name, *args):
1bdb417e4cd336860743322b43795d78449d858b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1bdb417e4cd336860743322b43795d78449d858b/imaplib.py
def close(f):
def close(self):
def close(f): self.flush()
fd97e1feaf69a7daabb50d229e56278a84dc0f87 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fd97e1feaf69a7daabb50d229e56278a84dc0f87/rexec.py
ok_builtin_modules = ('array', 'binascii', 'audioop', 'imageop', 'marshal', 'math', 'md5', 'parser', 'regex', 'rotor', 'select',
ok_builtin_modules = ('audioop', 'array', 'binascii', 'cmath', 'errno', 'imageop', 'marshal', 'math', 'md5', 'operator', 'parser', 'regex', 'rotor', 'select',
def reload(self, module, path=None): if path is None and hasattr(module, '__filename__'): head, tail = os.path.split(module.__filename__) path = [os.path.join(head, '')] return ihooks.ModuleImporter.reload(self, module, path)
fd97e1feaf69a7daabb50d229e56278a84dc0f87 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fd97e1feaf69a7daabb50d229e56278a84dc0f87/rexec.py
def s_apply(self, func, *args, **kw):
def s_apply(self, func, args=(), kw=None):
def s_apply(self, func, *args, **kw):
fd97e1feaf69a7daabb50d229e56278a84dc0f87 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fd97e1feaf69a7daabb50d229e56278a84dc0f87/rexec.py
r = apply(func, args, kw)
if kw: r = apply(func, args, kw) else: r = apply(func, args)
def s_apply(self, func, *args, **kw):
fd97e1feaf69a7daabb50d229e56278a84dc0f87 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fd97e1feaf69a7daabb50d229e56278a84dc0f87/rexec.py
verify(cf.get('Long Line', 'foo', raw=1) == 'this line is much, much longer than my editor\nlikes it.') def write(src): print "Testing writing of files..." cf = ConfigParser.ConfigParser() sio = StringIO.StringIO(src) cf.readfp(sio) output = StringIO.StringIO() cf.write(output) verify(output, """[DEFAULT] foo = anoth...
def basic(src): print "Testing basic accessors..." cf = ConfigParser.ConfigParser() sio = StringIO.StringIO(src) cf.readfp(sio) L = cf.sections() L.sort() verify(L == [r'Commented Bar', r'Foo Bar', r'Internationalized Stuff', r'Section\with$weird%characters[' '\t', r'Spacey Bar', ], "unexpected list of section names") ...
57961a02232dade12058f2255f5dd12824974868 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/57961a02232dade12058f2255f5dd12824974868/test_cfgparser.py
"http://www.unicode.org/Public/UNIDATA/" + TESTDATAFILE)
"http://www.unicode.org/Public/3.2-Update/" + TESTDATAFILE)
def test_main(): if skip_expected: raise TestSkipped(TESTDATAFILE + " not found, download from " + "http://www.unicode.org/Public/UNIDATA/" + TESTDATAFILE) part1_data = {} for line in open(TESTDATAFILE): if '#' in line: line = line.split('#')[0] line = line.strip() if not line: continue if line.startswith("@Part"): pa...
593e387b2191e7094eb20ea96abda7aaf9003567 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/593e387b2191e7094eb20ea96abda7aaf9003567/test_normalization.py
self._charset = 'iso-8859-1'
self._charset = None
def __init__(self, fp=None): self._info = {} self._charset = 'iso-8859-1' self._fallback = None if fp is not None: self._parse(fp)
ea65fd4bcbd79610ccb598851f7982e74b06a9ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ea65fd4bcbd79610ccb598851f7982e74b06a9ab/gettext.py
if msg.find('\x00') >= 0: msgid1, msgid2 = msg.split('\x00') tmsg = tmsg.split('\x00') if self._coerce: msgid1 = unicode(msgid1, self._charset) tmsg = [unicode(x, self._charset) for x in tmsg] for i in range(len(tmsg)): catalog[(msgid1, i)] = tmsg[i] else: if self._coerce: msg = unicode(msg, self._charset) tmsg = unic...
def _parse(self, fp): """Override this method to support alternative .mo formats.""" unpack = struct.unpack filename = getattr(fp, 'name', '') # Parse the .mo file header, which consists of 5 little endian 32 # bit words. self._catalog = catalog = {} self.plural = lambda n: int(n != 1) # germanic plural by default buf ...
ea65fd4bcbd79610ccb598851f7982e74b06a9ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ea65fd4bcbd79610ccb598851f7982e74b06a9ab/gettext.py
if mlen == 0 and tmsg.lower().startswith('project-id-version:'):
if mlen == 0:
def _parse(self, fp): """Override this method to support alternative .mo formats.""" unpack = struct.unpack filename = getattr(fp, 'name', '') # Parse the .mo file header, which consists of 5 little endian 32 # bit words. self._catalog = catalog = {} self.plural = lambda n: int(n != 1) # germanic plural by default buf ...
ea65fd4bcbd79610ccb598851f7982e74b06a9ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ea65fd4bcbd79610ccb598851f7982e74b06a9ab/gettext.py
k = match.end(0)
self.__starttag_text = rawdata[start_pos:match.end(1) + 1]
def parse_starttag(self, i): rawdata = self.rawdata if shorttagopen.match(rawdata, i): # SGML shorthand: <tag/data/ == <tag>data</tag> # XXX Can data contain &... (entity or char refs)? # XXX Can data contain < or > (tag characters)? # XXX Can there be whitespace before the first /? match = shorttag.match(rawdata, i) i...
31388265a77028c334d6802fc8118850447aba2f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/31388265a77028c334d6802fc8118850447aba2f/sgmllib.py
import mimetools, StringIO headers = mimetools.Message(StringIO.StringIO( 'Content-Length: %d\n' % retrlen)) else: headers = noheaders()
headers += "Content-Length: %d\n" % retrlen headers = mimetools.Message(StringIO.StringIO(headers))
def open_ftp(self, url): """Use FTP protocol.""" 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 = unquote(host) user = unquote(user or '') passwd = unquote...
eb881bfc97a566862dbee054fa76f90a583593fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/eb881bfc97a566862dbee054fa76f90a583593fa/urllib.py
del self._current_context[-1]
self._current_context = self._ns_contexts[-1] del self._ns_contexts[-1]
def endPrefixMapping(self, prefix): del self._current_context[-1]
8b9127bd16aca63117be9739a1e5bb7295ad6e96 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8b9127bd16aca63117be9739a1e5bb7295ad6e96/saxutils.py
class XMLFilterBase:
class XMLFilterBase(xmlreader.XMLReader):
def processingInstruction(self, target, data): self._out.write('<?%s %s?>' % (target, data))
8b9127bd16aca63117be9739a1e5bb7295ad6e96 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8b9127bd16aca63117be9739a1e5bb7295ad6e96/saxutils.py