Re: [Pyobjc-dev] Using Python from ObjC tutorial - Need help
Brought to you by:
ronaldoussoren
From: Jack J. <Jac...@cw...> - 2003-06-17 08:37:18
|
On Tuesday, Jun 17, 2003, at 07:20 Europe/Amsterdam, Ronald Oussoren wrote: >>> Is the "existing project" something you have the sources for or do >>> you want to write a plugin? >> >> The former. I want to write a tutorial that lets people start with an >> existing Apple example (/Developer/Examples/AppKit/SimpleComboBox) >> and use Python to extend that app in a way that would be more >> difficult in ObjC. > > That's a great idea, and not something we support at the moment. I > don't think you can do this without building your own copy of python > because Apple's python doesn't include a (shared) library. Actually: no, I plan to cop out here. I'm just going to replace the existing skeleton main.m program with its Python equivalent. But now that I think of it: if I'm going to do this I might as well start with a fresh project from the PyObjC templates and tell the user to copy the existing stuff from the old project into it. But: in the long run doing semi-automatic support for including Python into existing ObjC projects should be done too. For 2.2 there's the problem that there's no shared library, but not for 2.3 (and I would be surprised if Apple doesn't fix this problem for OSX 10.3, too). We would need a bit of boilerplate ObjC code that you call and that will initialize the interpreter and adds your Resources directory to sys.path. I think that's all that is needed. -- Jack Jansen, <Jac...@cw...>, http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman |