[Pythonmac-SIG] Simple PyObjC question: real or vapor?
ronaldoussoren at mac.com
Wed Apr 6 15:27:45 CEST 2011
(Sorry about the formatting of the e-mail, MobileMe's webmail and mailinglists don't like each other)
On 06 Apr, 2011,at 01:10 PM, Temescal <phammer at cardious.com> wrote:
3 April 2011
Using my MacBook (intel 64 bit dual core), OSX 10.6.7, standard System
(2.6,2.5,2.3), a standard python install of 2.7 (32 bit) in a Library
framework, Xcode 3.2.5, I would
like to write some GUI based python programs for the Mac.
1) The Apple developer article "Using PyObjC for Developing Cocoa
Applications with Python" is
hopelessly outdated. PyObjC and py2app are not under the Developer folder
but are under the
System/Library/Frameworks/.../Extras/lib/python folder Xcode new project
has no option for selecting
a PyObjC application, etc.
Xcode no longer includes the PyObjC templates and I haven't packaged them yet (mostly because they IMO need changes and I haven't had time to dig into that yet, and changing templates requires a lot of time because there are no useful tools that make it easier to work with templates).
2) The PyObjC website ambiguously states
"The stable release front is rather hazy at the moment, I'm sorry for that
and intend to fix that in
the near feature." The indications are, this was composed some time ago, as
2.3 appears to be the
current package. The web site advises using easy_install, but the web has
widely conflicting opinions
on easy_install's value, and moreover the recommended command "$
easy_install pyobjc=2.2b1" fails.
Easy_install for version 2.3 should work. I finally have a working test setup again and hope to start working on pyobjc 2.4 again.
3) I've used easy_install successfully exactly once to install lxml. I've
shunned MacPorts and Fink
because of the various web reports about their frailty, and also because
using them seems to be
incomprehensibly complex. I tried a variation on the PyObjC command:
which runs, giving a plethora of errors, and installs various eggs in
this despite "$which python" offers up python 2.7 as the default python.
Moreover, as reported in
another thread, _ScreenSaver fails to install. _2to3 is not recognized as a
distribution option, suggesting
that perhaps python 3 needs to be installed, but logically, if that were the
case, it should be so
reported by easy_install. Or, perhaps it can't find 2to3 which is in the
standard Mac python distribution.
I don't use fink or macports myself, but appearently these work just fine if you don't care about having a separate unix install in their package tree.
Using "$easy_install py2app" works except for failing to install macholib,
which is apparently crucial to
running /usr/local/bin/py2applet, which it also installs.
Easy_install py2app should work, please send my the output of the failing easy_install.
4) Xcode 4, which I just learned about, seems to not support python at all,
according to threads here.
The last preview I checked didn't support Python, but recently someone mentioned that the final release does support Python.
5) Contributions to the various threads in this forum seem to be divided
among those who, like me,
are completely confused and frustrated, and those who seem to have working
useful systems up and
running and don't see any issues at all.
So in summary, in very simple terms, can anyone tell me how to accomplish my
goal or tell me why
my goal is unachievable with my existing tools, and what if anything can be
done to correct the
situation? I've probably put 40 hours of time into web searches and trying
various things. It can't
be this hard, and if it really is this hard, I just won't be writing GUI
apps for the Mac, because
I really like python, more than any other language I've used. I like python
because it is clear, it
works, it is well documented, and it is complete. Thus far, PyObjC is none
The installation of PyObjC should, and shall, be improved but there is documentation. The most important documentation page is <http://pyobjc.sourceforge.net/documentation/pyobjc-core/intro.html>, which explains how PyObjC works. There is no documentation on Apple's frameworks beyond listing unsupported features, and that's by design: the existing ObjC documentation is easy to read and it should be easy enough to mentally translate the ObjC idioms in Apple's documentation to Python.
A big issue w.r.t. PyObjC and py2app is that this is a pretty large project with a single maintainer. What doesn't help is that I barely have time to work PyObjC, which is why development is going slowly and the website hasn't been updated in ages. Development speed is unlikely to change in the forseeable future.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pythonmac-SIG