My python programs need a GUI, wxPython or PyQt4?

Discussion in 'Python' started by hg, Jan 23, 2007.

  1. hg

    hg Guest

    Daniel Jonsson wrote:

    > So, I've reached the point where my building pipeline tools actually
    > needs to be used by other people in my company. By this reason I
    > actually need to think about the usability, and I've come to the
    > conclusion that I need a GUI. So, which of the two packages should I
    > learn, and which one is easier to pick up?
    > Thanks in advance!
    >
    > Daniel


    It is best you try both ... I feel they have the same quality.

    The cross plateform issue depends on your needs/constraints ... I need
    cross-platform for commercial applications so I went for wx

    hg
    hg, Jan 23, 2007
    #1
    1. Advertising

  2. So, I've reached the point where my building pipeline tools actually
    needs to be used by other people in my company. By this reason I
    actually need to think about the usability, and I've come to the
    conclusion that I need a GUI. So, which of the two packages should I
    learn, and which one is easier to pick up?
    Thanks in advance!

    Daniel
    Daniel Jonsson, Jan 23, 2007
    #2
    1. Advertising

  3. hg

    James Stroud Guest

    Daniel Jonsson wrote:
    > So, I've reached the point where my building pipeline tools actually
    > needs to be used by other people in my company. By this reason I
    > actually need to think about the usability, and I've come to the
    > conclusion that I need a GUI. So, which of the two packages should I
    > learn, and which one is easier to pick up?
    > Thanks in advance!
    >
    > Daniel


    You may also want to think about licensing issues. I think the license
    for QT is more restrictive than wx. Also, you might want to consider
    Tkinter.
    James Stroud, Jan 23, 2007
    #3
  4. Daniel Jonsson wrote:
    > So, I've reached the point where my building pipeline tools actually
    > needs to be used by other people in my company. By this reason I
    > actually need to think about the usability, and I've come to the
    > conclusion that I need a GUI. So, which of the two packages should I
    > learn, and which one is easier to pick up?
    > Thanks in advance!


    Wow...are you *trying* to start a flamewar? :)

    Anyway, here are a few points to think about. This is by no means
    exhaustive, and I'm sure others will add to (and/or correct) what I say.
    I'm most familiar with Qt, so my comments will be directed that way.

    Qt4 *is* GPL, but you can only use it for free if the software you're
    writing is GPL. So, if there is no issue with you making your source code
    public, there is no problem using Qt. wxWindows is essentially LGPL, so
    might be easier to use, depending on how closely you need to hold your
    source code.

    wxWindows uses Gtk widgets on *nix. In *my opinion* the Qt widgets look
    better, but that's just me.

    From what I've seen of the PyQt4 API, it's very clean and easy to use.

    You can design your forms using the standard QtDesigner and compile them to
    Python by using py-uic. You can also load .ui files at run time if you
    want. I have no idea of the form design facilities in wxWindows, others
    can add their input there.

    It's very easy to create forms with QtDesigner. And also easy to make sure
    they still nicely laid out and proportionate by using layouts and spacers.

    Anyway, those are the thoughts off the top of my head, I'll chime in again
    if I think of more.

    j

    --
    Joshua Kugler
    Lead System Admin -- Senior Programmer
    http://www.eeinternet.com
    PGP Key: http://pgp.mit.edu/  ID 0xDB26D7CE

    --
    Posted via a free Usenet account from http://www.teranews.com
    Joshua J. Kugler, Jan 23, 2007
    #4
  5. On Jan 23, 2007, at 4:01 PM, Daniel Jonsson wrote:

    > So, I've reached the point where my building pipeline tools actually
    > needs to be used by other people in my company. By this reason I
    > actually need to think about the usability, and I've come to the
    > conclusion that I need a GUI. So, which of the two packages should I
    > learn, and which one is easier to pick up?
    > Thanks in advance!
    >
    > Daniel


    Don't forget PyGTK (http://www.pygtk.org), and Tkinter!

    You should really try them all out and make your own decision, IMHO.
    I'm actually using pyobjc for my work, but if I had to support other
    environments, I'd be using PyGTK. (Although I *was* happy with PyQt
    (3) when I was using it).
    Michael Bentley, Jan 23, 2007
    #5
  6. hg

    Paul Rubin Guest

    "Daniel Jonsson" <> writes:
    > So, I've reached the point where my building pipeline tools actually
    > needs to be used by other people in my company. By this reason I
    > actually need to think about the usability, and I've come to the
    > conclusion that I need a GUI. So, which of the two packages should I
    > learn, and which one is easier to pick up?
    > Thanks in advance!


    I've always found tkinter to be adequate so far. The widgets look a
    little bit crude compared with other toolkits, and there's less fancy
    functionality, but it's fairly easy to program and it's included with
    Python. For internal use where you don't need a lot of visual
    slickness to sell the product, it may be ok.

    Another possibility is embed a web server in your application and use
    a browser interface for your gui. That makes it easy to run the
    application on a separate machine from the user, among other things,
    even if you don't try to support multiple simultaneous users like a
    real web server normally would have to.
    Paul Rubin, Jan 23, 2007
    #6
  7. hg

    Peter Decker Guest

    On 1/23/07, Daniel Jonsson <> wrote:
    > So, I've reached the point where my building pipeline tools actually
    > needs to be used by other people in my company. By this reason I
    > actually need to think about the usability, and I've come to the
    > conclusion that I need a GUI. So, which of the two packages should I
    > learn, and which one is easier to pick up?
    > Thanks in advance!


    I strongly prefer the look and feel of wxPython, but I have to write
    apps that run on Windows and Linux, and wxPython looks great on both.

    If you do go with wxPython, I'd strongly recommend using the Dabo
    framework, as they wrap the raw and somewhat ugly wxPython code
    (inherited from its C++ roots) into something much more Pythonic and
    consistent. Apps that took me all day in wxPython take me a couple of
    hours using the dabo.ui module.

    --

    # p.d.
    Peter Decker, Jan 23, 2007
    #7
  8. hg

    Daniel Guest

    I've downloaded both the wxPython and the PyQt4 package, and by the
    first impression I must say that the PyQt4 system had a very
    compelling presentation. From what I can understand from the feedback
    I've gotten so far is that the wxPython is a better choice when it
    comes to compability (with linux), and it's free even if I want to
    create applications and sell them.
    So, from what I understand I will have to go with PyQt4 since (from
    my understanding):
    1. I will not sell the applications I'm working with since they will
    only be used by the internal QA at a computer game company.
    2. There seems to be a lot of documentation available for PyQt4.
    3. PyQt4 seems to be easier to learn.
    4. My programs does not need to support Linux or Unix.
    Or am I wrong? Flame people, for the love of God, flame!! :)

    -Daniel
    Daniel, Jan 23, 2007
    #8
  9. Daniel wrote:

    > I've downloaded both the wxPython and the PyQt4 package, and by the
    > first impression I must say that the PyQt4 system had a very
    > compelling presentation. From what I can understand from the feedback
    > I've gotten so far is that the wxPython is a better choice when it
    > comes to compability (with linux), and it's free even if I want to
    > create applications and sell them.
    > So, from what I understand I will have to go with PyQt4 since (from
    > my understanding):
    > 1. I will not sell the applications I'm working with since they will
    > only be used by the internal QA at a computer game company.


    Even that is getting on shaky ground, at least according to Troll Tech.
    See: http://www.trolltech.com/developer/knowledgebase/190/ So, write it
    for internal use, and put up for distribution on your personal web site
    (pending company approval, of course).

    j

    --
    Joshua Kugler
    Lead System Admin -- Senior Programmer
    http://www.eeinternet.com
    PGP Key: http://pgp.mit.edu/  ID 0xDB26D7CE

    --
    Posted via a free Usenet account from http://www.teranews.com
    Joshua J. Kugler, Jan 24, 2007
    #9
  10. hg

    Harry George Guest

    "Joshua J. Kugler" <> writes:

    > Daniel wrote:
    >
    > > I've downloaded both the wxPython and the PyQt4 package, and by the
    > > first impression I must say that the PyQt4 system had a very
    > > compelling presentation. From what I can understand from the feedback
    > > I've gotten so far is that the wxPython is a better choice when it
    > > comes to compability (with linux), and it's free even if I want to
    > > create applications and sell them.
    > > So, from what I understand I will have to go with PyQt4 since (from
    > > my understanding):
    > > 1. I will not sell the applications I'm working with since they will
    > > only be used by the internal QA at a computer game company.

    >
    > Even that is getting on shaky ground, at least according to Troll Tech.
    > See: http://www.trolltech.com/developer/knowledgebase/190/ So, write it
    > for internal use, and put up for distribution on your personal web site
    > (pending company approval, of course).
    >
    > j
    >
    > --
    > Joshua Kugler
    > Lead System Admin -- Senior Programmer
    > http://www.eeinternet.com
    > PGP Key: http://pgp.mit.edu/  ID 0xDB26D7CE
    >
    > --
    > Posted via a free Usenet account from http://www.teranews.com
    >


    There are several OSS suppliers that use GPL, and then try to define
    its meaning. They are welcome to comment on their understanding of
    the GPL, but they do not have the authority to actually define its
    legal ramifications. Check with your company legal staff.

    Having said that, I have been troubled by trolltech's approach from
    the beginning, and therefore stay away from it. PyGTK and wdxPython
    are solid GUIs, without the legal uncertainty.


    --
    Harry George
    PLM Engineering Architecture
    Harry George, Jan 24, 2007
    #10
  11. hg

    hg Guest

    Laurent Rahuel wrote:

    > Hi,
    >
    > I known this can be impossible but what about an "HTML" GUI ?
    >
    > Daniel Jonsson wrote:
    >
    >> So, I've reached the point where my building pipeline tools actually
    >> needs to be used by other people in my company. By this reason I
    >> actually need to think about the usability, and I've come to the
    >> conclusion that I need a GUI. So, which of the two packages should I
    >> learn, and which one is easier to pick up?
    >> Thanks in advance!
    >>
    >> Daniel


    I think it has been proposed.

    I have customers that require that but usually find two major issues with
    the concept:

    1) Unless very knowledgeable in Ajax, it is quite difficult to reach the
    same level of functionnality from a browser
    2) accessing local devices generally requires browser plugins (XPCOM for
    mozilla and ActiveX for IE) .... which are a pain to code and are
    considered a security breach.

    hg
    hg, Jan 24, 2007
    #11
  12. hg

    hg Guest

    Kevin Walzer wrote:

    > Kevin Walzer wrote:
    >
    >>
    >> Tablelist: http://www.nemethi.de/
    >> Tabelist for Tkinter (with Tile support):
    >> http://tkinter.unpythonic.net/wiki/TableListTileWrapper
    >>

    >
    > Additionally, here is a link to some screenshots for Tablelist:
    >
    > http://www.nemethi.privat.t-online.de/tablelist/screenshots.html
    >
    >
    > --
    > Kevin Walzer
    > Code by Kevin
    > http://www.codebykevin.com


    Just for info - one of the reasons I stopped using Tkinter a few years ago
    was for the lack of print support (preview ...) - is there such an
    extension today ?

    hg
    hg, Jan 24, 2007
    #12
  13. Hi,

    I known this can be impossible but what about an "HTML" GUI ?

    Daniel Jonsson wrote:

    > So, I've reached the point where my building pipeline tools actually
    > needs to be used by other people in my company. By this reason I
    > actually need to think about the usability, and I've come to the
    > conclusion that I need a GUI. So, which of the two packages should I
    > learn, and which one is easier to pick up?
    > Thanks in advance!
    >
    > Daniel
    Laurent Rahuel, Jan 24, 2007
    #13
  14. hg

    Harry George Guest

    "Chris Mellon" <> writes:

    > On 1/24/07, Giovanni Bajo <> wrote:

    [snip]
    > >
    > > That page is legal babble, trying to trick you into buying (or making your
    > > boss buy) a commercial license. The Qt Open Source edition *IS* GPL and thus
    > > it falls under all the normal GPL clauses and uses, irrespective of what
    > > Trolltech may or may not think.
    > >
    > > For instance, see this FAQ:
    > > http://www.gnu.org/licenses/gpl-faq.html#GPLRequireSourcePostedPublic
    > >
    > > which makes pretty clear that a "company"/"organization" is basically the same
    > > of an "individual". "Releasing a software within a company for internal usage"
    > > is by no means the same of "releasing it to the public". Basically, for what
    > > the GPL is concerned, it is *not* a "release" or a "distribution" at all.
    > >

    >
    > I should point out that the FSFs position in this regard is not
    > supported by copyright law and that the fact that Trolltech takes a
    > different position is something that you should consider strongly. If
    > the FSFs position were true, there would be no need for per-seat
    > licensing of commercial software (because internal distribution
    > wouldn't be). US copyright law does not draw a distinction between
    > "internal distribution" and any other kind, and I'm not aware of any
    > case law that does so either. This distinction is also not codified in
    > the GPL itself anywhere, so it's not a necessary condition of the
    > license - it is an interpretation by the FSF and that is all.

    [snip]

    It is all interpretation -- even after some cases have wandered
    through the courts. Mostly the trolltech statements indicate their
    intent to sue. That right there tells me I want to go elsewhere.


    --
    Harry George
    PLM Engineering Architecture
    Harry George, Jan 24, 2007
    #14
  15. hg

    David Boddie Guest

    On Jan 24, 12:09 am, "Daniel" <> wrote:
    > I've downloaded both the wxPython and the PyQt4 package, and by the
    > first impression I must say that the PyQt4 system had a very
    > compelling presentation. From what I can understand from the feedback
    > I've gotten so far is that the wxPython is a better choice when it
    > comes to compability (with linux), and it's free even if I want to
    > create applications and sell them.


    Can you explain why you think wxPython is a better choice with respect
    to "compatibility (with linux)"?

    > So, from what I understand I will have to go with PyQt4 since (from
    > my understanding):
    > 1. I will not sell the applications I'm working with since they will
    > only be used by the internal QA at a computer game company.
    > 2. There seems to be a lot of documentation available for PyQt4.
    > 3. PyQt4 seems to be easier to learn.
    > 4. My programs does not need to support Linux or Unix.


    Qt is a cross-platform framework, so you would get support for
    X11-based
    platforms, anyway.

    David
    David Boddie, Jan 24, 2007
    #15
  16. On 24/01/2007 1.45, Joshua J. Kugler wrote:

    >> I've downloaded both the wxPython and the PyQt4 package, and by the
    >> first impression I must say that the PyQt4 system had a very
    >> compelling presentation. From what I can understand from the feedback
    >> I've gotten so far is that the wxPython is a better choice when it
    >> comes to compability (with linux), and it's free even if I want to
    >> create applications and sell them.
    >> So, from what I understand I will have to go with PyQt4 since (from
    >> my understanding):
    >> 1. I will not sell the applications I'm working with since they will
    >> only be used by the internal QA at a computer game company.

    >
    > Even that is getting on shaky ground, at least according to Troll Tech.
    > See: http://www.trolltech.com/developer/knowledgebase/190/ So, write it
    > for internal use, and put up for distribution on your personal web site
    > (pending company approval, of course).


    That page is legal babble, trying to trick you into buying (or making your
    boss buy) a commercial license. The Qt Open Source edition *IS* GPL and thus
    it falls under all the normal GPL clauses and uses, irrespective of what
    Trolltech may or may not think.

    For instance, see this FAQ:
    http://www.gnu.org/licenses/gpl-faq.html#GPLRequireSourcePostedPublic

    which makes pretty clear that a "company"/"organization" is basically the same
    of an "individual". "Releasing a software within a company for internal usage"
    is by no means the same of "releasing it to the public". Basically, for what
    the GPL is concerned, it is *not* a "release" or a "distribution" at all.

    Thus, it is well possible to write internal GPL software, using the Qt Open
    Source library, and to release/distribute/use it *ONLY* internally. Also, it
    should be made clear that a company can of course relicense its own
    proprietary libraries as GPL for internal usage only, so that they can be
    linked to other GPL libraries "legally". For instance, in the case of Daniel
    and his game company, they can link their proprietary game code to PyQt4 (Open
    source edition) to produce an internal tool, like a level editor, which would
    then fall under the GPL. If and only if they were to release that tool to the
    public (either for free or for sale), they would have to either go GPL and
    release full source code (include the parts of their game code linked to it),
    or buy a Qt commercial license.

    [[ Another page of similar babble is the one where they try to convince you
    that you cannot use the Qt Open Source edition to develop a software, and then
    buy the commercial edition only the day before you want to release it as non
    open-source. I can't even understand how they can even try to support such a
    nonsense position. You're free to develop your software for years as GPL
    without distributing it, and then relicense your own code whenever you want.
    They're obviously just trying to scare people. ]]
    --
    Giovanni Bajo
    Giovanni Bajo, Jan 24, 2007
    #16
  17. hg

    David Boddie Guest

    On Jan 24, 3:00 pm, Giovanni Bajo <> wrote:

    > Thus, it is well possible to write internal GPL software, using the Qt Open
    > Source library, and to release/distribute/use it *ONLY* internally.


    http://www.gnu.org/licenses/gpl-faq.html#GPLRequireSourcePostedPublic

    > Also, it
    > should be made clear that a company can of course relicense its own
    > proprietary libraries as GPL for internal usage only, so that they can be
    > linked to other GPL libraries "legally".


    That seems to be a reasonable approach, though it seems to me that the
    GPL grants even "internal" users certain rights.

    > [[ Another page of similar babble is the one where they try to convince you
    > that you cannot use the Qt Open Source edition to develop a software, and then
    > buy the commercial edition only the day before you want to release it as non
    > open-source. I can't even understand how they can even try to support such a
    > nonsense position. You're free to develop your software for years as GPL
    > without distributing it, and then relicense your own code whenever you want.
    > They're obviously just trying to scare people. ]]


    That's nothing to do with any restrictions in the GPL; it's more to do
    with
    purchasing a commercial license. Obviously, if you're operating a dual
    licensing scheme, it's not in your interest to encourage people to
    pretend
    to write open source software up until the day it is released as a
    closed
    source product. That sort of behaviour is not exactly inviting mutual
    trust
    between vendor and customer, is it?

    David
    David Boddie, Jan 24, 2007
    #17
  18. hg

    Kevin Walzer Guest

    Daniel Jonsson wrote:
    > So, I've reached the point where my building pipeline tools actually
    > needs to be used by other people in my company. By this reason I
    > actually need to think about the usability, and I've come to the
    > conclusion that I need a GUI. So, which of the two packages should I
    > learn, and which one is easier to pick up?
    > Thanks in advance!
    >
    > Daniel


    I recommend Tkinter. By itself, Tkinter is too basic (it only supports
    buttons, labels, frames, and so on), but if you add extension packages
    such as Tablelist (for data display), Tile (for platform-native
    theming), and TkTreeCtrl (for tree views), it can produce GUI's that are
    just as rich as those available from wx or Qt.

    Here are some links for more info:

    Tile: http://tktable.sourceforge.net/tile
    Tile for Tkinter: http://tkinter.unpythonic.net/wiki/TileWrapper

    Tablelist: http://www.nemethi.de/
    Tabelist for Tkinter (with Tile support):
    http://tkinter.unpythonic.net/wiki/TableListTileWrapper

    Tktreectrl: http://tktreectrl.sourceforge.net/
    Treectrl for Tkinter: http://klappnase.zexxo.net/TkinterTreectrl/index.html

    All these libraries are open-source and available under
    commercial-friendly terms (BSD-style licenses).

    I make heavy use of Tile and Tablelist in my applications. Tktreectrl is
    incredibly powerful, but is also quite complex, and I have not used it
    myself in an application.

    --
    Kevin Walzer
    Code by Kevin
    http://www.codebykevin.com
    Kevin Walzer, Jan 24, 2007
    #18
  19. hg

    Kevin Walzer Guest

    Kevin Walzer, Jan 24, 2007
    #19
  20. hg

    Kevin Walzer Guest

    hg wrote:
    > Kevin Walzer wrote:
    >
    >> Kevin Walzer wrote:
    >>
    >>> Tablelist: http://www.nemethi.de/
    >>> Tabelist for Tkinter (with Tile support):
    >>> http://tkinter.unpythonic.net/wiki/TableListTileWrapper
    >>>

    >> Additionally, here is a link to some screenshots for Tablelist:
    >>
    >> http://www.nemethi.privat.t-online.de/tablelist/screenshots.html
    >>
    >>
    >> --
    >> Kevin Walzer
    >> Code by Kevin
    >> http://www.codebykevin.com

    >
    > Just for info - one of the reasons I stopped using Tkinter a few years ago
    > was for the lack of print support (preview ...) - is there such an
    > extension today ?
    >
    > hg
    >

    Printing is the one glaring omission from Tk/Tkinter--at least a unified
    printing framework. There are platform-specific extensions for Mac and
    Windows. On *Nix, I think most Tk/Tkinter programs just call lpr. None
    of these libraries work in quite the same way, so there isn't a simple
    way to simply call a standard Tk/Tkinter function to print your data.

    This recent thread on comp.lang.tcl discusses the issue:

    http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/735c4612541f8669/707463acf6d02c46?

    --
    Kevin Walzer
    Code by Kevin
    http://www.codebykevin.com
    Kevin Walzer, Jan 24, 2007
    #20
    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. ulysses
    Replies:
    4
    Views:
    757
    Werner Schiendl
    Oct 22, 2003
  2. Stephen Ferg
    Replies:
    0
    Views:
    497
    Stephen Ferg
    Mar 4, 2004
  3. lone_eagle
    Replies:
    3
    Views:
    623
    psykeedelik
    May 26, 2009
  4. wgw
    Replies:
    1
    Views:
    455
  5. rewonka
    Replies:
    1
    Views:
    1,154
    Detlev Offenbach
    Dec 15, 2009
Loading...

Share This Page