[Pythonmac-SIG] Re: [wxPython-mac] Status summary and embedding/pyobjc
Manoj Plakal
terabaap@yumpee.org
Tue, 05 Mar 2002 18:24:03 -0600
[I'm Ccing this to pythonmac-sig. Please Cc any replies
to me, I'm not subscribed to the list.]
Jack Jansen wrote:
> I'll reply to wxpython-mac, because the question came in here, but I
> think we should continue this discussion on pythonmac-sig....
>
> On dinsdag, maart 5, 2002, at 10:54 , Manoj Plakal wrote:
>> Also, Python.app is currently compiled against Carbon,
>> and not Cocoa. Is there some reason for this apart from
>> not wanting to make too many changes to the code?
>
> Lack of time. We'll need both Cocoa and Carbon at some point, but as
> Carbon is more important for the short term (as it gives us the IDE, and
> all the existing MacPython functionality) I've left Cocoa to other
> people who are more familiar with it.
>
> I'm hoping that at some point we can have a Python.app that is
> "Cocoa-Carbon-Neutral" and that the Cocoa bootstrapping could be done
> from Python code. But that may be impossible (due to the initialization
> code for the initial Apple events) and moreover I don't understand the
> issues yet. For the time being I would suggest that people start a
> CocoaPython sourceforge project (or hop on to the PyObjc sourceforge
> project, if it exists), and create a CocoaPython.app framework. If I
> understand this message correctly you already have this working, right?
[restating for the benefit of pythonmac-sig]
What I have right now is a *very* trivial Cocoa app built
using Project Builder that does a direct embedding of
Python via Py_Initialize/PyRun_SimpleFile/Py_Finalize.
That's it.
I think that you can flesh this out a little bit to
make a CocoaPython.app and use it with pyobjc to
write Python scripts that access Cocoa, just like
the Classic/Carbon GUI goodies you have in MacPython.
What would even cooler would be to use Interface Builder
to design the UI and write app logic in Python.
Unfortunately, I know nothing about Mac/Cocoa programming
but I'm willing to use this as an excuse to learn :)
I'm not sure of actually starting a new project or
anything, I've started too many that are languishing
in various stages of incompleteness :) But I'll be glad
to play around with the Cocoa/pyobjc stuff and see
if I can do some GUI apps.
As for wxPython on Mac, it looks like the best bet
is to get wxMac working with Python.app. If we can
fix the menubars, allow multiple Python.app instantiations,
and get dock icons changeable, we should be good
to go ...
Manoj