Questions on using Qt or wxWindows with Python and OS X

Discussion in 'Python' started by Kenneth McDonald, May 31, 2005.

  1. 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
    Kenneth McDonald, May 31, 2005
    #1
    1. Advertising

  2. Kenneth McDonald

    Kevin Walzer Guest

    -----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
    mailto:
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.1 (Darwin)
    Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

    iD8DBQFCnQ1mJmdQs+6YVcoRAub0AJ9fw6yLi+ZarCnT9AbaR3CotKfqeACeN1rI
    quUqc9dh7LKXLUs6IQFlz9o=
    =SwEx
    -----END PGP SIGNATURE-----
    Kevin Walzer, Jun 1, 2005
    #2
    1. Advertising

  3. Kenneth McDonald

    Tim Jarman Guest

    Hi Kenneth!

    In article <>,
    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.
    >


    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.
    Tim Jarman, Jun 9, 2005
    #3
  4. On Thursday 09 June 2005 8:07 pm, Tim Jarman wrote:
    > Hi Kenneth!
    >
    > In article <>,
    >
    > 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.

    >
    > 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/listinfo/pyqt-mac-list

    Phil
    Phil Thompson, Jun 9, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Laura Lucas
    Replies:
    0
    Views:
    512
    Laura Lucas
    Feb 24, 2004
  2. Shagshag
    Replies:
    8
    Views:
    3,140
    Shagshag
    Aug 13, 2003
  3. Ian Adams
    Replies:
    0
    Views:
    325
    Ian Adams
    Apr 16, 2004
  4. Sathyaish

    How is wxWindows related to Python?

    Sathyaish, Oct 2, 2005, in forum: Python
    Replies:
    4
    Views:
    348
    Sathyaish
    Oct 2, 2005
  5. Replies:
    0
    Views:
    265
Loading...

Share This Page