2
votes

I'm thinking about developing an app for OS X using Python. I don't know Objective C and don't want to learn it right now.

I know and like Python. I'm trying to determine what GUI toolkit to use. I already have a bit of experience with PyQT, but not much. I've also seen that PyObjc or Cocoa-Python seem to allow use of Cocoa UI components from Python.

I'm curious if anyone has any input on how PyObjC stacks up to PyQT. I would be giving up cross platform abilities and I am not sure what I would be gaining.

I'm leaning towards PyQT right now, but wanted to see what you all thought. My big dislike of PyQT is having to pass around strings for the signals and slots. Is PyObjC similar?

1
You dislike PyQt because of the signals and slots? That's why I use it over any other toolkit. What type of application are you trying to make? - Blender
I don't dislike signals and slots at all I love the concept. I just didn't like have to pass C++ function declarations around in Strings. Maybe I was going it wrong? - Jon
I don't recall doing that. Maybe you're talking about passing the C++ data type (int, bool, etc.)? Is there anything special that application is going to do? I'm asking because some toolkits provide nice bindings and data types. - Blender
I have several things in mind, but nothing concrete. I am mostly looking to learn some general Python UI skills. I write Java code for a living, but really enjoy Python for my personal projects and endeavors. - Jon

1 Answers

4
votes

If the only thing stopping you using PyQt is passing strings in signals, then the latest syntax should make your choice much easier. The old syntax (which can still be used) looks like this:

self.connect(self.action, SIGNAL('triggered()'), self.handler)

But the new style signals are much more pythonic:

self.action.triggered.connect(self.handler)