[Pythonmac-SIG] Re: several messages

Steven Majewski sdm7g@Virginia.EDU
Wed, 5 Dec 2001 15:02:13 -0500 (EST)


On Wed, 5 Dec 2001, Just van Rossum wrote:

> Pete Moore wrote:
>
> > 1.  Python Cocoa integration
> >   a) is it worthwhile?
> >   b) how different is this from traditional  development?
> >   c) would it be a mammoth effort?
> >   d) can interface builder be used for Python GUI app's?
>
> Cocoa:
> I for one would like to play with it. Steve Majewski said he'll try to
> revive pyobjc(.sf.net) so that it'll work with Python 2.2. Over to you Steve...
>

On Wed, 5 Dec 2001, Jack Jansen wrote:

>
> Steve? Are you still with us? Status, please?
>

Hi Guys!

 I've been inactive for a while, due both to a long Thanksgiving break
down at the Outer Banks and problems getting upgraded to 10.1 : first
a long wait for the CD from Apple, and then finding I couldn't install
because my internal CD-ROM has been dead and the external USB drive I
bought couldn't boot from CD. ( Luckily, after a fruitless search for
advice, I found clicking directly on the .mpkg will work as long as
you've got two partitions and a working OSX on one of them. )
 I just finally got it installed over the weekend.


 pyobjc (the current version on SourceForge) *was* working for me under
Python 2.1x and OSX 10.0.* . It would not build or work with Python 2.2x.

 It was possible to create limited GUI app using Cocoa classes from
pyobjc, but what you could do was limited due to:
  [1] the old type/class split: cocoa objects were python objects but
      not python *classes*, so you could not inherit from and extend
      them with new python classes.
  [2] the one major unsolved bug in pyobjc was that it couldn't handle
      delegate objects correctly, which was the other obvious way around
      problem #1 above.
   I did manage to build a HelloWorld.py that put up a window, text,
 and a button, which quit on clicking the button, but it required an
 unnatural (to Cocoa) procedural style of code.

 The plan is to redesign and reimplement pyobjc using the new type/class
system in Python 2.2. ( Unfortunately, I'm not very far along in
implementing this plan.  No -- it shouldn't be a mamoth effort --
I've just been having trouble squeezing it in between everything else.)
This should allow programming Cocoa from Python in an O-O style the
same as it's done from objc -- subclassing and extending NS* widgets.

 I did some experiments with reanimating Project Builder Nibs built
 for another program. This should also be possible. Full supporrt
 for Python in Project Builder would need to wait on Apple opening
 and documenting more of the PB API's (which is something they have
 a stated intention to do)  But even without that full support, you
 should still be able to use PB as a GUI designer -- you just won't
 be able to "wire" the behaviours in from PB.

 If anyone else wants to help out in any capacity: design, coding,
 testing, documentation, etc. -- either send me a note, or join
 up on the sourceforge project <http://sourceforge.net/projects/pyobjc>
 There is a mailing list for the project (which has been completely
 dead lately while things have been idle) but any news will go out
 on that list as well as the pythonmac-sig list.


-- Steve