rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
selection = self.outlineTreeController.election()
selection = self.outlineTreeController.selection()
def indentNote_(self, sender): selectionPath = self.outlineTreeController.selectionIndexPath() if not selectionPath: NSBeep() return
1fc7e0c290ca41306dbcee8d8cea56df3ba453f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/1fc7e0c290ca41306dbcee8d8cea56df3ba453f8/MyDocument.py
ssibling = children.objectAtIndex_(index - 1)
sibling = children.objectAtIndex_(index - 1)
def indentNote_(self, sender): selectionPath = self.outlineTreeController.selectionIndexPath() if not selectionPath: NSBeep() return
1fc7e0c290ca41306dbcee8d8cea56df3ba453f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/1fc7e0c290ca41306dbcee8d8cea56df3ba453f8/MyDocument.py
if gs_root is None:
if gs_root is not None:
def package_version(): fp = open('Modules/objc/pyobjc.h', 'r') for ln in fp.readlines(): if ln.startswith('#define OBJC_VERSION'): fp.close() return ln.split()[-1][1:-1] raise ValueError, "Version not found"
252136d69029469663ba0bcfe117174b734a12f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/252136d69029469663ba0bcfe117174b734a12f5/setup.py
def selectClass_(self, event):
def outlineViewSelectionDidChange_(self, notification):
def selectClass_(self, event): rowNr = self.classTable.selectedRow() if rowNr == -1: self.clearClassInfo() else: item = self.classTable.itemAtRow_(rowNr) self.setClassInfo(unwrap_object(item))
637fb87a6c1937991d3cd5f31782ec24b10e4f83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/637fb87a6c1937991d3cd5f31782ec24b10e4f83/datasource.py
] + LINK_OPT_STRIP + LIBFFI_LDFLAGS)
] + LIBFFI_LDFLAGS)
def IfFrameWork(name, packages, extensions): """ Return the packages and extensions if the framework exists, or two empty lists if not. """ if os.path.exists(os.path.join('/System/Library/Frameworks/', name)): return packages, extensions if os.path.exists(os.path.join('/Library/Frameworks/', name)): return packages, ex...
d1ca23b62a4120ecee48ef3de6933f4061e23648 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/d1ca23b62a4120ecee48ef3de6933f4061e23648/setup.py
] + LINK_OPT_STRIP),
]),
def IfFrameWork(name, packages, extensions): """ Return the packages and extensions if the framework exists, or two empty lists if not. """ if os.path.exists(os.path.join('/System/Library/Frameworks/', name)): return packages, extensions if os.path.exists(os.path.join('/Library/Frameworks/', name)): return packages, ex...
d1ca23b62a4120ecee48ef3de6933f4061e23648 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/d1ca23b62a4120ecee48ef3de6933f4061e23648/setup.py
] + LINK_OPT_STRIP),
]),
def IfFrameWork(name, packages, extensions): """ Return the packages and extensions if the framework exists, or two empty lists if not. """ if os.path.exists(os.path.join('/System/Library/Frameworks/', name)): return packages, extensions if os.path.exists(os.path.join('/Library/Frameworks/', name)): return packages, ex...
d1ca23b62a4120ecee48ef3de6933f4061e23648 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/d1ca23b62a4120ecee48ef3de6933f4061e23648/setup.py
] + LINK_OPT_STRIP),
]),
def IfFrameWork(name, packages, extensions): """ Return the packages and extensions if the framework exists, or two empty lists if not. """ if os.path.exists(os.path.join('/System/Library/Frameworks/', name)): return packages, extensions if os.path.exists(os.path.join('/Library/Frameworks/', name)): return packages, ex...
d1ca23b62a4120ecee48ef3de6933f4061e23648 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/d1ca23b62a4120ecee48ef3de6933f4061e23648/setup.py
def setUp(self): self.data = NSData.alloc().initWithBytes_length_(rawBytes, len(rawBytes)) self.mutableData = NSMutableData.alloc().initWithBytes_length_(rawBytes, len(rawBytes)) def testInitWithBytes_Length_(self): self.assertEquals(len(self.data), self.data.length(), "len() and -length didn't match.") self.assertEqu...
def assertDataContents(self, d1, d2, rawData): self.assertEquals(len(d1), d1.length(), "d1: len() and -length didn't match.") self.assertEquals(len(d1), len(rawData), "d1: len(<data>) and len(<input>) didn't match.") self.assertEquals(len(d2), d2.length(), "d2: len() and -length didn't match.") self.assertEquals(len(d2...
def setUp(self): self.data = NSData.alloc().initWithBytes_length_(rawBytes, len(rawBytes)) self.mutableData = NSMutableData.alloc().initWithBytes_length_(rawBytes, len(rawBytes))
f32637cfb3f8c5fd1a3c2d6bafc2efc8f6f55563 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/f32637cfb3f8c5fd1a3c2d6bafc2efc8f6f55563/test_nsdata.py
bytes = self.data.bytes()
"""Test -bytes""" data = NSData.alloc().initWithBytes_length_(rawBytes, len(rawBytes)) bytes = data.bytes()
def testBytes(self): bytes = self.data.bytes() self.assertEquals(len(bytes), len(rawBytes), "bytes() and rawBytes not equal length.") for i in range(0,len(bytes)): self.assertEquals(rawBytes[i], bytes[i], "byte %s of bytes and rawBytes are not equal." % i)
f32637cfb3f8c5fd1a3c2d6bafc2efc8f6f55563 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/f32637cfb3f8c5fd1a3c2d6bafc2efc8f6f55563/test_nsdata.py
mutableBytes = self.mutableData.mutableBytes()
"""Test -mutableBytes""" mutableData = NSMutableData.dataWithBytes_length_(rawBytes, len(rawBytes)) mutableBytes = mutableData.mutableBytes()
def testMutableBytes(self): mutableBytes = self.mutableData.mutableBytes() for i in range(0, len(mutableBytes)): mutableBytes[i] = otherBytes[i] mutableBytes[1:8] = otherBytes[1:8]
f32637cfb3f8c5fd1a3c2d6bafc2efc8f6f55563 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/f32637cfb3f8c5fd1a3c2d6bafc2efc8f6f55563/test_nsdata.py
except TypeError: pass
except TypeError, r: if str(r).find('right operand length must match slice length') is not 0: raise def testVariousDataLengths(self): """Test data of different lengths. Data of different lengths may be stored in different subclasses within the class cluster. """ testFactor = [1, 10, 1000, 10000, 10000000] for aFactor...
def testMutableBytes(self): mutableBytes = self.mutableData.mutableBytes() for i in range(0, len(mutableBytes)): mutableBytes[i] = otherBytes[i] mutableBytes[1:8] = otherBytes[1:8]
f32637cfb3f8c5fd1a3c2d6bafc2efc8f6f55563 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/f32637cfb3f8c5fd1a3c2d6bafc2efc8f6f55563/test_nsdata.py
self.assertDataContents(data, mutableData, bigRawBytes) mutableBytes = mutableData.mutableBytes() bytes = data.bytes() self.assertEquals(len(bytes), data.length()) self.assertEquals(len(mutableBytes), mutableData.length()) self.assertEquals(bytes, mutableBytes)
def testMutableBytes(self): mutableBytes = self.mutableData.mutableBytes() for i in range(0, len(mutableBytes)): mutableBytes[i] = otherBytes[i] mutableBytes[1:8] = otherBytes[1:8]
f32637cfb3f8c5fd1a3c2d6bafc2efc8f6f55563 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/f32637cfb3f8c5fd1a3c2d6bafc2efc8f6f55563/test_nsdata.py
print "canInitWithRequest_"
def canInitWithRequest_(klass, request): print "canInitWithRequest_" if request.URL().scheme() == PYDOCSCHEME: return True return False
44b1330be1464a0488be8d1e731921775cdb2c3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/44b1330be1464a0488be8d1e731921775cdb2c3d/PyDocURLProtocol.py
canInitWithRequest_ = objc.selector( canInitWithRequest_, signature=NSURLProtocol.canInitWithRequest_.signature, isClassMethod=True, )
def canInitWithRequest_(klass, request): print "canInitWithRequest_" if request.URL().scheme() == PYDOCSCHEME: return True return False
44b1330be1464a0488be8d1e731921775cdb2c3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/44b1330be1464a0488be8d1e731921775cdb2c3d/PyDocURLProtocol.py
print "canonical", request.URL().standardizedURL().path()
def canonicalRequestForRequest_(klass, request): print "canonical", request.URL().standardizedURL().path() return request
44b1330be1464a0488be8d1e731921775cdb2c3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/44b1330be1464a0488be8d1e731921775cdb2c3d/PyDocURLProtocol.py
canonicalRequestForRequest_= objc.selector( canonicalRequestForRequest_, signature=NSURLProtocol.canonicalRequestForRequest_.signature, isClassMethod=True, )
def canonicalRequestForRequest_(klass, request): print "canonical", request.URL().standardizedURL().path() return request
44b1330be1464a0488be8d1e731921775cdb2c3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/44b1330be1464a0488be8d1e731921775cdb2c3d/PyDocURLProtocol.py
print "start"
def startLoading(self): print "start" client = self.client() request = self.request() urlpath = request.URL().standardizedURL().path() print 'urlpath', urlpath modpath = urlpath.replace(u'/', u'.' ).lstrip(u'.' ).replace(u'.html', u'') print 'modpath', modpath try: data = gethtmldoc(modpath.encode('utf-8')) except Exc...
44b1330be1464a0488be8d1e731921775cdb2c3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/44b1330be1464a0488be8d1e731921775cdb2c3d/PyDocURLProtocol.py
print 'urlpath', urlpath
def startLoading(self): print "start" client = self.client() request = self.request() urlpath = request.URL().standardizedURL().path() print 'urlpath', urlpath modpath = urlpath.replace(u'/', u'.' ).lstrip(u'.' ).replace(u'.html', u'') print 'modpath', modpath try: data = gethtmldoc(modpath.encode('utf-8')) except Exc...
44b1330be1464a0488be8d1e731921775cdb2c3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/44b1330be1464a0488be8d1e731921775cdb2c3d/PyDocURLProtocol.py
print 'modpath', modpath
def startLoading(self): print "start" client = self.client() request = self.request() urlpath = request.URL().standardizedURL().path() print 'urlpath', urlpath modpath = urlpath.replace(u'/', u'.' ).lstrip(u'.' ).replace(u'.html', u'') print 'modpath', modpath try: data = gethtmldoc(modpath.encode('utf-8')) except Exc...
44b1330be1464a0488be8d1e731921775cdb2c3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/44b1330be1464a0488be8d1e731921775cdb2c3d/PyDocURLProtocol.py
print repr(e), str(e)
def startLoading(self): print "start" client = self.client() request = self.request() urlpath = request.URL().standardizedURL().path() print 'urlpath', urlpath modpath = urlpath.replace(u'/', u'.' ).lstrip(u'.' ).replace(u'.html', u'') print 'modpath', modpath try: data = gethtmldoc(modpath.encode('utf-8')) except Exc...
44b1330be1464a0488be8d1e731921775cdb2c3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/44b1330be1464a0488be8d1e731921775cdb2c3d/PyDocURLProtocol.py
print "stop"
pass
def stopLoading(self): print "stop"
44b1330be1464a0488be8d1e731921775cdb2c3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/44b1330be1464a0488be8d1e731921775cdb2c3d/PyDocURLProtocol.py
is_framework = os.path.dirname(os.path.dirname(sys.prefix)).endswith('.framework') if is_framework and self.scheme_map['scripts'].startswith(sys.prefix): self.scheme_map['scripts'] = '/usr/local/bin'
scripts = self.scheme_map.get('scripts') if scripts: is_framework = os.path.dirname(os.path.dirname(sys.prefix)).endswith('.framework') if is_framework and scripts.startswith(sys.prefix): self.scheme_map['scripts'] = '/usr/local/bin'
def finalize_options (self): self.set_undefined_options('bdist', ('bdist_base', 'bdist_base')) if self.pkg_base is None: self.pkg_base = os.path.join(self.bdist_base, 'mpkg')
40691c212de4174f095e62462c0ff6b335b5f998 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/40691c212de4174f095e62462c0ff6b335b5f998/cmd_bdist_mpkg.py
rest2HTML(None, '.', ['Install.txt', 'ReadMe.txt', 'Examples/00ReadMe.txt', 'Installer Package/ReadMe.txt'])
rest2HTML(None, '.', ['Install.txt', 'ReadMe.txt', 'Examples/00ReadMe.txt', 'Installer Package/ReadMe.txt', 'ProjectBuilder Extras/Project Templates/00README.txt'], ) os.rename('ProjectBuilder Extras/Project Templates/00README.html', 'Doc/ProjectBuilder-Templates.html')
def escquotes(val): return val.replace("'", "'\"'\"'")
9f7992f2d4a66821181e81f9ca936538f845b065 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/9f7992f2d4a66821181e81f9ca936538f845b065/update_html.py
def getattr(self, attr):
def __getattr__(self, attr):
def getattr(self, attr): return getattr(self.__pyobjc_object__, attr)
5029e983684c923dd8d296f4488e660c3851fdfa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/5029e983684c923dd8d296f4488e660c3851fdfa/_pythonify.py
def getattr(self, attr):
def __getattr__(self, attr):
def getattr(self, attr): return getattr(self.__pyobjc_object__, attr)
5029e983684c923dd8d296f4488e660c3851fdfa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/5029e983684c923dd8d296f4488e660c3851fdfa/_pythonify.py
def getattr(self, attr):
def __getattr__(self, attr):
def getattr(self, attr): return getattr(self.__pyobjc_object__, attr)
5029e983684c923dd8d296f4488e660c3851fdfa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/5029e983684c923dd8d296f4488e660c3851fdfa/_pythonify.py
return (*pid != nil);
if (PyErr_Occurred()) { return 0; } return 1;
typedef void* PYOBJC_VOIDPTR;
b69a24d281db48ef827a7bfc44725a0abdeb7368 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/b69a24d281db48ef827a7bfc44725a0abdeb7368/func_builder.py
result = { 'meth': lambda : not getattr(ctests, name) }
def test_CheckNSInvoke(self): try: ctests.CheckNSInvoke() except AssertionError: return raise AssertionError, "NSInvocation works!" return test_CheckNSInvoke
def make_test(name): """ Create a method for use in a unittest, the exec is needed to get the proper function name """ result = { 'meth': getattr(ctests, name) } if sys.platform == 'darwin' and name == 'CheckNSInvoke': # There is a bug in Apple's implementation of NSInvocation # surpress the test failure until Apple f...
caa8df10795df6bc7c5fa1eb875d8b565a94fb85 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/caa8df10795df6bc7c5fa1eb875d8b565a94fb85/test_ctests.py
fp.write('\tif (tmp == NULL) { PyObjCErr_ToObjC(); return nil; }\n')
fp.write('\tif (tmp == NULL) { PyObjCErr_ToObjCWithGILState(&state); return nil; }\n')
fp.write('#ifdef HAVE_BOOL\n')
d5b02a564860c38bf67d2a195e25f2cf0e0f80cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/d5b02a564860c38bf67d2a195e25f2cf0e0f80cb/gen_test_methods.py
fp.write('\tif (PyErr_Occurred()) { PyObjCErr_ToObjC(); return nil; }\n')
fp.write('\tif (PyErr_Occurred()) { PyObjCErr_ToObjCWithGILState(&state); return nil; }\n') fp.write('\tPyGILState_Release(state);\n')
fp.write('#ifdef HAVE_BOOL\n')
d5b02a564860c38bf67d2a195e25f2cf0e0f80cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/d5b02a564860c38bf67d2a195e25f2cf0e0f80cb/gen_test_methods.py
return WSTConnectionWindowController.alloc().init().autorelease()
return WSTConnectionWindowController.alloc().init()
def connectionWindowController(self): return WSTConnectionWindowController.alloc().init().autorelease()
763551527f2ffa6570d8164cdb8c910e395b970c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/763551527f2ffa6570d8164cdb8c910e395b970c/WSTConnectionWindowControllerClass.py
class ClassesDataSource (NibClassBuilder.AutoBaseClass, NSOutlineViewDataSource, NSTableDataSource): __slots__ = ('_classList', '_classTree', '_methodInfo')
class ClassesDataSource (NibClassBuilder.AutoBaseClass): __slots__ = ('_classList', '_classTree', '_methodInfo', '_classInfo')
def classBundle(cls): framework = NSBundle.bundleForClass_(cls).bundlePath() if framework.startswith(SYSFRAMEWORKS_DIR): framework = framework[len(SYSFRAMEWORKS_DIR):] if framework.endswith('.framework'): framework = framework[:-len('.framework')] return framework
ef60a7d49077ec9efa8702d42798604c086a941c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/ef60a7d49077ec9efa8702d42798604c086a941c/datasource.py
item = wrap_object[super]
item = wrap_object(super)
def showClass(self, cls): # First expand the tree (to make item visible) super = cls.__bases__[0] if super == objc_object: return
ef60a7d49077ec9efa8702d42798604c086a941c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/ef60a7d49077ec9efa8702d42798604c086a941c/datasource.py
item = wrap_object[cls]
item = wrap_object(cls)
def selectClass(self, cls): self.showClass(cls)
ef60a7d49077ec9efa8702d42798604c086a941c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/ef60a7d49077ec9efa8702d42798604c086a941c/datasource.py
Extension("objc._objc", sourceFiles,
Extension("objc._objc", sourceFiles + LIBFFI_SOURCEFILES,
def IfFrameWork(name, packages, extensions): """ Return the packages and extensions if the framework exists, or two empty lists if not. """ if os.path.exists(os.path.join('/System/Library/Frameworks/', name)): return packages, extensions if os.path.exists(os.path.join('/Library/Frameworks/', name)): return packages, ex...
38fa157a1ca0584accf42fee7a9a750fc973a15a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/38fa157a1ca0584accf42fee7a9a750fc973a15a/setup.py
], extra_link_args=[ '-g', '-framework', 'Foundation' ])
] + LIBFFI_CFLAGS, extra_link_args=[ '-g', '-framework', 'Foundation', ] + LINK_OPT_STRIP + LIBFFI_LDFLAGS)
def IfFrameWork(name, packages, extensions): """ Return the packages and extensions if the framework exists, or two empty lists if not. """ if os.path.exists(os.path.join('/System/Library/Frameworks/', name)): return packages, extensions if os.path.exists(os.path.join('/Library/Frameworks/', name)): return packages, ex...
38fa157a1ca0584accf42fee7a9a750fc973a15a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/38fa157a1ca0584accf42fee7a9a750fc973a15a/setup.py
]),
] + LINK_OPT_STRIP),
def IfFrameWork(name, packages, extensions): """ Return the packages and extensions if the framework exists, or two empty lists if not. """ if os.path.exists(os.path.join('/System/Library/Frameworks/', name)): return packages, extensions if os.path.exists(os.path.join('/Library/Frameworks/', name)): return packages, ex...
38fa157a1ca0584accf42fee7a9a750fc973a15a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/38fa157a1ca0584accf42fee7a9a750fc973a15a/setup.py
]),
] + LINK_OPT_STRIP),
def IfFrameWork(name, packages, extensions): """ Return the packages and extensions if the framework exists, or two empty lists if not. """ if os.path.exists(os.path.join('/System/Library/Frameworks/', name)): return packages, extensions if os.path.exists(os.path.join('/Library/Frameworks/', name)): return packages, ex...
38fa157a1ca0584accf42fee7a9a750fc973a15a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/38fa157a1ca0584accf42fee7a9a750fc973a15a/setup.py
]),
] + LINK_OPT_STRIP),
def IfFrameWork(name, packages, extensions): """ Return the packages and extensions if the framework exists, or two empty lists if not. """ if os.path.exists(os.path.join('/System/Library/Frameworks/', name)): return packages, extensions if os.path.exists(os.path.join('/Library/Frameworks/', name)): return packages, ex...
38fa157a1ca0584accf42fee7a9a750fc973a15a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/38fa157a1ca0584accf42fee7a9a750fc973a15a/setup.py
req_ver = [ 2, 2] if sys.version_info[0] < req_ver[0] or ( sys.version_info[0] == req_ver[0] and sys.version_info[1] < req_ver[1]):
req_ver = (2, 2) if sys.version_info < req_ver:
def subprocess(taskName, cmd, validRes=None): print "Performing task: %s" % (taskName,) fd = os.popen(cmd, 'r') for ln in fd.xreadlines(): sys.stdout.write(ln) res = fd.close() if res is not validRes: sys.stderr.write("Task '%s' failed [%d]\n"%(taskName, res)) sys.exit(1)
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
if ' ' in os.path.realpath(LIBFFI_SOURCES): print >>sys.stderr, "LIBFFI can not build correctly in a path that contains spaces." print >>sys.stderr, "This limitation includes the entire path (all parents, etc.)" print >>sys.stderr, "Move the PyObjC and libffi source to a path without spaces and build again." sys.exit(...
def subprocess(taskName, cmd, validRes=None): print "Performing task: %s" % (taskName,) fd = os.popen(cmd, 'r') for ln in fd.xreadlines(): sys.stdout.write(ln) res = fd.close() if res is not validRes: sys.stderr.write("Task '%s' failed [%d]\n"%(taskName, res)) sys.exit(1)
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
def subprocess(taskName, cmd, validRes=None): print "Performing task: %s" % (taskName,) fd = os.popen(cmd, 'r') for ln in fd.xreadlines(): sys.stdout.write(ln) res = fd.close() if res is not validRes: sys.stderr.write("Task '%s' failed [%d]\n"%(taskName, res)) sys.exit(1)
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
LIBFFI_CFLAGS=[ "-isystem", "%s/include"%LIBFFI_BASE,
LIBFFI_CFLAGS=[ "-isystem", "%s/include"%LIBFFI_BASE,
def subprocess(taskName, cmd, validRes=None): print "Performing task: %s" % (taskName,) fd = os.popen(cmd, 'r') for ln in fd.xreadlines(): sys.stdout.write(ln) res = fd.close() if res is not validRes: sys.stderr.write("Task '%s' failed [%d]\n"%(taskName, res)) sys.exit(1)
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
LIBFFI_LDFLAGS=[ '-L%s/lib'%LIBFFI_BASE, '-lffi',
LIBFFI_LDFLAGS=[ '-L%s/lib'%LIBFFI_BASE, '-lffi',
def subprocess(taskName, cmd, validRes=None): print "Performing task: %s" % (taskName,) fd = os.popen(cmd, 'r') for ln in fd.xreadlines(): sys.stdout.write(ln) res = fd.close() if res is not validRes: sys.stderr.write("Task '%s' failed [%d]\n"%(taskName, res)) sys.exit(1)
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
"Modules/objc/objc-runtime-apple.m", "Modules/objc/objc-runtime-gnu.m",
"Modules/objc/objc-runtime-apple.m", "Modules/objc/objc-runtime-gnu.m",
def subprocess(taskName, cmd, validRes=None): print "Performing task: %s" % (taskName,) fd = os.popen(cmd, 'r') for ln in fd.xreadlines(): sys.stdout.write(ln) res = fd.close() if res is not validRes: sys.stderr.write("Task '%s' failed [%d]\n"%(taskName, res)) sys.exit(1)
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
def subprocess(taskName, cmd, validRes=None): print "Performing task: %s" % (taskName,) fd = os.popen(cmd, 'r') for ln in fd.xreadlines(): sys.stdout.write(ln) res = fd.close() if res is not validRes: sys.stderr.write("Task '%s' failed [%d]\n"%(taskName, res)) sys.exit(1)
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
print "You're not running on MacOS X, and don't use GNUstep" print "I don't know how to build PyObjC on such a platform." print "Please read the ReadMe." print "" sys.exit(1)
print "You're not running on MacOS X, and don't use GNUstep" print "I don't know how to build PyObjC on such a platform." print "Please read the ReadMe." print "" sys.exit(1)
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """ for pth in ('/System/Library/Frameworks', '/Library/Frameworks'): basedir = os.path.join(pth, name) if os.path.exists(basedir): if (headername is None) or os.path....
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
"-DAPPLE_RUNTIME",
"-DAPPLE_RUNTIME",
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """ for pth in ('/System/Library/Frameworks', '/Library/Frameworks'): basedir = os.path.join(pth, name) if os.path.exists(basedir): if (headername is None) or os.path....
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
"-Wformat=2", "-W", "-Wshadow",
"-Wformat=2", "-W", "-Wshadow",
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """ for pth in ('/System/Library/Frameworks', '/Library/Frameworks'): basedir = os.path.join(pth, name) if os.path.exists(basedir): if (headername is None) or os.path....
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
"-Wnested-externs",
"-Wnested-externs",
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """ for pth in ('/System/Library/Frameworks', '/Library/Frameworks'): basedir = os.path.join(pth, name) if os.path.exists(basedir): if (headername is None) or os.path....
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """ for pth in ('/System/Library/Frameworks', '/Library/Frameworks'): basedir = os.path.join(pth, name) if os.path.exists(basedir): if (headername is None) or os.path....
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """ for pth in ('/System/Library/Frameworks', '/Library/Frameworks'): basedir = os.path.join(pth, name) if os.path.exists(basedir): if (headername is None) or os.path....
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
"-Wno-import",
"-Wno-import",
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """ for pth in ('/System/Library/Frameworks', '/Library/Frameworks'): basedir = os.path.join(pth, name) if os.path.exists(basedir): if (headername is None) or os.path....
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
name = os.path.splitext(name)[0]
name = os.path.splitext(name)[0]
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
return packages, extensions
return packages, extensions
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
'-O0',
'-O0',
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
'-DGNU_RUNTIME=1', '-DGNUSTEP_BASE_LIBRARY=1', '-fconstant-string-class=NSConstantString', '-fgnu-runtime',
'-DGNU_RUNTIME=1', '-DGNUSTEP_BASE_LIBRARY=1', '-fconstant-string-class=NSConstantString', '-fgnu-runtime',
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
Extension("objc._objc",
Extension("objc._objc",
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
Extension("objc.test.ctests",
Extension("objc.test.ctests",
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
Extension("autoGIL",
Extension("autoGIL",
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
'depends': (glob.glob('build/codegen/_Fnd_*.inc')
'depends': (glob.glob('build/codegen/_Fnd_*.inc')
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
Extension("_Foundation",
Extension("_Foundation",
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
"-IModules/objc",
"-IModules/objc",
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
])
])
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
Extension("AppKit._AppKit",
Extension("AppKit._AppKit",
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
"-IModules/objc",
"-IModules/objc",
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
'-framework', 'InterfaceBuilder',
'-framework', 'InterfaceBuilder',
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
'-framework', 'WebKit',
'-framework', 'WebKit',
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
packages = CorePackages + AppKitPackages + FoundationPackages + AddressBookPackages + PrefPanesPackages + InterfaceBuilderPackages + ScreenSaverPackages + WebKitPackages + SecurityInterfacePackages + [ 'PyObjCTools' ]
packages = CorePackages + AppKitPackages + FoundationPackages + AddressBookPackages + PrefPanesPackages + InterfaceBuilderPackages + ScreenSaverPackages + WebKitPackages + SecurityInterfacePackages + [ 'PyObjCTools' ]
def package_version(): fp = open('Modules/objc/pyobjc.h', 'r') for ln in fp.readlines(): if ln.startswith('#define OBJC_VERSION'): fp.close() return ln.split()[-1][1:-1] raise ValueError, "Version not found"
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
def package_version(): fp = open('Modules/objc/pyobjc.h', 'r') for ln in fp.readlines(): if ln.startswith('#define OBJC_VERSION'): fp.close() return ln.split()[-1][1:-1] raise ValueError, "Version not found"
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
version = package_version(), description = "Python<->ObjC Interoperability Module",
version = package_version(), description = "Python<->ObjC Interoperability Module",
def package_version(): fp = open('Modules/objc/pyobjc.h', 'r') for ln in fp.readlines(): if ln.startswith('#define OBJC_VERSION'): fp.close() return ln.split()[-1][1:-1] raise ValueError, "Version not found"
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
author = "bbum, RonaldO, SteveM, LeleG, many others stretching back through the reaches of time...", author_email = "pyobjc-dev@lists.sourceforge.net", url = "http://pyobjc.sourceforge.net/",
author = "bbum, RonaldO, SteveM, LeleG, many others stretching back through the reaches of time...", author_email = "pyobjc-dev@lists.sourceforge.net", url = "http://pyobjc.sourceforge.net/",
def package_version(): fp = open('Modules/objc/pyobjc.h', 'r') for ln in fp.readlines(): if ln.startswith('#define OBJC_VERSION'): fp.close() return ln.split()[-1][1:-1] raise ValueError, "Version not found"
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
ext_modules = ( CoreExtensions + AppKitExtensions + FoundationExtensions + AddressBookExtensions
ext_modules = ( CoreExtensions + AppKitExtensions + FoundationExtensions + AddressBookExtensions
def package_version(): fp = open('Modules/objc/pyobjc.h', 'r') for ln in fp.readlines(): if ln.startswith('#define OBJC_VERSION'): fp.close() return ln.split()[-1][1:-1] raise ValueError, "Version not found"
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
), packages = packages, package_dir = package_dir, scripts = [ 'Scripts/nibclassbuilder', 'Scripts/runPyObjCTests'], extra_path = "PyObjC",
), packages = packages, package_dir = package_dir, scripts = [ 'Scripts/nibclassbuilder', 'Scripts/runPyObjCTests'], extra_path = "PyObjC",
def package_version(): fp = open('Modules/objc/pyobjc.h', 'r') for ln in fp.readlines(): if ln.startswith('#define OBJC_VERSION'): fp.close() return ln.split()[-1][1:-1] raise ValueError, "Version not found"
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
return
return
def _extractClassesFromNibFromPath(self, path): path = os.path.normpath(path) if self.parsedNibs.has_key(path): return # we've alread pared this nib nibName = os.path.basename(path) nibInfo = NSDictionary.dictionaryWithContentsOfFile_( os.path.join(path, 'classes.nib')) if nibInfo is None: raise NibLoaderError, "Inval...
5bccb029daee29746c68becc1dc582a23db1aeb2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/5bccb029daee29746c68becc1dc582a23db1aeb2/NibClassBuilder.py
writer.writeln()
def _printClass(self, writer, clsInfo): nibs = clsInfo.nibs if len(nibs) > 1: nibs[-2] = nibs[-2] + " and " + nibs[-1] del nibs[-1] nibs = ", ".join(nibs) writer.writeln("# class defined in %s" % nibs) writer.writeln("class %s(AutoBaseClass):" % clsInfo.name) writer.indent() writer.writeln("# the actual base class is %...
5bccb029daee29746c68becc1dc582a23db1aeb2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/5bccb029daee29746c68becc1dc582a23db1aeb2/NibClassBuilder.py
print `container.storedObject()`, `type(container.storedObject())`
def testNSDecimalNumber(self): container = OC_TestIdentity.alloc().init()
d8108ed100891be8487a6194b882a1edfe93bed3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/d8108ed100891be8487a6194b882a1edfe93bed3/test_identity.py
elif funcName.startswith('removeObjectFrom') and funcName.endswith('AtIndex_'): return selector(func, signature='v@:i')
def accessor(func): """ Return an Objective-C method object that is conformant with key-value coding and key-value observing. """ if not isinstance(func, type(accessor)): raise ValueError, '%s is not a function'%(func,) argCount = func.func_code.co_argcount funcName = func.func_name if argCount == 3: if funcName.sta...
25765feb0b15d65b8690ffdd3406f26331a2465d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/25765feb0b15d65b8690ffdd3406f26331a2465d/__init__.py
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """ for pth in ('/System/Library/Frameworks', '/Library/Frameworks'): basedir = os.path.join(pth, name) if os.path.exists(basedir): if (headername is None) or os.path....
5f078145d6ef131d066b9dda6276a37a2e18394f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/5f078145d6ef131d066b9dda6276a37a2e18394f/setup.py
scripts = [ 'Scripts/nibclassbuilder', ],
def package_version(): fp = open('Modules/objc/pyobjc.h', 'r') for ln in fp.readlines(): if ln.startswith('#define OBJC_VERSION'): fp.close() return ln.split()[-1][1:-1] raise ValueError, "Version not found"
2e16c4fb4aa2f052ccb4c28f2ff87bd856112df7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/2e16c4fb4aa2f052ccb4c28f2ff87bd856112df7/setup.py
self.NSObjectInstance = objc.runtime.NSObject.alloc()
self.NSObjectInstance = objc.runtime.NSObject.alloc().init()
def setUp(self): self.NSObjectInstance = objc.runtime.NSObject.alloc()
958d9fc18693d67b85b9ffed75b92dd6d01b258e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/958d9fc18693d67b85b9ffed75b92dd6d01b258e/test_objc.py
author = "bbum, RonaldO, SteveM, many others stretching back through the reachtes of time...",
author = "bbum, RonaldO, SteveM, LeleG, many others stretching back through the reaches of time...",
def package_version(): fp = open('Modules/objc/pyobjc.h', 'r') for ln in fp.readlines(): if ln.startswith('#define OBJC_VERSION'): fp.close() return ln.split()[-1][1:-1] raise ValueError, "Version not found"
527df15af6d42dffdf094ccf38d5acd37d8f8929 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/527df15af6d42dffdf094ccf38d5acd37d8f8929/setup.py
def debug(fn): rval = maybeutf(fn) print fn, rval return rval return debug
return maybeutf
def maybeutf(fn): header = file(fn).read(4) if header.startswith(codecs.BOM_UTF8): return 'utf_8' elif header.startswith(codecs.BOM_UTF16_BE): return 'utf_16_be' elif header.startswith(codecs.BOM_UTF16_LE): return 'utf_16_le' # some hacks to guess BOM-less UTF-16 text elif header[0::2] == '\x00\x00' and header[1::2] !=...
3e29fe61931c46b273b829f5494f5f340bb4f5be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/3e29fe61931c46b273b829f5494f5f340bb4f5be/project-tool.py
print "typedef int (*superfunc)();"
print "typedef int (*superfunc)(int);"
print "typedef int (*superfunc)();"
2aeeb5ecb21a165d015c9d9140b97818a7ccbcc8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/2aeeb5ecb21a165d015c9d9140b97818a7ccbcc8/generate-stubs.py
def doTemplateInfo(aFile, options): if not options.doReverse: basename, extension = os.path.splitext(aFile) encoding = ENCODINGS.get(extension, lambda fn:None)(aFile) doFileSubstitution(aFile, encoding, FORWARDTRANSLATOR)
def doTemplateInfo(aFile, options, translator): basename, extension = os.path.splitext(aFile) encoding = ENCODINGS.get(extension, lambda fn:None)(aFile) doFileSubstitution(aFile, encoding, translator)
def doTemplateInfo(aFile, options): if not options.doReverse: basename, extension = os.path.splitext(aFile) encoding = ENCODINGS.get(extension, lambda fn:None)(aFile) doFileSubstitution(aFile, encoding, FORWARDTRANSLATOR)
b6e5074f4c6128a4009be73bb572556666294b22 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/b6e5074f4c6128a4009be73bb572556666294b22/clean.py
specialCommand(path, options)
specialCommand(path, options, translator)
def doSubstitutions(dirName, aName, options): if options.doReverse: translator = REVERSETRANSLATOR else: translator = FORWARDTRANSLATOR path = os.path.join(dirName, aName) if os.path.isdir(path): return specialCommand = SPECIALFILES.get(aName) if specialCommand is not None: specialCommand(path, options) return basen...
b6e5074f4c6128a4009be73bb572556666294b22 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/b6e5074f4c6128a4009be73bb572556666294b22/clean.py
doFileSubstitution(path, encoding, translator) if options.makeWorking and (extension in WORKINGCOPYFILES): info('Making working copy of %s...', path) tail = aName.split("_", 1)[1] targetFile = os.path.join(dirName, "xcPROJECTNAMExc_%s" % (tail,)) inFile = codecs.EncodedFile(file(path, "rb"), encoding) outFile = codec...
if options.makeWorking and (extension in WORKINGCOPYFILES) and not options.doReverse and aName.split("_", 1)[0] == 'xcPROJECTNAMExc': deletePath(path) else: doFileSubstitution(path, encoding, translator) if options.makeWorking and (extension in WORKINGCOPYFILES) and options.doReverse: tail = aName.split("_", 1)[1] tar...
def doSubstitutions(dirName, aName, options): if options.doReverse: translator = REVERSETRANSLATOR else: translator = FORWARDTRANSLATOR path = os.path.join(dirName, aName) if os.path.isdir(path): return specialCommand = SPECIALFILES.get(aName) if specialCommand is not None: specialCommand(path, options) return basen...
b6e5074f4c6128a4009be73bb572556666294b22 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/b6e5074f4c6128a4009be73bb572556666294b22/clean.py
lines = bytes.split(u'\n')
lines = bytes.splitlines(True)
def doFileSubstitution(aFile, encoding, translator): _tempFile = tempfile.TemporaryFile() # do the translation debug('encoding is: %s', encoding) inFile = codecs.getreader(encoding)(file(aFile, "rb")) outFile = codecs.getwriter(encoding)(_tempFile) try: for line in inFile: tline = translator(line) outFile.write(tline)...
b6e5074f4c6128a4009be73bb572556666294b22 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/b6e5074f4c6128a4009be73bb572556666294b22/clean.py
info("Removing '%s'...", dest) shutil.rmtree(dest)
deletePath(dest)
def main(): parser = build_parser() options, args = parser.parse_args() if not args: parser.print_help() return if len(args) != 2: parser.error("Must specify both a source and destination") return if options.verbose: hdlr = logging.StreamHandler() fmt = logging.Formatter('%(message)s') hdlr.setFormatter(fmt) logger ...
b6e5074f4c6128a4009be73bb572556666294b22 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/b6e5074f4c6128a4009be73bb572556666294b22/clean.py
self.assertEquals(PyObjC_TestClassAndInstanceInstanceOverride.isInstance(PyObjC_TestClassAndInstanceInstanceOverride), objc.NO) self.assertEquals(PyObjC_TestClassAndInstanceInstanceOverride.alloc().init().isInstance(), objc.NO)
self.assertEquals(PyObjC_TestClassAndInstanceInstanceOverride.pyobjc_classMethods.isInstance(), objc.NO) self.assertEquals(PyObjC_TestClassAndInstanceInstanceOverride.alloc().init().pyobjc_instanceMethods.isInstance(), objc.NO)
def testClassAndInstanceInstanceOverrideWorkaround(self): self.assertEquals(PyObjC_TestClassAndInstanceInstanceOverride.isInstance(PyObjC_TestClassAndInstanceInstanceOverride), objc.NO) self.assertEquals(PyObjC_TestClassAndInstanceInstanceOverride.alloc().init().isInstance(), objc.NO)
47c81b4e4ec5e7e785935889a966b8881de63f6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/47c81b4e4ec5e7e785935889a966b8881de63f6f/test_classandinst.py
self.assertEquals(PyObjC_TestClassAndInstanceClassOverride.isInstance(PyObjC_TestClassAndInstanceClassOverride), objc.YES) self.assertEquals(PyObjC_TestClassAndInstanceClassOverride.alloc().init().isInstance(), objc.YES)
self.assertEquals(PyObjC_TestClassAndInstanceClassOverride.pyobjc_classMethods.isInstance(), objc.YES) self.assertEquals(PyObjC_TestClassAndInstanceClassOverride.alloc().init().pyobjc_instanceMethods.isInstance(), objc.YES)
def testClassAndInstanceClassOverrideWorkaround(self): self.assertEquals(PyObjC_TestClassAndInstanceClassOverride.isInstance(PyObjC_TestClassAndInstanceClassOverride), objc.YES) self.assertEquals(PyObjC_TestClassAndInstanceClassOverride.alloc().init().isInstance(), objc.YES)
47c81b4e4ec5e7e785935889a966b8881de63f6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/47c81b4e4ec5e7e785935889a966b8881de63f6f/test_classandinst.py
self.assertEquals(PyObjC_TestClassAndInstanceSubclass.isInstance(PyObjC_TestClassAndInstanceSubclass), objc.NO) self.assertEquals(PyObjC_TestClassAndInstanceSubclass.alloc().init().isInstance(), objc.YES)
self.assertEquals(PyObjC_TestClassAndInstanceSubclass.pyobjc_classMethods.isInstance(), objc.NO) self.assertEquals(PyObjC_TestClassAndInstanceSubclass.alloc().init().pyobjc_instanceMethods.isInstance(), objc.YES)
def testClassAndInstanceSubclassWorkaround(self): self.assertEquals(PyObjC_TestClassAndInstanceSubclass.isInstance(PyObjC_TestClassAndInstanceSubclass), objc.NO) self.assertEquals(PyObjC_TestClassAndInstanceSubclass.alloc().init().isInstance(), objc.YES)
47c81b4e4ec5e7e785935889a966b8881de63f6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/47c81b4e4ec5e7e785935889a966b8881de63f6f/test_classandinst.py
self.assertEquals(PyObjC_TestClassAndInstance.isInstance(PyObjC_TestClassAndInstance), objc.NO) self.assertEquals(PyObjC_TestClassAndInstance.alloc().init().isInstance(), objc.YES)
self.assertEquals(PyObjC_TestClassAndInstance.pyobjc_classMethods.isInstance(), objc.NO) self.assertEquals(PyObjC_TestClassAndInstance.alloc().init().pyobjc_instanceMethods.isInstance(), objc.YES)
def testClassAndInstanceWorkaround(self): self.assertEquals(PyObjC_TestClassAndInstance.isInstance(PyObjC_TestClassAndInstance), objc.NO) self.assertEquals(PyObjC_TestClassAndInstance.alloc().init().isInstance(), objc.YES)
47c81b4e4ec5e7e785935889a966b8881de63f6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/47c81b4e4ec5e7e785935889a966b8881de63f6f/test_classandinst.py
"-O0", "-g",
def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """ for pth in ('/System/Library/Frameworks', '/Library/Frameworks'): basedir = os.path.join(pth, name) if os.path.exists(basedir): if (headername is None) or os.path....
a205f982740ca03535f51eb75a6e4f1546dffbac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/a205f982740ca03535f51eb75a6e4f1546dffbac/setup.py
>>> MyEnumerator <objective-c class MyEnumerator at 0x350fb0>
... def __del__(self):
d9bdeab3158e399c0d248f0480c4a0612062907b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/d9bdeab3158e399c0d248f0480c4a0612062907b/subclassing-objective-c.py
def handleMountNotification_(self, aNotification): path = aNotification.userInfo()['NSDevicePath'] for aFile in os.listdir(path): if readTheseFiles.match(aFile): fullPath = os.path.join(path, aFile) success, app, None = workspace.getInfoForFile_application_type_(fullPath) if not success: NSLog("Failed to find applicati...
e87858cdf2815f7279ecac3554027bc454d0c8eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/e87858cdf2815f7279ecac3554027bc454d0c8eb/autoreadme.py
NSApp.setDelegate_( AppDelegate.alloc().init() )
delegate = AppDelegate.alloc().init() NSApp.setDelegate_(delegate)
def main(): NSApp = NSApplication.sharedApplication() NSApp.setDelegate_( AppDelegate.alloc().init() ) win = NSWindow.alloc() frame = ((200.0, 300.0), (250.0, 100.0)) win.initWithContentRect_styleMask_backing_defer_ (frame, 15, 2, 0) win.setTitle_ ('HelloWorld') win.setLevel_ (3) # floating window hel = NSButton.a...
7ca99828ecac7c895a7c5721e32a2e2d7dcc706e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/7ca99828ecac7c895a7c5721e32a2e2d7dcc706e/HelloWorld.py
class TestTypeStr(unittest.TestCase):
class PyOCTestTypeStr(unittest.TestCase):
def makeCFloat(value): """ C floats and doubles have a different representation, this function returns the result of converting a python float (== C double) to a C float and back. """ return struct.unpack('f',struct.pack('f', value))[0]
def93b98370bd91eae6e886165b0b22301601773 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/def93b98370bd91eae6e886165b0b22301601773/test_methods.py
class TestSimpleReturns(unittest.TestCase):
class PyOCTestSimpleReturns(unittest.TestCase):
def testAll(self):
def93b98370bd91eae6e886165b0b22301601773 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/def93b98370bd91eae6e886165b0b22301601773/test_methods.py