Choosing GUI Module for Python


A

Antony

Hi all
I just wanted to know which module is best for developing designing
interface in python .
i have come across some modules which are listed here . please tell
your suggestions and comments to choose best one
1. PyGTK
2. PyQT
3. PySide
4. wxPython
5 . TKinter

Also i need to know is there any IDE for developing these
things . . .
 
Ad

Advertisements

R

r

Hi all
   I just wanted to know which module is best for developing designing
interface in python .
i have come across some modules which are listed here . please tell
your suggestions and comments to choose best one
 1. PyGTK
 2. PyQT
 3. PySide
 4.  wxPython
 5 . TKinter

Also i need to know is there any IDE for developing these
things . . .

You may want to offer a little more info, like what exactly you are
looking to do with such GUI. are your needs for a VW, Corvette, or
Mercedes? etc, etc. All these kits have pros and cons, some better for
this some for that, yadda yadda
 
A

Antony

You may want to offer a little more info, like what exactly you are
looking to do with such GUI. are your needs for a  VW, Corvette, or
Mercedes? etc, etc. All these kits have pros and cons, some better for
this some for that, yadda yadda

I would like to know about that pros and cons only ...
 
S

ssteinerX

I would like to know about that pros and cons only ...

What might be a "pro" for one use case could easily be a "con" for
another.

For example, Kit-X may be infinitely configurable to run on everything
from 800x600 to 1680x1050 pixel monitors with full viewport control,
full zoom, pan, etc. and requires that all those cases be handled
with correct configuration.

That's great if you're writing an application that requires that.

But, if you're writing a Pref Pane for OS X, which will never be any
bigger than the pref-pane window and will only run on OS X, that
particular kit might be a huge waste of time.

The "pro" of infinite flexibility becomes a huge "con" for the OS X
Pref Pane use-case.

S
 
K

Kevin Walzer

Hi all
I just wanted to know which module is best for developing designing
interface in python .
i have come across some modules which are listed here . please tell
your suggestions and comments to choose best one
1. PyGTK
2. PyQT
3. PySide
4. wxPython
5 . TKinter

Also i need to know is there any IDE for developing these
things . . .

http://lmgtfy.com/?q=gui+toolkit+for+python
 
R

r

I would like to know about that pros and cons only ...

I'll reiterate what i have said and others have said. WE NEED MORE
INFO TO PROPERLY GUIDE YOU!!!

Survey: What GUI is right for you?

1. What is your level of GUI programming? (0 1 2 3 4 5)
2. Will you be using this GUI for your own apps or distributing the
apps?
3. What is the primary OS that this app will be used on (or any)?
4. What type of app (graphics(2D/3D), texteditor, hello world)?
5. Are themes/customizable look and feel important?
*. You mentioned IDE's. That of course will narrow your choice pool
substantially.

Tkinter:
+Is included in Python as a built-in module!
+very easy to learn!
+adequate docs!
-lacks professional appearance
-lacks many important widgets
http://infohost.nmt.edu/tcc/help/pubs/tkinter/
http://effbot.org/tkinterbook/

wxPython:
+larger richer widget set than tk!
+better look and feel than tk!
+opengl canvas built-in!
-not as easy to learn as tk
-docs are lacking at best (i really wish this were better!)
-not built-in to Python (rightly so, too big!)


i won't comment on the others. If you have absolutely no experience
try out Tkinter just to a feel for GUI in a hand holding environment.
If you are not happy with Tkinter's simplicity then move on to a full
featured GUI kit if you need the more advanced stuff. I would say try
them all! I would also suggest you learn to code GUI's without an IDE.
I think the experience is more rewarding. You should know every bit of
code you create personally!
 
Ad

Advertisements

D

Dave Cook

1. PyGTK
2. PyQT
3. PySide
4. wxPython
5 . TKinter

For cross-platform work, I'd choose either PyQt or wxPython.

If you're not too worried about the dual license, I find PyQt the best
combination of ease of use and features, particularly when used with
Qt Designer.

For commercial work, I'd use wxPython, which has a very liberal
license. It's fairly featureful, but not very pleasant to use.

Dave Cook
 
S

Simon Hibbs

Having tried most of the options out there, personaly I've settled on
two.

I use Tkinter for ver simple GUIs such as single dialog boxes or
results displays. The advantage of it being built-in to Python
outweighs it's limitations.

For anything more complex, I go for PyQT every time. QTDesigner is a
full drag-and-drop GUI builder that rivals Visual Studio, and PyQT
comes with a script to convert QTDesigner XML files into Python code,
which you then subclass in your own script and attach your own code to
the GUI widgets. There's a longer learning curve than Tkinter, but
it's very much worth it for access to QTs mature and rich framework,
with excellent professional-class documentation. Sorry, but wxWidgets
which I have used doesn't come anywhere close.

The main objection to using PyQT untill now was that for commercial
development you needed to buy a license (it was free for GPL
projects). That's rapidly becoming a non-issue as the core QT
framework is now LGPL and Nokia have a project underway to produce
PyQT compatible LGPL python bindings under the PySide project.

Simon Hibbs
 
G

Grant Edwards

For cross-platform work, I'd choose either PyQt or wxPython.

If you're not too worried about the dual license, I find PyQt
the best combination of ease of use and features, particularly
when used with Qt Designer.

For commercial work, I'd use wxPython, which has a very
liberal license. It's fairly featureful, but not very
pleasant to use.

NB: One thing to I've noticed about wxPython is that if you
follow the rules carefully, the cross-platform behavior
consistency is pretty decent. However, if you're not careful,
it's easy to do something the "wrong" way and have it still
work fine on one platform, but not on another. During
development, you need to test frequently on all the platforms
you care about. If you wait until the end to test on that
second/third platform, you may have accumulated enough minor
problems that it becomes a real chore to try to figure them all
out.
 
L

Lorenzo Gatti

The main objection to using PyQT untill now was that for commercial
development you needed to buy a license (it was free for GPL
projects). That's rapidly becoming a non-issue as the core QT
framework is now LGPL and Nokia have a project underway to produce
PyQT compatible LGPL python bindings under the PySide project.

I also would like to use PySide, but unlike PyQt and Qt itself it
doesn't seem likely to support Windows in the foreseeable future. A
pity, to put it mildly.

Regards,
Lorenzo Gatti
 
S

Simon Hibbs

I also would like to use PySide, but unlike PyQt and Qt itself it
doesn't seem likely to support Windows in the foreseeable future. A
pity, to put it mildly.

It's not been ruled out. They don't officialy support the Mac either,
but according to posts on the mailing list a independent developer has
got it working in MacOS X at some level. Since QT runs on Windows,
porting to the Windows version of QT shouldn't be hard.

PySide is for the future, not the present, but it gives me a lot more
confidence in using and recomending PyQT to know that there is so much
work being put in to make sure it has a great future.

Simon Hibbs
 
Ad

Advertisements

A

Antony

It's not been ruled out. They don't officialy support the Mac either,
but according to posts on the mailing list a independent developer has
got it working in MacOS X at some level. Since QT runs on Windows,
porting to the Windows version of QT shouldn't be hard.

PySide is for the future, not the present, but it gives me a lot more
confidence in using and recomending PyQT to know that there is so much
work being put in to make sure it has a great future.

Simon Hibbs

Thanks All
I have got an idea,the way i need to choose GUI module in Python ,
As "r" said i am going to start from tkinter without any IDE .
if i need any advanced feature then i will move on to some other
module....
First i have to try the code ...
 
L

Lorenzo Gatti

Since QT runs on Windows,
porting to the Windows version of QT shouldn't be hard.

The PySide developers, who are better judges of their own project than
you and me, consider a Windows port so hard (and time consuming) that
they didn't even try; a second iteration of the already working
binding generator has a higher priority than supporting a large
portion of the potential user base with a Windows port, so don't hold
your breath.

On a more constructive note, I started to follow the instructions at
http://www.pyside.org/docs/pyside/howto-build/index.html (which are
vague and terse enough to be cross-platform) with Microsoft VC9
Express.
Hurdle 0: recompile Qt because the provided DLLs have hardcoded wrong
paths that confuse CMake.
How should Qt be configured? My first compilation attempt had to be
aborted (and couldn't be resumed) after about 2 hours: trial and error
at 1-2 builds per day could take weeks.

Regards,
Lorenzo Gatti
 
L

Lorenzo Gatti

On a more constructive note, I started to follow the instructions athttp://www.pyside.org/docs/pyside/howto-build/index.html(which are
vague and terse enough to be cross-platform) with Microsoft VC9
Express.
Hurdle 0: recompile Qt because the provided DLLs have hardcoded wrong
paths that confuse CMake.
How should Qt be configured? My first compilation attempt had to be
aborted (and couldn't be resumed) after about 2 hours: trial and error
at 1-2 builds per day could take weeks.

Update: I successfully compiled Qt (with WebKit disabled since it
gives link errors), as far as I can tell, and I'm now facing
apiextractor.

Hurdle 1a: convince CMake that I actually have Boost headers and
compiled libraries.
The Boost directory structure is confusing (compiled libraries in two
places), and CMake's script (FindBoost.cmake) is inconsistent (should
I set BOOST_INCLUDEDIR or BOOST_INCLUDE_DIR?), obsolete (last known
version is 1.38 rather than the requisite 1.40) and rather fishy (e.g.
hardcoded "c:\boost" paths).
Would the Cmake-based branch of Boost work better? Any trick or recipe
to try?
Hurdle 1b: the instructions don't mention a dependency from libxml2.

Lorenzo Gatti
 
C

catalinfest

Tkinter is deafult on python .
Is more easy to use any editor text (geany).
I donțt see a good IDE for GUI
 
A

Aahz

Ad

Advertisements

S

sturlamolden

   I just wanted to know which module is best for developing designing
interface in python .

I personally feel the wxPython support in the 3.1 beta of
wxFormBuilder makes the choise rather simple. It generates a Python
file with classes for all WYSIWYG GUI forms/windows/dialogs. Then in
our Python code, we just import and inherit the form, and implement
the event handlers. It can't be done easier. GUI programming with
Python is now comparable to programming with VB, Delphi or C#. I am
using it for all my projects now. It just feels right.
 
D

Dietmar Schwertberger

sturlamolden said:
I personally feel the wxPython support in the 3.1 beta of
wxFormBuilder makes the choise rather simple. It generates a Python
file with classes for all WYSIWYG GUI forms/windows/dialogs. Then in
our Python code, we just import and inherit the form, and implement
the event handlers. It can't be done easier. GUI programming with
Python is now comparable to programming with VB, Delphi or C#. I am
using it for all my projects now. It just feels right.

Yes, wxFormBuilder looks very promising.

But I don't think that 3.1 in it's current state it can be recommended
for general use already. I just tried the latest version (from August)
and it does not even generate correct Python code:

self.m_toolBar1 = self.CreateToolBar( wx.TB_HORIZONTAL, wx.ID_ANY )
self.m_button1 = wx.Button( self.m_toolBar1, wx.ID_ANY, u"MyButton",
wx.DefaultPosition, wx.DefaultSize, 0 )
m_toolBar1.AddControl( m_button1 )

(i.e. "self." is missing)



Regards,

Dietmar
 
S

sturlamolden

   self.m_toolBar1 = self.CreateToolBar( wx.TB_HORIZONTAL, wx.ID_ANY )
   self.m_button1 = wx.Button( self.m_toolBar1, wx.ID_ANY, u"MyButton",
wx.DefaultPosition, wx.DefaultSize, 0 )
   m_toolBar1.AddControl( m_button1 )

(i.e. "self." is missing)

I had problem like that with the first beta, but not the one from
August.
 
Ad

Advertisements

D

Dietmar Schwertberger

sturlamolden said:
I had problem like that with the first beta, but not the one from
August.
Which one? There are two:

08/23/2009 Version 3.01.63 (Beta)
08/19/2009 Version 3.01.62 (Beta)

I tried 3.01.63.
I can see in the Python window already that the code is not correct.


Regards,

Dietmar
 

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

Top