Re: [Pyobjc-dev] Is this real?
Brought to you by:
ronaldoussoren
From: Ronald O. <ron...@ma...> - 2004-05-23 09:07:55
|
On 23-mei-04, at 9:35, Bob Ippolito wrote: >> Where should I start in proving I've RTFM? How about this: >> >> % cp -R src/PythonGlue.* simpleComboBoxPlus >> >> Where is "src"? Search on google for "PythonGlue.h" yields no clue as >> to its contents. Search on my hard drive yields no result. I find the >> whole of pyobjc documentation this confusing. Not criticizing, I know >> its a lot of work and few people. I just wasn't born knowing this >> stuff. > > [crack:~/src/pyobjc] bob% find . -name "PythonGlue.*" > ./Doc/tutorial_embed/src/PythonGlue.h > ./Doc/tutorial_embed/src/PythonGlue.m > ./Doc/tutorial_embed/src/PythonGlue.py > > That's from CVS, I have no idea what the "pyobjc latest" you installed > contains or where you looked. Those should be in the release as wel (both 1.0 and 1.1b) > >> What do I do to get my ObjC classes to see my python classes or my >> python classes to see MY ObjC classes (former better, but either >> good)? >> >> Shouldn't it be (almost) as simple as: >> >> #include "somefile" > > I can't imagine it will be that simple any time soon, it would be hard > to generate Objective C header files from arbitrary Python source > code. and generating the header files is the easy part :-) > >> or >> >> import somemodule > > Using ObjC classes from Python is pretty easy.. either create a module > and use objc.loadBundle(...), or if you just need a reference to a > class that is already linked in then you can do objc.lookUpClass(...). > Both are used all over the place in PyObjC's source code, though I > did change the semantics of loadBundle slightly today. > > Unfortunately, I'm pretty busy and don't have time to write up any > examples or go through the documentation and fix things.. so I hope > this helped. > > -bob > -- X|support bv http://www.xsupport.nl/ T: +31 610271479 F: +31 204416173 |