Re: [Pythonmac-SIG] needed: simple gui toolkit with japaneseinput support

2006-04-10 Thread Kent Quirk


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dethe Elza
Sent: Monday, April 10, 2006 1:35 PM
To: Gábor Farkas
Cc: pythonmac-sig@python.org
Subject: Re: [Pythonmac-SIG] needed: simple gui toolkit with japaneseinput 
support

  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. 

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.



 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.



- Kent

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] needed: simple gui toolkit with japaneseinput support

2006-04-10 Thread Dethe Elza
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


Re: [Pythonmac-SIG] needed: simple gui toolkit with japaneseinput support

2006-04-10 Thread Kent Quirk

-Original Message-
From: Ronald Oussoren [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 10, 2006 4:42 PM
To: Kent Quirk
Cc: Dethe Elza; Gábor Farkas; pythonmac-sig@python.org
Subject: Re: [Pythonmac-SIG] needed: simple gui toolkit with japaneseinput 
support

snip

 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.

And to second Dethe: I'm also a python programmer that likes Cocoa.  
Heck, I wrote[1] PyObjC because I wanted to use Cocoa from Python.

Which is kinda the point -- you already knew Cocoa and wanted to use it in a 
different context.

I don't wish to argue about what's really easy or difficult about Cocoa. I 
was trying to point out that people who don't use Cocoa already, coming at it 
from Python, find several things about Cocoa to be alien and difficult. And 
attempting to read and use Cocoa's documentation requires that you already 
get Cocoa, and understand the logic behind such things as two-stage object 
creation. 

I'm really not disparaging Cocoa at all as a development platform. I'm merely 
trying to point out the impedance mismatch between it and Python. Sometimes 
people forget how much they had to learn. For people experienced in Cocoa and 
already familiar with it, the similarities are far more important than the 
differences, and PyObjC is a wonderful tool. But for users unfamiliar with 
Cocoa and possibly unfamiliar with the Mac, the learning curve can be 
formidable.

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] needed: simple gui toolkit with japaneseinput support

2006-04-10 Thread Bob Ippolito
On Apr 10, 2006, at 2:21 PM, Kent Quirk wrote:

 From: Ronald Oussoren [mailto:[EMAIL PROTECTED]
 Sent: Monday, April 10, 2006 4:42 PM
 To: Kent Quirk
 Cc: Dethe Elza; Gábor Farkas; pythonmac-sig@python.org
 Subject: Re: [Pythonmac-SIG] needed: simple gui toolkit with  
 japaneseinput support

 snip

 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.

 And to second Dethe: I'm also a python programmer that likes Cocoa.
 Heck, I wrote[1] PyObjC because I wanted to use Cocoa from Python.

 Which is kinda the point -- you already knew Cocoa and wanted to  
 use it in a different context.

 I don't wish to argue about what's really easy or difficult about  
 Cocoa. I was trying to point out that people who don't use Cocoa  
 already, coming at it from Python, find several things about Cocoa  
 to be alien and difficult. And attempting to read and use Cocoa's  
 documentation requires that you already get Cocoa, and understand  
 the logic behind such things as two-stage object creation.

 I'm really not disparaging Cocoa at all as a development platform.  
 I'm merely trying to point out the impedance mismatch between it  
 and Python. Sometimes people forget how much they had to learn. For  
 people experienced in Cocoa and already familiar with it, the  
 similarities are far more important than the differences, and  
 PyObjC is a wonderful tool. But for users unfamiliar with Cocoa and  
 possibly unfamiliar with the Mac, the learning curve can be  
 formidable.

There isn't an impedance mismatch between Python and Cocoa.  The  
impedance mismatch is between Cocoa, which is largely declarative,  
and the other GUI frameworks, which are largely procedural.  Python  
doesn't have any preconception about what a GUI is or how it should  
work (unless Tkinter counts for that, which it probably shouldn't),  
so there can't really be a logical impedance mismatch unless you're  
comparing it to some specific other GUI toolkit.

Using wx or Qt brings lots of C++isms, using Tkinter brings lots of  
TCLisms, and using Cocoa brings Objective-Cisms.  It just so happens  
that Objective-C and Python have very similar object models (more  
similar than the other choices), so there isn't really that much of  
an impedance mismatch there -- except for dynamically chosen  
selectors that happen to depend on non-object signatures.  The  
impedance mismatch is so low in fact that PyObjC doesn't even know  
anything about GUIs either (unlike the other toolkits, which require  
a lot of wrapping), it just knows how to bridge the two language  
runtimes together in a practical way.

-bob

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] needed: simple gui toolkit with japaneseinput support

2006-04-10 Thread Dethe Elza
On 4/10/06, Kent Quirk [EMAIL PROTECTED] wrote:

 -Original Message-
 From: Ronald Oussoren [mailto:[EMAIL PROTECTED]
 Sent: Monday, April 10, 2006 4:42 PM
 To: Kent Quirk
 Cc: Dethe Elza; Gábor Farkas; pythonmac-sig@python.org
 Subject: Re: [Pythonmac-SIG] needed: simple gui toolkit with japaneseinput 
 support

 snip

  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.

 And to second Dethe: I'm also a python programmer that likes Cocoa.
 Heck, I wrote[1] PyObjC because I wanted to use Cocoa from Python.

 Which is kinda the point -- you already knew Cocoa and wanted to use it in a 
 different context.

Can't speak for Ronald (he's already spoken anyhow), but I learned
Cocoa from Python. The most contact I've had with Objective-C is to
port code from it into Python so that other folks coming to Cocoa from
Python will have more examples to draw on.

--Dethe
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig