On 4/10/06, Kent Quirk <[EMAIL PROTECTED]> wrote: > > > so, is there something simpler? maybe a simple gui toolkit built on cocoa? > > > There is a simple GUI toolkit built on Cocoa, it's called PyObjC. > > For particularly large values of "simple", I guess. For those who don't > already speak Cocoa, PyObjC is annoyingly cumbersome. Using it requires that > you understand Cocoa enough to know how to read its documentation, understand > its message model, understand the way it handles object allocation, and be > able to use Interface Builder.
The value of simple being: Exposing all of Cocoa, in a standard way so that existing documentation is usable, from Python. The translation makes using Cocoa from Python simple (as simple as it can be). > I get the impression that for those who've used Cocoa and prefer Python, it's > a breath of fresh air...but for those who've not been swimming in a vat of > Cocoa, it's not quite so appetizing. I have not used Objective-C for anything but a couple of trivial tutorials, I dove straight in with Python. I understand there is a bit of a learning curve, and I've blogged about some of my own learning experiences with PyObjC, Renaissance, and my love/hate relationship with Interface Builder on my blog: http://livingcode.blogspot.com/ I've been quiet there for awhile while I write my own blogging software (in PyObjC) to allow me to interate faster and get more of my PyObjC tutorial stuff posted. A lot of the time, when I've felt that I had to do too much work in PyObjC, it's because I was not doing it the Cocoa Way. And I totally agree that it can be a pain to learn The Cocoa Way in order to build a small, simple program. On the other hand, as you graduate to more complex programs, learning to do it right can ease your development work by orders of magnitude, so the investment can pay off. And some of the more hairy parts of Cocoa aren't necessary when you're working in Python, because you can just use the Python standard library (or 3rd party libraries), so you get the best of both worlds. > > There are some efforts at making an even simpler interface, > > namely PyGUI and Renaissance, but I would recommend you work > > with PyObjC, build your UI with Interface Builder, and use > > AppKiDo to supplement Apple's documentation. > > Note this goal from the PyGUI documentation page: > > "Document the API purely in Python terms, so that the programmer does not > need to read the documentation for another GUI library, in terms of another > language, and translate into Python." That can be a good goal, but on the other hand, there is a *lot* of documentation on Cocoa, far more than PyGUI will ever achieve, and the PyObjC bridge makes it trivial to translate that into Python. And I wouldn't expect PyGUI to expose everything from Cocoa (not it's purpose, it's a cross-platform wrapper), so if there's something beyond what PyGUI offers, don't be afraid to dip back to PyObjC. I do think that PyGUI is a much better approach to cross-platform GUI tools than, say, wxPython. The cross-platform abstractions should be kept as high-level as possible, i.e., in Python, not in a huge C++ library that then gets wrapped in Python. --Dethe > > > > - Kent > > _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig