[Pythonmac-SIG] Python control/integration of a Cocoa/Quicktime application?

Jack Jansen Jack.Jansen at cwi.nl
Fri Oct 26 09:39:05 CEST 2007


If I understand the architecture correctly I would go with option 1.  
And get the Mac guys to write their code in a reusable way, i.e. have  
them export enough low-level functionality in their API. This should  
be easy enough in ObjC.
It'll allow tweaking from the Python side, and if you're lucky during  
the project they'll see the advantage of Python and all jump on the  
bandwagon:-)

BTW: there's a potential third architecture that I can see: write a  
Cocoa app with a Python module embedded. This is similar to option 1,  
but depending on which technologies you use it may be easier to  
structure things with ObjC "in charge" in stead of Python. But if you  
also structure your Python code well it shouldn't be much of a  
problem to switch from design 1 to design 3 later in the development  
process.

On 26-okt-2007, at 9:01, Darran Edmundson wrote:

>
> I have a couple of Cocoa/Quicktime developers working on a small  
> custom
> application.  These guys are very capable at OS X programming but  
> don't
> have any python experience.  I, on the other hand, have a lot of  
> python
> experience but virtually no Mac development experience.  I could  
> really
> do with some advice from someone able to see "the big picture".
>
> A bit of background ... We are working on a museum exhibit where a  
> large
> 65" 1920x1080 screen attached to a Mac Pro is electronically  
> positioned
> on a 4m industrial slide-track via a physical interface device.  Each
> millimeter of track corresponds to a different image in a 4000 frame
> photo-jpeg-encoded Quicktime.  The user tweaks the interface  
> device, the
> screen moves, the image changes appropriately - that's the basic plan.
>
> 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 that handles the display side of things
> (along with some tricks like: change to a new movie; tweak the  
> opacity;
> add a second layer movie; etc.)  The question then: how to join these
> two codes?
>
> Options (that I can think of, probably more worthy of discussion):
>
> 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 issues.
>
> 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.
>
> As always, any advice is much appreciated.
>
> Cheers,
> Darran.
>
> -- 
> Darran Edmundson [darran at edmstudio.com]
> http://www.edmstudio.com
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig

--
Jack Jansen, <Jack.Jansen at cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma  
Goldman




More information about the Pythonmac-SIG mailing list