rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
try: str(u'Hello \u00E1') except Exception, e: sampleUnicodeEncodeError = e try: unicode('\xff') except Exception, e: sampleUnicodeDecodeError = e | def testAttributes(self): # test that exception attributes are happy try: str(u'Hello \u00E1') except Exception, e: sampleUnicodeEncodeError = e | 0ab94afc7a8f9a3238729fdb056a83090166af3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0ab94afc7a8f9a3238729fdb056a83090166af3f/test_exceptions.py | |
(sampleUnicodeEncodeError, {'message' : '', 'args' : ('ascii', u'Hello \xe1', 6, 7, 'ordinal not in range(128)'), 'encoding' : 'ascii', 'object' : u'Hello \xe1', 'start' : 6, 'reason' : 'ordinal not in range(128)'}), (sampleUnicodeDecodeError, | (UnicodeEncodeError, ('ascii', u'a', 0, 1, 'ordinal not in range'), {'message' : '', 'args' : ('ascii', u'a', 0, 1, 'ordinal not in range'), 'encoding' : 'ascii', 'object' : u'a', 'start' : 0, 'reason' : 'ordinal not in range'}), (UnicodeDecodeError, ('ascii', '\xff', 0, 1, 'ordinal not in range'), | def testAttributes(self): # test that exception attributes are happy try: str(u'Hello \u00E1') except Exception, e: sampleUnicodeEncodeError = e | 0ab94afc7a8f9a3238729fdb056a83090166af3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0ab94afc7a8f9a3238729fdb056a83090166af3f/test_exceptions.py |
'ordinal not in range(128)'), | 'ordinal not in range'), | def testAttributes(self): # test that exception attributes are happy try: str(u'Hello \u00E1') except Exception, e: sampleUnicodeEncodeError = e | 0ab94afc7a8f9a3238729fdb056a83090166af3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0ab94afc7a8f9a3238729fdb056a83090166af3f/test_exceptions.py |
'start' : 0, 'reason' : 'ordinal not in range(128)'}), | 'start' : 0, 'reason' : 'ordinal not in range'}), | def testAttributes(self): # test that exception attributes are happy try: str(u'Hello \u00E1') except Exception, e: sampleUnicodeEncodeError = e | 0ab94afc7a8f9a3238729fdb056a83090166af3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0ab94afc7a8f9a3238729fdb056a83090166af3f/test_exceptions.py |
for args in exceptionList: expected = args[-1] try: exc = args[0] if len(args) == 2: raise exc else: raise exc(*args[1]) | for exc, args, expected in exceptionList: try: raise exc(*args) | def testAttributes(self): # test that exception attributes are happy try: str(u'Hello \u00E1') except Exception, e: sampleUnicodeEncodeError = e | 0ab94afc7a8f9a3238729fdb056a83090166af3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0ab94afc7a8f9a3238729fdb056a83090166af3f/test_exceptions.py |
if (e is not exc and type(e) is not exc): | if type(e) is not exc: | def testAttributes(self): # test that exception attributes are happy try: str(u'Hello \u00E1') except Exception, e: sampleUnicodeEncodeError = e | 0ab94afc7a8f9a3238729fdb056a83090166af3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0ab94afc7a8f9a3238729fdb056a83090166af3f/test_exceptions.py |
if timer is None: if os.name == 'mac': | if not timer: if _has_res: self.timer = resgetrusage self.dispatcher = self.trace_dispatch self.get_time = _get_time_resource elif os.name == 'mac': | def __init__(self, timer=None, bias=None): self.timings = {} self.cur = None self.cmd = "" self.c_func_name = "" | 31fcde5b2c5e001a0082c7c3281ca8b1a7fcc545 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/31fcde5b2c5e001a0082c7c3281ca8b1a7fcc545/profile.py |
self._ssnd_chunk.setpos(pos + 8) | self._ssnd_chunk.seek(pos + 8) | def readframes(self, nframes): if self._ssnd_seek_needed: self._ssnd_chunk.seek(0) dummy = self._ssnd_chunk.read(8) pos = self._soundpos * self._framesize if pos: self._ssnd_chunk.setpos(pos + 8) self._ssnd_seek_needed = 0 if nframes == 0: return '' data = self._ssnd_chunk.read(nframes * self._framesize) if self._conve... | 2b7c6c6aba980bcafd52088c7232b07929cae35a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2b7c6c6aba980bcafd52088c7232b07929cae35a/aifc.py |
start = min(start, len(lines) - context) | start = max(0, min(start, len(lines) - context)) | 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... | e5411c6def5dc1a466ad62449156bb020aabbab5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e5411c6def5dc1a466ad62449156bb020aabbab5/inspect.py |
print "db.h: found", db_ver, "in", d | if db_setup_debug: print "db.h: found", db_ver, "in", d | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 41fa2fc8450be53624a99dd73f70788ff44dca9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/41fa2fc8450be53624a99dd73f70788ff44dca9e/setup.py |
print "db lib: using", db_ver, dblib if db_setup_debug: print "db: lib dir", dblib_dir, "inc dir", db_incdir | if db_setup_debug: print "db lib: using", db_ver, dblib print "db: lib dir", dblib_dir, "inc dir", db_incdir | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 41fa2fc8450be53624a99dd73f70788ff44dca9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/41fa2fc8450be53624a99dd73f70788ff44dca9e/setup.py |
sqlite_setup_debug = True | sqlite_setup_debug = False | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 41fa2fc8450be53624a99dd73f70788ff44dca9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/41fa2fc8450be53624a99dd73f70788ff44dca9e/setup.py |
print "%s/sqlite3.h: version %s"%(d, sqlite_version) | if sqlite_setup_debug: print "%s/sqlite3.h: version %s"%(d, sqlite_version) | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 41fa2fc8450be53624a99dd73f70788ff44dca9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/41fa2fc8450be53624a99dd73f70788ff44dca9e/setup.py |
if self.license: self.licence = 1 | def parse_command_line (self, args): """Parse the setup script's command line: set any Distribution attributes tied to command-line options, create all command objects, and set their options from the command-line. 'args' must be a list of command-line arguments, most likely 'sys.argv[1:]' (see the 'setup()' function).... | b5cf2663039d3428dbbcf860e4999fbe3561b2ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b5cf2663039d3428dbbcf860e4999fbe3561b2ab/dist.py | |
self.write(STOP) def dump_special(self, callable, args, state = None): if type(args) is not TupleType and args is not None: raise PicklingError, "Second argument to dump_special " \ "must be a tuple" self.save_reduce(callable, args, state) | def dump(self, object): self.save(object) self.write(STOP) | b71c45dff2998a741337d10d17805f110aef88be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b71c45dff2998a741337d10d17805f110aef88be/pickle.py | |
def save_float(self, object): self.write(FLOAT + `object` + '\n') | def save_float(self, object, pack=struct.pack): if self.bin: self.write(BINFLOAT + pack('>d', object)) else: self.write(FLOAT + `object` + '\n') | def save_float(self, object): self.write(FLOAT + `object` + '\n') | b71c45dff2998a741337d10d17805f110aef88be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b71c45dff2998a741337d10d17805f110aef88be/pickle.py |
return self.reader.next() | data = self.reader.next() data, bytesencoded = self.encode(data, self.errors) return data | def next(self): | c9230f90ba16cbac6ae85ac9a6fc2d7245d03482 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c9230f90ba16cbac6ae85ac9a6fc2d7245d03482/codecs.py |
msg['Content-Transfer-Encoding'] = '8bit' | charset = msg.get_charset() output_cset = charset and charset.output_charset if output_cset and output_cset.lower().startswith('iso-2202-'): msg['Content-Transfer-Encoding'] = '7bit' else: msg['Content-Transfer-Encoding'] = '8bit' | def encode_7or8bit(msg): """Set the Content-Transfer-Encoding header to 7bit or 8bit.""" orig = msg.get_payload() if orig is None: # There's no payload. For backwards compatibility we use 7bit msg['Content-Transfer-Encoding'] = '7bit' return # We play a trick to make this go fast. If encoding to ASCII succeeds, we # ... | eeaee2e300e46ee84343b5514c2ecab3c6138995 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/eeaee2e300e46ee84343b5514c2ecab3c6138995/Encoders.py |
print '-%20.20s %20.20 %-30.30s'%(f, d[5:], s) | print '-%20.20s %20.20s %-30.30s'%(f, d[5:], s) | def _test(): import time import sys import string import os args = sys.argv[1:] if not args: for key in 'MAILDIR', 'MAIL', 'LOGNAME', 'USER': if os.environ.has_key(key): mbox = os.environ[key] break else: print "$MAIL, $LOGNAME nor $USER set -- who are you?" return else: mbox = args[0] if mbox[:1] == '+': mbox = os.en... | 779c338bfa7e134db9e4ce8d79173cd80f4f652e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/779c338bfa7e134db9e4ce8d79173cd80f4f652e/mailbox.py |
self.pimpinstaller = pimp.PimpInstaller(self.pimpdb) | def setuppimp(self, url): self.pimpprefs = pimp.PimpPreferences() self.pimpdb = pimp.PimpDatabase(self.pimpprefs) self.pimpinstaller = pimp.PimpInstaller(self.pimpdb) if not url: url = self.pimpprefs.pimpDatabase try: self.pimpdb.appendURL(url) except IOError, arg: rv = "Cannot open %s: %s\n" % (url, arg) rv += "\nSee ... | 8a7c1c518eafd321426cd09e70c7c4c0ea5256ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8a7c1c518eafd321426cd09e70c7c4c0ea5256ab/PackageManager.py | |
self.pimpinstaller = None | def closepimp(self): self.pimpdb.close() self.pimpprefs = None self.pimpdb = None self.pimpinstaller = None self.packages = [] | 8a7c1c518eafd321426cd09e70c7c4c0ea5256ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8a7c1c518eafd321426cd09e70c7c4c0ea5256ab/PackageManager.py | |
list, messages = self.pimpinstaller.prepareInstall(pkg, force, recursive) | pimpinstaller = pimp.PimpInstaller(self.pimpdb) list, messages = pimpinstaller.prepareInstall(pkg, force, recursive) | def installpackage(self, sel, output, recursive, force): pkg = self.packages[sel] list, messages = self.pimpinstaller.prepareInstall(pkg, force, recursive) if messages: return messages messages = self.pimpinstaller.install(list, output) return messages | 8a7c1c518eafd321426cd09e70c7c4c0ea5256ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8a7c1c518eafd321426cd09e70c7c4c0ea5256ab/PackageManager.py |
messages = self.pimpinstaller.install(list, output) | messages = pimpinstaller.install(list, output) | def installpackage(self, sel, output, recursive, force): pkg = self.packages[sel] list, messages = self.pimpinstaller.prepareInstall(pkg, force, recursive) if messages: return messages messages = self.pimpinstaller.install(list, output) return messages | 8a7c1c518eafd321426cd09e70c7c4c0ea5256ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8a7c1c518eafd321426cd09e70c7c4c0ea5256ab/PackageManager.py |
self.libs = None | self.libraries = None | self.undef = None | b88ce739cc9c3e3ea5ab098a7c55dd9a8e7bd501 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b88ce739cc9c3e3ea5ab098a7c55dd9a8e7bd501/build_ext.py |
if type (self.libs) is StringType: self.libs = [self.libs] | if type (self.libraries) is StringType: self.libraries = [self.libraries] | def finalize_options (self): from distutils import sysconfig | b88ce739cc9c3e3ea5ab098a7c55dd9a8e7bd501 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b88ce739cc9c3e3ea5ab098a7c55dd9a8e7bd501/build_ext.py |
if self.libs is not None: self.compiler.set_libraries (self.libs) | if self.libraries is not None: self.compiler.set_libraries (self.libraries) | if self.undef is not None: for macro in self.undef: self.compiler.undefine_macro (macro) | b88ce739cc9c3e3ea5ab098a7c55dd9a8e7bd501 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b88ce739cc9c3e3ea5ab098a7c55dd9a8e7bd501/build_ext.py |
if self.distribution.libraries: build_clib = self.find_peer ('build_clib') self.libraries = build_clib.get_library_names () or [] self.library_dirs = [build_clib.build_clib] else: self.libraries = [] self.library_dirs = [] | if self.undef is not None: for macro in self.undef: self.compiler.undefine_macro (macro) | b88ce739cc9c3e3ea5ab098a7c55dd9a8e7bd501 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b88ce739cc9c3e3ea5ab098a7c55dd9a8e7bd501/build_ext.py | |
libraries = (self.libraries + (build_info.get ('libraries') or [])) library_dirs = (self.library_dirs + (build_info.get ('library_dirs') or [])) | libraries = build_info.get ('libraries') library_dirs = build_info.get ('library_dirs') rpath = build_info.get ('rpath') | def build_extensions (self, extensions): | b88ce739cc9c3e3ea5ab098a7c55dd9a8e7bd501 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b88ce739cc9c3e3ea5ab098a7c55dd9a8e7bd501/build_ext.py |
"math.floor(huge)", "math.floor(mhuge)", "float(shuge) == int(shuge)"]: | "math.floor(huge)", "math.floor(mhuge)"]: | def test_float_overflow(): import math if verbose: print "long->float overflow" for x in -2.0, -1.0, 0.0, 1.0, 2.0: verify(float(long(x)) == x) shuge = '12345' * 120 huge = 1L << 30000 mhuge = -huge namespace = {'huge': huge, 'mhuge': mhuge, 'shuge': shuge, 'math': math} for test in ["float(huge)", "float(mhuge)", "... | 0ce20fe76112d4e6ed624643ec1eb01c6c456cb0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0ce20fe76112d4e6ed624643ec1eb01c6c456cb0/test_long.py |
print __doc__ % globals() | def usage(status, msg=''): if msg: print msg print __doc__ % globals() sys.exit(status) | 1ee02ac8d14d271ef84b6fc6d1242e8698834b8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1ee02ac8d14d271ef84b6fc6d1242e8698834b8f/Main.py | |
break | if colordb: break | def main(): try: opts, args = getopt.getopt( sys.argv[1:], 'hd:', ['database=', 'help']) except getopt.error, msg: usage(1, msg) if len(args) == 0: initialcolor = 'grey50' elif len(args) == 1: initialcolor = args[0] else: usage(1) for opt, arg in opts: if opt in ('-h', '--help'): usage(0) elif opt in ('-d', '--databa... | 1ee02ac8d14d271ef84b6fc6d1242e8698834b8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1ee02ac8d14d271ef84b6fc6d1242e8698834b8f/Main.py |
raise IOError('No color database file found') | usage(1, 'No color database file found, see the -d option.') | def main(): try: opts, args = getopt.getopt( sys.argv[1:], 'hd:', ['database=', 'help']) except getopt.error, msg: usage(1, msg) if len(args) == 0: initialcolor = 'grey50' elif len(args) == 1: initialcolor = args[0] else: usage(1) for opt, arg in opts: if opt in ('-h', '--help'): usage(0) elif opt in ('-d', '--databa... | 1ee02ac8d14d271ef84b6fc6d1242e8698834b8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1ee02ac8d14d271ef84b6fc6d1242e8698834b8f/Main.py |
if msilib.msi_type=="Intel64;1033": sqlite_arch = "/ia64" elif msilib.msi_type=="x64;1033": sqlite_arch = "/amd64" else: sqlite_arch = "" lib.add_file(srcdir+"/"+sqlite_dir+sqlite_arch+"/sqlite3.dll") | def add_files(db): cab = CAB("python") tmpfiles = [] # Add all executables, icons, text files into the TARGETDIR component root = PyDirectory(db, cab, None, srcdir, "TARGETDIR", "SourceDir") default_feature.set_current() if not msilib.Win64: root.add_file("PCBuild/w9xpopen.exe") root.add_file("README.txt", src="README"... | d0fd5857e7d882bd6ce5e11c648cffa89a2e1684 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d0fd5857e7d882bd6ce5e11c648cffa89a2e1684/msi.py | |
pardir_fsr = Carbon.File.FSRef(fss) | pardir_fsr = Carbon.File.FSRef(pardir_fss) | def AskFileForSave(**args): default_flags = 0x07 args, tpwanted = _process_Nav_args(args, _ALLOWED_KEYS, default_flags) try: rr = Nav.NavPutFile(args) good = 1 except Nav.error, arg: if arg[0] != -128: # userCancelledErr raise Nav.error, arg return None if not rr.validRecord or not rr.selection: return None if issubcla... | 00340bc71b641d03738eb31d4a9d4567682de3c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/00340bc71b641d03738eb31d4a9d4567682de3c7/EasyDialogs.py |
return sys.modules[fqname] | module = sys.modules[fqname] module.__name__ = fqname return module | def _process_result(self, (ispkg, code, values), fqname): # did get_code() return an actual module? (rather than a code object) is_module = isinstance(code, _ModuleType) | 1db845d44183885cb9b6d2470e8007e63688c44b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1db845d44183885cb9b6d2470e8007e63688c44b/imputil.py |
result = interact(handler.load(), 'System-wide preferences') | options = handler.load() if options['noargs']: EasyDialogs.Message('Warning: system-wide sys.argv processing is off.\nIf you dropped an applet I have not seen it.') result = interact(options, 'System-wide preferences') | def edit_preferences(): handler = pythonprefs.PythonOptions() result = interact(handler.load(), 'System-wide preferences') if result: handler.save(result) | df34f5a8e0a42e0d6825e64214c2eaf4dc105f7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/df34f5a8e0a42e0d6825e64214c2eaf4dc105f7f/EditPythonPrefs.py |
import pprint pprint.pprint(self.__dict__) | pass | def report(self): # XXX something decent import pprint pprint.pprint(self.__dict__) | 1d9481c0312908f2dc99ed25ccd52498b1818355 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1d9481c0312908f2dc99ed25ccd52498b1818355/bundlebuilder.py |
SITE_CO = compile(SITE_PY, "<-bundlebuilder->", "exec") | SITE_CO = compile(SITE_PY, "<-bundlebuilder.py->", "exec") | def report(self): # XXX something decent import pprint pprint.pprint(self.__dict__) | 1d9481c0312908f2dc99ed25ccd52498b1818355 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1d9481c0312908f2dc99ed25ccd52498b1818355/bundlebuilder.py |
EXECVE_WRAPPER = """\ import os from sys import argv, executable resources = os.path.join(os.path.dirname(os.path.dirname(argv[0])), "Resources") mainprogram = os.path.join(resources, "%(mainprogram)s") assert os.path.exists(mainprogram) argv.insert(1, mainprogram) os.environ["PYTHONPATH"] = resources %(setexecutable... | BOOTSTRAP_SCRIPT = """\ execdir=$(dirname ${0}) executable=${execdir}/%(executable)s resdir=$(dirname ${execdir})/Resources main=${resdir}/%(mainprogram)s PYTHONPATH=$resdir export PYTHONPATH exec ${executable} ${main} ${1} | def report(self): # XXX something decent import pprint pprint.pprint(self.__dict__) | 1d9481c0312908f2dc99ed25ccd52498b1818355 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1d9481c0312908f2dc99ed25ccd52498b1818355/bundlebuilder.py |
setExecutableTemplate = """executable = os.path.join(resources, "%s")""" pythonhomeSnippet = """os.environ["home"] = resources""" | def report(self): # XXX something decent import pprint pprint.pprint(self.__dict__) | 1d9481c0312908f2dc99ed25ccd52498b1818355 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1d9481c0312908f2dc99ed25ccd52498b1818355/bundlebuilder.py | |
if self.executable is None: self.executable = sys.executable | def setup(self): if self.standalone and self.mainprogram is None: raise BundleBuilderError, ("must specify 'mainprogram' when " "building a standalone application.") if self.mainprogram is None and self.executable is None: raise BundleBuilderError, ("must specify either or both of " "'executable' and 'mainprogram'") | 1d9481c0312908f2dc99ed25ccd52498b1818355 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1d9481c0312908f2dc99ed25ccd52498b1818355/bundlebuilder.py | |
execpath = pathjoin(self.execdir, self.name) | execname = self.name | def preProcess(self): resdir = "Contents/Resources" if self.executable is not None: if self.mainprogram is None: execpath = pathjoin(self.execdir, self.name) else: execpath = pathjoin(resdir, os.path.basename(self.executable)) if not self.symlink_exec: self.files.append((self.executable, execpath)) self.binaries.append... | 1d9481c0312908f2dc99ed25ccd52498b1818355 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1d9481c0312908f2dc99ed25ccd52498b1818355/bundlebuilder.py |
execpath = pathjoin(resdir, os.path.basename(self.executable)) | execname = os.path.basename(self.executable) execpath = pathjoin(self.execdir, execname) | def preProcess(self): resdir = "Contents/Resources" if self.executable is not None: if self.mainprogram is None: execpath = pathjoin(self.execdir, self.name) else: execpath = pathjoin(resdir, os.path.basename(self.executable)) if not self.symlink_exec: self.files.append((self.executable, execpath)) self.binaries.append... | 1d9481c0312908f2dc99ed25ccd52498b1818355 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1d9481c0312908f2dc99ed25ccd52498b1818355/bundlebuilder.py |
setexecutable = setExecutableTemplate % os.path.basename(self.executable) else: setexecutable = "" | def preProcess(self): resdir = "Contents/Resources" if self.executable is not None: if self.mainprogram is None: execpath = pathjoin(self.execdir, self.name) else: execpath = pathjoin(resdir, os.path.basename(self.executable)) if not self.symlink_exec: self.files.append((self.executable, execpath)) self.binaries.append... | 1d9481c0312908f2dc99ed25ccd52498b1818355 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1d9481c0312908f2dc99ed25ccd52498b1818355/bundlebuilder.py | |
open(mainwrapperpath, "w").write(EXECVE_WRAPPER % locals()) | open(mainwrapperpath, "w").write(BOOTSTRAP_SCRIPT % locals()) | def preProcess(self): resdir = "Contents/Resources" if self.executable is not None: if self.mainprogram is None: execpath = pathjoin(self.execdir, self.name) else: execpath = pathjoin(resdir, os.path.basename(self.executable)) if not self.symlink_exec: self.files.append((self.executable, execpath)) self.binaries.append... | 1d9481c0312908f2dc99ed25ccd52498b1818355 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1d9481c0312908f2dc99ed25ccd52498b1818355/bundlebuilder.py |
if self.missingModules: | if self.missingModules or self.maybeMissingModules: | def postProcess(self): self.addPythonModules() if self.strip and not self.symlink: self.stripBinaries() | 1d9481c0312908f2dc99ed25ccd52498b1818355 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1d9481c0312908f2dc99ed25ccd52498b1818355/bundlebuilder.py |
self.missingModules.extend(mf.any_missing()) | if hasattr(mf, "any_missing_maybe"): missing, maybe = mf.any_missing_maybe() else: missing = mf.any_missing() maybe = [] self.missingModules.extend(missing) self.maybeMissingModules.extend(maybe) | def findDependencies(self): self.message("Finding module dependencies", 1) import modulefinder mf = modulefinder.ModuleFinder(excludes=self.excludeModules) # manually add our own site.py site = mf.add_module("site") site.__code__ = SITE_CO mf.scan_code(SITE_CO, site) | 1d9481c0312908f2dc99ed25ccd52498b1818355 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1d9481c0312908f2dc99ed25ccd52498b1818355/bundlebuilder.py |
missingsub = [name for name in missing if "." in name] missing = [name for name in missing if "." not in name] | if self.maybeMissingModules: maybe = self.maybeMissingModules else: maybe = [name for name in missing if "." in name] missing = [name for name in missing if "." not in name] | def reportMissing(self): missing = [name for name in self.missingModules if name not in MAYMISS_MODULES] missingsub = [name for name in missing if "." in name] missing = [name for name in missing if "." not in name] missing.sort() missingsub.sort() if missing: self.message("Warning: couldn't find the following modules:... | 1d9481c0312908f2dc99ed25ccd52498b1818355 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1d9481c0312908f2dc99ed25ccd52498b1818355/bundlebuilder.py |
missingsub.sort() | maybe.sort() if maybe: self.message("Warning: couldn't find the following submodules:", 1) self.message(" (Note that these could be false alarms -- " "it's not always", 1) self.message(" possible to distinguish between from \"package import submodule\" ", 1) self.message(" and \"from package import name\")", 1... | def reportMissing(self): missing = [name for name in self.missingModules if name not in MAYMISS_MODULES] missingsub = [name for name in missing if "." in name] missing = [name for name in missing if "." not in name] missing.sort() missingsub.sort() if missing: self.message("Warning: couldn't find the following modules:... | 1d9481c0312908f2dc99ed25ccd52498b1818355 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1d9481c0312908f2dc99ed25ccd52498b1818355/bundlebuilder.py |
self.message(" " + ", ".join(missing)) if missingsub: self.message("Warning: couldn't find the following submodules " "(but it's probably OK since modulefinder can't distinguish " "between from \"module import submodule\" and " "\"from module import name\"):", 1) self.message(" " + ", ".join(missingsub)) | for name in missing: self.message(" ? " + name, 1) def report(self): import pprint pprint.pprint(self.__dict__) if self.standalone: self.reportMissing() | def reportMissing(self): missing = [name for name in self.missingModules if name not in MAYMISS_MODULES] missingsub = [name for name in missing if "." in name] missing = [name for name in missing if "." not in name] missing.sort() missingsub.sort() if missing: self.message("Warning: couldn't find the following modules:... | 1d9481c0312908f2dc99ed25ccd52498b1818355 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1d9481c0312908f2dc99ed25ccd52498b1818355/bundlebuilder.py |
return self._qsize - self.getfilled() | return (self._qsize / self._nchannels / self._sampwidth) - self.getfilled() | def getfillable(self): return self._qsize - self.getfilled() | be72e118c6c4e6621615492b3a2f596d79a91168 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/be72e118c6c4e6621615492b3a2f596d79a91168/Audio_mac.py |
if op in (LITERAL, NOT_LITERAL): | if op in LITERAL_CODES: | def _compile(code, pattern, flags): # internal: compile a (sub)pattern emit = code.append for op, av in pattern: if op in (LITERAL, NOT_LITERAL): if flags & SRE_FLAG_IGNORECASE: emit(OPCODES[OP_IGNORE[op]]) emit(_sre.getlower(av, flags)) else: emit(OPCODES[op]) emit(av) elif op is IN: if flags & SRE_FLAG_IGNORECASE: em... | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
fixup = lambda x: x skip = len(code); emit(0) | fixup = _identityfunction skip = _len(code); emit(0) | def fixup(literal, flags=flags): return _sre.getlower(literal, flags) | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
code[skip] = len(code) - skip | code[skip] = _len(code) - skip | def fixup(literal, flags=flags): return _sre.getlower(literal, flags) | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
elif op in (REPEAT, MIN_REPEAT, MAX_REPEAT): | elif op in REPEATING_CODES: | def fixup(literal, flags=flags): return _sre.getlower(literal, flags) | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
skip = len(code); emit(0) | skip = _len(code); emit(0) | def fixup(literal, flags=flags): return _sre.getlower(literal, flags) | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
code[skip] = len(code) - skip elif _simple(av) and op != REPEAT: if op == MAX_REPEAT: | code[skip] = _len(code) - skip elif _simple(av) and op is not REPEAT: if op is MAX_REPEAT: | def fixup(literal, flags=flags): return _sre.getlower(literal, flags) | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
skip = len(code); emit(0) | skip = _len(code); emit(0) | def fixup(literal, flags=flags): return _sre.getlower(literal, flags) | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
code[skip] = len(code) - skip | code[skip] = _len(code) - skip | def fixup(literal, flags=flags): return _sre.getlower(literal, flags) | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
skip = len(code); emit(0) | skip = _len(code); emit(0) | def fixup(literal, flags=flags): return _sre.getlower(literal, flags) | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
code[skip] = len(code) - skip if op == MAX_REPEAT: | code[skip] = _len(code) - skip if op is MAX_REPEAT: | def fixup(literal, flags=flags): return _sre.getlower(literal, flags) | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
elif op in (SUCCESS, FAILURE): emit(OPCODES[op]) elif op in (ASSERT, ASSERT_NOT): emit(OPCODES[op]) skip = len(code); emit(0) | elif op in SUCCESS_CODES: emit(OPCODES[op]) elif op in ASSERT_CODES: emit(OPCODES[op]) skip = _len(code); emit(0) | def fixup(literal, flags=flags): return _sre.getlower(literal, flags) | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
code[skip] = len(code) - skip | code[skip] = _len(code) - skip | def fixup(literal, flags=flags): return _sre.getlower(literal, flags) | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
skip = len(code); emit(0) | skip = _len(code); emit(0) | def fixup(literal, flags=flags): return _sre.getlower(literal, flags) | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
code[skip] = len(code) - skip | code[skip] = _len(code) - skip | def fixup(literal, flags=flags): return _sre.getlower(literal, flags) | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
skip = len(code); emit(0) | skip = _len(code); emit(0) | def fixup(literal, flags=flags): return _sre.getlower(literal, flags) | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
tail.append(len(code)); emit(0) code[skip] = len(code) - skip | tailappend(_len(code)); emit(0) code[skip] = _len(code) - skip | def fixup(literal, flags=flags): return _sre.getlower(literal, flags) | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
code[tail] = len(code) - tail | code[tail] = _len(code) - tail | def fixup(literal, flags=flags): return _sre.getlower(literal, flags) | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
skipyes = len(code); emit(0) | skipyes = _len(code); emit(0) | def fixup(literal, flags=flags): return _sre.getlower(literal, flags) | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
skipno = len(code); emit(0) code[skipyes] = len(code) - skipyes + 1 | skipno = _len(code); emit(0) code[skipyes] = _len(code) - skipyes + 1 | def fixup(literal, flags=flags): return _sre.getlower(literal, flags) | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
code[skipno] = len(code) - skipno else: code[skipyes] = len(code) - skipyes + 1 | code[skipno] = _len(code) - skipno else: code[skipyes] = _len(code) - skipyes + 1 | def fixup(literal, flags=flags): return _sre.getlower(literal, flags) | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
fixup = lambda x: x | fixup = _identityfunction | def _compile_charset(charset, flags, code, fixup=None): # compile charset subprogram emit = code.append if fixup is None: fixup = lambda x: x for op, av in _optimize_charset(charset, fixup): emit(OPCODES[op]) if op is NEGATE: pass elif op is LITERAL: emit(fixup(av)) elif op is RANGE: emit(fixup(av[0])) emit(fixup(av[1]... | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
out.append((op, av)) | outappend((op, av)) | def _optimize_charset(charset, fixup): # internal: optimize character set out = [] charmap = [False]*256 try: for op, av in charset: if op is NEGATE: out.append((op, av)) elif op is LITERAL: charmap[fixup(av)] = True elif op is RANGE: for i in range(fixup(av[0]), fixup(av[1])+1): charmap[i] = True elif op is CATEGORY: ... | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
runs.append((p, n)) | runsappend((p, n)) | def _optimize_charset(charset, fixup): # internal: optimize character set out = [] charmap = [False]*256 try: for op, av in charset: if op is NEGATE: out.append((op, av)) elif op is LITERAL: charmap[fixup(av)] = True elif op is RANGE: for i in range(fixup(av[0]), fixup(av[1])+1): charmap[i] = True elif op is CATEGORY: ... | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
runs.append((p, n)) | runsappend((p, n)) | def _optimize_charset(charset, fixup): # internal: optimize character set out = [] charmap = [False]*256 try: for op, av in charset: if op is NEGATE: out.append((op, av)) elif op is LITERAL: charmap[fixup(av)] = True elif op is RANGE: for i in range(fixup(av[0]), fixup(av[1])+1): charmap[i] = True elif op is CATEGORY: ... | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
out.append((LITERAL, p)) else: out.append((RANGE, (p, p+n-1))) | outappend((LITERAL, p)) else: outappend((RANGE, (p, p+n-1))) | def _optimize_charset(charset, fixup): # internal: optimize character set out = [] charmap = [False]*256 try: for op, av in charset: if op is NEGATE: out.append((op, av)) elif op is LITERAL: charmap[fixup(av)] = True elif op is RANGE: for i in range(fixup(av[0]), fixup(av[1])+1): charmap[i] = True elif op is CATEGORY: ... | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
out.append((CHARSET, data)) | outappend((CHARSET, data)) | def _optimize_charset(charset, fixup): # internal: optimize character set out = [] charmap = [False]*256 try: for op, av in charset: if op is NEGATE: out.append((op, av)) elif op is LITERAL: charmap[fixup(av)] = True elif op is RANGE: for i in range(fixup(av[0]), fixup(av[1])+1): charmap[i] = True elif op is CATEGORY: ... | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
m = m << 1 | m = m + m | def _mk_bitmap(bits): data = [] if _sre.CODESIZE == 2: start = (1, 0) else: start = (1L, 0L) m, v = start for c in bits: if c: v = v + m m = m << 1 if m > MAXCODE: data.append(v) m, v = start return data | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
data.append(v) | dataappend(v) | def _mk_bitmap(bits): data = [] if _sre.CODESIZE == 2: start = (1, 0) else: start = (1L, 0L) m, v = start for c in bits: if c: v = v + m m = m << 1 if m > MAXCODE: data.append(v) m, v = start return data | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
for i in range(fixup(av[0]), fixup(av[1])+1): | for i in xrange(fixup(av[0]), fixup(av[1])+1): | def _optimize_unicode(charset, fixup): try: import array except ImportError: return charset charmap = [False]*65536 negate = 0 try: for op, av in charset: if op is NEGATE: negate = 1 elif op is LITERAL: charmap[fixup(av)] = True elif op is RANGE: for i in range(fixup(av[0]), fixup(av[1])+1): charmap[i] = True elif op i... | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
for i in range(65536): | for i in xrange(65536): | def _optimize_unicode(charset, fixup): try: import array except ImportError: return charset charmap = [False]*65536 negate = 0 try: for op, av in charset: if op is NEGATE: negate = 1 elif op is LITERAL: charmap[fixup(av)] = True elif op is RANGE: for i in range(fixup(av[0]), fixup(av[1])+1): charmap[i] = True elif op i... | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
for i in range(256): | for i in xrange(256): | def _optimize_unicode(charset, fixup): try: import array except ImportError: return charset charmap = [False]*65536 negate = 0 try: for op, av in charset: if op is NEGATE: negate = 1 elif op is LITERAL: charmap[fixup(av)] = True elif op is RANGE: for i in range(fixup(av[0]), fixup(av[1])+1): charmap[i] = True elif op i... | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
prefix.append(av) | prefixappend(av) | def _compile_info(code, pattern, flags): # internal: compile an info block. in the current version, # this contains min/max pattern width, and an optional literal # prefix or a character map lo, hi = pattern.getwidth() if lo == 0: return # not worth it # look for a literal prefix prefix = [] prefix_skip = 0 charset = ... | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
prefix.append(av) | prefixappend(av) | def _compile_info(code, pattern, flags): # internal: compile an info block. in the current version, # this contains min/max pattern width, and an optional literal # prefix or a character map lo, hi = pattern.getwidth() if lo == 0: return # not worth it # look for a literal prefix prefix = [] prefix_skip = 0 charset = ... | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
charset.append((op, av)) | charsetappend((op, av)) | def _compile_info(code, pattern, flags): # internal: compile an info block. in the current version, # this contains min/max pattern width, and an optional literal # prefix or a character map lo, hi = pattern.getwidth() if lo == 0: return # not worth it # look for a literal prefix prefix = [] prefix_skip = 0 charset = ... | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
c.append((op, av)) | cappend((op, av)) | def _compile_info(code, pattern, flags): # internal: compile an info block. in the current version, # this contains min/max pattern width, and an optional literal # prefix or a character map lo, hi = pattern.getwidth() if lo == 0: return # not worth it # look for a literal prefix prefix = [] prefix_skip = 0 charset = ... | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
c.append((op, av)) | cappend((op, av)) | def _compile_info(code, pattern, flags): # internal: compile an info block. in the current version, # this contains min/max pattern width, and an optional literal # prefix or a character map lo, hi = pattern.getwidth() if lo == 0: return # not worth it # look for a literal prefix prefix = [] prefix_skip = 0 charset = ... | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
for i in range(len(prefix)): | for i in xrange(len(prefix)): | def _compile_info(code, pattern, flags): # internal: compile an info block. in the current version, # this contains min/max pattern width, and an optional literal # prefix or a character map lo, hi = pattern.getwidth() if lo == 0: return # not worth it # look for a literal prefix prefix = [] prefix_skip = 0 charset = ... | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py |
exit_status = not main() | exit_status = int(not main()) | def main(): """Script main program.""" import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'lfqd:x:') except getopt.error, msg: print msg print "usage: python compileall.py [-l] [-f] [-q] [-d destdir] " \ "[-x regexp] [directory ...]" print "-l: don't recurse down" print "-f: force rebuild even if timestamps ar... | 25fd4f489e81b42bda2a7efeb5071747987c67a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/25fd4f489e81b42bda2a7efeb5071747987c67a5/compileall.py |
initial_slash = (path[0] == '/') | initial_slashes = path.startswith('/') if (initial_slashes and path.startswith('//') and not path.startswith('///')): initial_slashes = 2 | def normpath(path): """Normalize path, eliminating double slashes, etc.""" if path == '': return '.' initial_slash = (path[0] == '/') comps = path.split('/') new_comps = [] for comp in comps: if comp in ('', '.'): continue if (comp != '..' or (not initial_slash and not new_comps) or (new_comps and new_comps[-1] == '..'... | 3729695dbd60bd4ca526f86d7ba5ed7ac1bd7738 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3729695dbd60bd4ca526f86d7ba5ed7ac1bd7738/posixpath.py |
if (comp != '..' or (not initial_slash and not new_comps) or | if (comp != '..' or (not initial_slashes and not new_comps) or | def normpath(path): """Normalize path, eliminating double slashes, etc.""" if path == '': return '.' initial_slash = (path[0] == '/') comps = path.split('/') new_comps = [] for comp in comps: if comp in ('', '.'): continue if (comp != '..' or (not initial_slash and not new_comps) or (new_comps and new_comps[-1] == '..'... | 3729695dbd60bd4ca526f86d7ba5ed7ac1bd7738 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3729695dbd60bd4ca526f86d7ba5ed7ac1bd7738/posixpath.py |
if initial_slash: path = '/' + path | if initial_slashes: path = '/'*initial_slashes + path | def normpath(path): """Normalize path, eliminating double slashes, etc.""" if path == '': return '.' initial_slash = (path[0] == '/') comps = path.split('/') new_comps = [] for comp in comps: if comp in ('', '.'): continue if (comp != '..' or (not initial_slash and not new_comps) or (new_comps and new_comps[-1] == '..'... | 3729695dbd60bd4ca526f86d7ba5ed7ac1bd7738 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3729695dbd60bd4ca526f86d7ba5ed7ac1bd7738/posixpath.py |
'db4': {'libs': ('db-4.1', 'db-4.0',), | 'db4': {'libs': ('db-4.1', 'db41', 'db-4.0', 'db4',), | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 27b382a8dac25383012f40cf622de2acbadcad25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/27b382a8dac25383012f40cf622de2acbadcad25/setup.py |
'db3': {'libs': ('db-3.3', 'db-3.2', 'db-3.1'), | 'db3': {'libs': ('db-3.3', 'db-3.2', 'db-3.1', 'db3',), | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 27b382a8dac25383012f40cf622de2acbadcad25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/27b382a8dac25383012f40cf622de2acbadcad25/setup.py |
def _cmp(a, b): | def _cmp(a, b, sh, st): | def _cmp(a, b): try: return not abs(cmp(a, b)) except os.error: return 2 | d4f5db66816c3edc4c766d8087eaed92a7315099 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d4f5db66816c3edc4c766d8087eaed92a7315099/filecmp.py |
return not abs(cmp(a, b)) | return not abs(cmp(a, b, sh, st)) | def _cmp(a, b): try: return not abs(cmp(a, b)) except os.error: return 2 | d4f5db66816c3edc4c766d8087eaed92a7315099 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d4f5db66816c3edc4c766d8087eaed92a7315099/filecmp.py |
import tempfile try: execv(tempfile.mktemp(), ('blah',)) except error, _notfound: pass | if sys.platform[:4] == 'beos': try: unlink('/_ except error, _notfound: pass else: import tempfile t = tempfile.mktemp() try: execv(t, ('blah',)) except error, _notfound: pass | def _execvpe(file, args, env=None): if env is not None: func = execve argrest = (args, env) else: func = execv argrest = (args,) env = environ global _notfound head, tail = path.split(file) if head: apply(func, (file,) + argrest) return if env.has_key('PATH'): envpath = env['PATH'] else: envpath = defpath PATH = envpat... | 5a7a2c56dac0e5b5eba2526fb363ea3321847ac7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5a7a2c56dac0e5b5eba2526fb363ea3321847ac7/os.py |
flags = _fcntl.fcntl(fd, _fcntl.F_GETFD, 0) if flags >= 0: | try: flags = _fcntl.fcntl(fd, _fcntl.F_GETFD, 0) except IOError: pass else: | def _set_cloexec(fd): flags = _fcntl.fcntl(fd, _fcntl.F_GETFD, 0) if flags >= 0: # flags read successfully, modify flags |= _fcntl.FD_CLOEXEC _fcntl.fcntl(fd, _fcntl.F_SETFD, flags) | 6708dfc3054f3cae5733478862903bed1cf1586a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6708dfc3054f3cae5733478862903bed1cf1586a/tempfile.py |
def extended_linecache_checkcache(orig_checkcache=linecache.checkcache): | def extended_linecache_checkcache(filename=None, orig_checkcache=linecache.checkcache): | def extended_linecache_checkcache(orig_checkcache=linecache.checkcache): """Extend linecache.checkcache to preserve the <pyshell#...> entries Rather than repeating the linecache code, patch it to save the pyshell# entries, call the original linecache.checkcache(), and then restore the saved entries. Assigning the ori... | 85c95aa365a7cfaa7c40185445fe0648906f12e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/85c95aa365a7cfaa7c40185445fe0648906f12e4/PyShell.py |
Rather than repeating the linecache code, patch it to save the pyshell entries, call the original linecache.checkcache(), and then restore the saved entries. Assigning the orig_checkcache keyword arg freezes its value at definition time to the (original) method linecache.checkcache(), i.e. makes orig_checkcache lexica... | Rather than repeating the linecache code, patch it to save the <pyshell (which destroys them), and then restore the saved entries. orig_checkcache is bound at definition time to the original method, allowing it to be patched. | def extended_linecache_checkcache(orig_checkcache=linecache.checkcache): """Extend linecache.checkcache to preserve the <pyshell#...> entries Rather than repeating the linecache code, patch it to save the pyshell# entries, call the original linecache.checkcache(), and then restore the saved entries. Assigning the ori... | 85c95aa365a7cfaa7c40185445fe0648906f12e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/85c95aa365a7cfaa7c40185445fe0648906f12e4/PyShell.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.