My python programs need a GUI, wxPython or PyQt4?

H

hg

Daniel said:
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
 
D

Daniel Jonsson

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
 
J

James Stroud

Daniel said:
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.
 
J

Joshua J. Kugler

Daniel said:
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
 
M

Michael Bentley

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).
 
P

Paul Rubin

Daniel Jonsson said:
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.
 
P

Peter Decker

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.
 
D

Daniel

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
 
J

Joshua J. Kugler

Daniel said:
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
 
H

Harry George

Joshua J. Kugler said:
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

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.
 
H

hg

Laurent said:
Hi,

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

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
 
H

Harry George

Chris Mellon said:
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.
 
D

David Boddie

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
 
G

Giovanni Bajo

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. ]]
 
D

David Boddie

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
 
K

Kevin Walzer

Daniel said:
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.
 
K

Kevin Walzer

hg said:
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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top