[Pythonmac-SIG] custom framework with bridgesupport file
Georg Seifert
georg.seifert at gmx.de
Tue Apr 19 11:40:32 CEST 2011
Hi,
I have an app written in cocoa and run python scripts from within the app using "PyRun_SimpleString" (I asked about that a couple of times and got great help).
My problem now is that I want to use some c functions from within a custom framework that is embedded in my app. The only way I could get it to work is to load the bridgesupport file manually:
_path = objc.pathForFramework('../Frameworks/MyFramework.framework')
f = open(_path+'/Versions/A/Resources/BridgeSupport/MyFramework.bridgesupport')
objc.parseBridgeSupport(f.read(), globals(), _path+'/Versions/A/Resources/BridgeSupport/MyFramework.bridgesupport')
f.close()
I have to put this in the script for every run. Is there a better way to tell python to pick the file up automatically?
Best
Georg
More information about the Pythonmac-SIG
mailing list