[Pythonmac-SIG] Python control/integration of a Cocoa/Quicktime application?
hengist.podd at virgin.net
Fri Oct 26 14:53:32 CEST 2007
Darran Edmundson wrote:
> I have a python program on the Mac that determines, among other
> things, the screen location. The OS X developers are going to
> write a full-screen Cocoa application [...] The question then: how
> to join these two codes?
> 1) Get the Mac guys to write their application as a library that
> can be wrapped in pyObjC and invoked by my python program. In this
> scenario, the result is only one process/program with no network
> 2) Add networking code to both the python and cocoa apps in order
> to communicate (binary socket, XML over http, Bonjour, etc.). Easy
> in python via Twisted, no doubt less so in cocoa.
Jack's already given advice on #1 and suggested embedding Python as a
As for the IPC option, you're pretty well covered there too. The two
high-level approaches I'd recommend investigating are:
1. Apple events using appscript/aem on the client side and OS X's
Cocoa Scripting framework on the server side (although there are
other options available as well).
2. Cocoa's Distributed Objects system, using PyObjC on the client side.
More information about the Pythonmac-SIG