python - Scripting Bridge vs PyObjC vs py2app -
i starting learn integrating python , mac os apps. (i want call methods cocoa python.) i've ran these terminologies -- scripting bridge, pyobjc, , py2app. what's difference? pyobjc example of scripting bridge? , when py2app come play?
the short version: pyobjc way call mac os x apis, scripting bridge way talk other apps' scripting interfaces. in more detail:
pyobjc bridge between python language , objective c runtime (and set of cocoa wrappers built trivially on top of bridge, , nice convenience stuff). if want call cocoa methods, use pyobjc, typically importing either cocoa or foundation.
scripting bridge bridge between python language , apple event-based scripting system. if want call app's scripting interface, use scripting bridge. (in cases, if you're using scripting bridge, you'll want import foundation, because scripting bridge deals things nsarrays, etc.)
so, pyobjc not example of scripting bridge. example of scripting bridge is, well, scripting bridge, or appscript (which better, not apple, , no longer maintained).
py2app has nothing either of these; it's way wrap python application, of extension modules requires, , of python interpreter necessary, single .app bundle can distribute users can double-click run it. of course such apps have guis, , many of them use pyobjc create guis directly in cocoa (rather using, e.g., pyqt or wxpython), beyond that, there's no real connection.
Comments
Post a Comment