Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Questions on using Qt or wxWindows with Python and OS X

Reply
Thread Tools

Questions on using Qt or wxWindows with Python and OS X

 
 
Kenneth McDonald
Guest
Posts: n/a
 
      05-31-2005
If this is not an appropriate newsgroup for this type of posting,
please let me know and (if possible) suggest an alternative. I've
done a fair bit of research on the net, but information is scattered
all over the place and I haven't been able to find mailing lists
relating specifically to python and UIs.

I'd like to start using Python for some GUI programming again. I'd
like to use Tk, but it seems to be dying a slow death, so it's
probably time to look at wxPython and PythonQt.

I'd appreciate any comments on the relevant merits of these two
libraries, both with respect to Python and more generally. I know
about the differences in licensing, that's not an issue. My most
specific concerns are ease of use (which includes how much in the way
of documentation or examples for using through Python are available,
and how easy the Python libs are to use in each case); availability of
a generally capable styled text widget, as one of the things I need to
build is an editor, which needs to be able to handle different fonts,
styles, tabs, and so forth; and ease of installation on a Macintosh,
since that is my preferred dev platform, and installing things made
for other UNIX variants can be a little wonky at times.

I'm also curious as to the quality of documentation available for
wxPython and wxWindows, and any differences between the
wxWindows text widget (which is generally Scintilla I believe),
and the Qt text widget classes. I've had a hard time finding good
docs for wxWindows or wxPython, and the bit of documentation
on Scintilla I've found and read seems to indicate that it has some
restrictions, such as needing to use the same line height for all lines
regardless of content.

Many thanks for any feedback you can give.


Cheers,
Ken
 
Reply With Quote
 
 
 
 
Kevin Walzer
Guest
Posts: n/a
 
      06-01-2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I maintain a lot of wxPython and PyQt packages for OS X: in fact, I
released the first generally available binary installer for PyQt on the
Mac. I'm not at an advanced level with either toolkit, but here's my two
cents:

1. Both are robust in the sense of being powerful, fairly comprehensive
toolkits. You probably know that already, but in terms of Python
development on the Mac, either is a viable choice.

2. In terms of developer resources, I'd say that wxPython is clearly
farther along on the Mac. There are more users, more informal
documentation (in terms of tutorials, wikis, etc., especially for
Mac-specific issues), more active development from a hands-on core of
developers, and so on. wxPython also has the advantage of looking
completely native, as it wraps the native Aqua widgets. The wxPython-OS
X package has been a bit buggy in the past, but now at 2.6.0 I'd say
it's very strong.

3. With PyQt, you're more in the wilderness. The Mac community is *very*
small, and as such there's a lot of uncharted territory in terms of
documentation, best practices, etc. The most lively community for PyQt
is, not surprisingly, based on Linux; you'll find mailing lists and lots
of online tutorials geared for Linux. Supporting the Mac also isn't the
main priority for the chief developer of PyQt. I'm not an experienced
enough Python developer to add much to PyQt per se: I released the
binary package simply because I had some experience building Qt apps,
wanted to try PyQt anyway, and figured it would be a useful service to
become the de-facto Mac maintainer.

Another drawback to PyQt is that Qt apps, in general, don't look as
native as wxPython. The differences are subtle but they are noticable.

Even with these cautios, PyQt runs very well on the Mac, and I've built
a few PyQt applications that ran with no modification on my part.
wxPython apps require some hacks to get all the Mac gui conventions
right (i.e. the help menu, about menu, etc.) This is a testament to the
fact that, at its core, Qt is a very well-designed and documented toolkit.

My personal preference is for wxPython, as it just fits my brain better.
Qt's "signals and slots" approach is, for me, counterintuitive. But I'll
~ continue to support PyQt as long as there's a need for it.

If you want more information, see my software site:
http://www.wordtech-software.com/python.html

I've also done a lot of discussion of Python development on the Mac at
my blog:

http://www.kevin-walzer.com

Hope this helps.

Kenneth McDonald wrote:
| If this is not an appropriate newsgroup for this type of posting,
| please let me know and (if possible) suggest an alternative. I've
| done a fair bit of research on the net, but information is scattered
| all over the place and I haven't been able to find mailing lists
| relating specifically to python and UIs.
|
| I'd like to start using Python for some GUI programming again. I'd
| like to use Tk, but it seems to be dying a slow death, so it's
| probably time to look at wxPython and PythonQt.
|
| I'd appreciate any comments on the relevant merits of these two
| libraries, both with respect to Python and more generally. I know
| about the differences in licensing, that's not an issue. My most
| specific concerns are ease of use (which includes how much in the way
| of documentation or examples for using through Python are available,
| and how easy the Python libs are to use in each case); availability of
| a generally capable styled text widget, as one of the things I need to
| build is an editor, which needs to be able to handle different fonts,
| styles, tabs, and so forth; and ease of installation on a Macintosh,
| since that is my preferred dev platform, and installing things made
| for other UNIX variants can be a little wonky at times.
|
| I'm also curious as to the quality of documentation available for
| wxPython and wxWindows, and any differences between the
| wxWindows text widget (which is generally Scintilla I believe),
| and the Qt text widget classes. I've had a hard time finding good
| docs for wxWindows or wxPython, and the bit of documentation
| on Scintilla I've found and read seems to indicate that it has some
| restrictions, such as needing to use the same line height for all lines
| regardless of content.
|
| Many thanks for any feedback you can give.
|
|
| Cheers,
| Ken


- --
Cheers,

Kevin Walzer, PhD
WordTech Software--Open Source Applications and Packages for OS X
http://www.wordtech-software.com
http://www.kevin-walzer.com
(E-Mail Removed)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCnQ1mJmdQs+6YVcoRAub0AJ9fw6yLi+ZarCnT9AbaR3 CotKfqeACeN1rI
quUqc9dh7LKXLUs6IQFlz9o=
=SwEx
-----END PGP SIGNATURE-----
 
Reply With Quote
 
 
 
 
Tim Jarman
Guest
Posts: n/a
 
      06-09-2005
Hi Kenneth!

In article <(E-Mail Removed)>,
Kenneth McDonald <(E-Mail Removed)> wrote:

> If this is not an appropriate newsgroup for this type of posting,
> please let me know and (if possible) suggest an alternative. I've
> done a fair bit of research on the net, but information is scattered
> all over the place and I haven't been able to find mailing lists
> relating specifically to python and UIs.
>


AFAIK there isn't a specific newsgroup/mailing list for Python GUIs in
general, although perhaps there should be. This is as good a place to
ask as any, I'd guess.

> I'd like to start using Python for some GUI programming again. I'd
> like to use Tk, but it seems to be dying a slow death, so it's
> probably time to look at wxPython and PythonQt.
>


If you're ONLY interested in OS X, then you should be aware of PyObjC
(see http://pyobjc.sourceforge.net/ for details) which will let you
write Cocoa GUIs directly. (Yes, you probably already know about this,
but still.) This is probably the best option for OS X only apps, but of
course it isn't portable to other platforms.

> I'd appreciate any comments on the relevant merits of these two
> libraries, both with respect to Python and more generally. I know
> about the differences in licensing, that's not an issue.


I'm currently using wxPython for a moderately large (~ 70K LOC) OS X
project. The docs aren't bad if you can translate C++ to Python; there
are also some Python-specific docs coming along (see
http://www.wxpython.org/docs/api/ ). There's also a wiki at
http://wiki.wxpython.org/ which includes a useful cookbook section. The
demo is the best documentation though, and worth its weight in something
very valuable.

I have Qt installed on my Mac but haven't played with it much as yet.
It's generally held to be the best of the cross-platform GUI toolkits
from a technical POV, modulo licensing issues on Windows, which are
changing in ways I don't know much about because I don't care about
Windows, so I can't help you with that. If you do care about Windows,
though, I know from a previous life that wx looks good on that platform;
I can't speak to Qt. I have the impression that Qt is more mature/stable
in general than wx.

There's an online book on PyQt by Boudewijn Rempt (see
http://www.opendocs.org/pyqt/ ) - I think it's a bit dated now, but
still worth a look.

Having said all that, if I were doing my project again I'd use PyObjC.

> My most
> specific concerns are ease of use (which includes how much in the way
> of documentation or examples for using through Python are available,
> and how easy the Python libs are to use in each case); availability of
> a generally capable styled text widget, as one of the things I need to
> build is an editor, which needs to be able to handle different fonts,
> styles, tabs, and so forth; and ease of installation on a Macintosh,
> since that is my preferred dev platform, and installing things made
> for other UNIX variants can be a little wonky at times.
>


As far as application deployment goes, both wx and Qt are easy to deploy
on OS X using py2app (included with PyObjC but also available
separately).

> I'm also curious as to the quality of documentation available for
> wxPython and wxWindows, and any differences between the
> wxWindows text widget (which is generally Scintilla I believe),
> and the Qt text widget classes. I've had a hard time finding good
> docs for wxWindows or wxPython, and the bit of documentation
> on Scintilla I've found and read seems to indicate that it has some
> restrictions, such as needing to use the same line height for all lines
> regardless of content.
>


See http://www.yellowbrain.com/stc/index.html for the gory details of
using the Scintilla-based widget. There's also the wxWindows text
control, which may be sufficient for your needs. (I believe there is
also a Scintilla-based text widget for Qt.)

I've tried various GUI toolkits looking for text-widget Nirvana, and the
best I've found is good ol' Tk. Unfortunately Tk/Aqua is still a long
way from looking lovely IMHO. You might want to check it out all the
same if text processing is your thing. I'm sure there are people here
who would disagree that it's "dying a slow death" just yet.


> Many thanks for any feedback you can give.
>
>
> Cheers,
> Ken


HTH,

Tim

--
Remove luncheon meat to reply.
 
Reply With Quote
 
Phil Thompson
Guest
Posts: n/a
 
      06-09-2005
On Thursday 09 June 2005 8:07 pm, Tim Jarman wrote:
> Hi Kenneth!
>
> In article <(E-Mail Removed)>,
>
> Kenneth McDonald <(E-Mail Removed)> wrote:
> > If this is not an appropriate newsgroup for this type of posting,
> > please let me know and (if possible) suggest an alternative. I've
> > done a fair bit of research on the net, but information is scattered
> > all over the place and I haven't been able to find mailing lists
> > relating specifically to python and UIs.

>
> AFAIK there isn't a specific newsgroup/mailing list for Python GUIs in
> general, although perhaps there should be. This is as good a place to
> ask as any, I'd guess.


There is a mailing list for PyQt on OS X at...

https://lists.sourceforge.net/lists/.../pyqt-mac-list

Phil
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiplayer 2-D space action shooter in Python (using wxWindows) andrei.zavidei@gmail.com Python 0 10-02-2006 03:50 PM
How is wxWindows related to Python? Sathyaish Python 4 10-02-2005 02:08 AM
XEmacs python mode + WxWindows => Freeze Ian Adams Python 0 04-16-2004 11:02 AM
cygwin and dev-c++ and after that, wxWindows (wxWidgets) Laura Lucas C++ 0 02-24-2004 09:54 PM
email client written with python + wxWindows Shagshag Python 8 08-13-2003 07:29 AM



Advertisments