Python GUI?


E

eamonnrea

There are a few known GUI toolkits out there, and the main ones from what I can tell are:

Tkinter -- Simple to use, but limited
PyQT -- You have a GUI designer, so I'm not going to count that
PyGTK -- Gnome officially back this I think
wxPython -- Very nice, very professional, approved by Python creator, but alas hard to get started with

So, what are your personal preferences and why? Why use X over Y?

I, personally, really like wxPython, but I also really like Tkinter. I've messed with PyGTK, but I'd choose wxPython over it.

Have you got anything to say on what one I should be using(excluding PyQT because it has a D&D designer :mad: )? Is Tkinter really dead? Should I stick with wxPython?

It's might be similar to the "What language to use" argument, or the "What background to code on" argument(I prefer darker backgrounds xD Please don't argue about this though!), in the sense that there is *no* answer, just preference.

Also, with wxPython, it has kind of a "flow" layout like JFrame, whereas it will adjust it's layout to look like a native Mac App, Windows app or Linux App, correct? It'll look almost identical, right? Not that it matters, I'm just curious! :D

Thanks!
 
Ad

Advertisements

M

Michael Torrie

PyQT -- You have a GUI designer, so I'm not going to count that

What do you mean? Gtk has a GUI designer too. what of it?
I, personally, really like wxPython, but I also really like Tkinter.
I've messed with PyGTK, but I'd choose wxPython over it.

Not me. wxWidgets' event model is way too MFC-esque for me. Does it
still use event numbers that you define? Shudder.

Gtk and Qt's method of signals and slots is by far the most powerful and
flexible.
Have you got anything to say on what one I should be using(excluding
PyQT because it has a D&D designer :mad: )? Is Tkinter really dead?
Should I stick with wxPython?

I still don't understand why you are excluding Qt. All modern toolkits
are heading towards imperative GUI design. With Gtk I use Glade and
GtkBuilder. My GUI is in a nice XML file that gets loaded and
manipulated by my python class. It's extremely clean. And in the case
of compiled programming, you don't have to recompile just to tweak
something like a layout.

At the moment if someone were to come in from scratch and ask what GUI
toolkit to use, I would answer Qt with PySide. It's the most
cross-platform of all the toolkits, and it's one of the most mature.
Gtk is also good, but Windows and Mac support is always lagging behind
X11, and it's not as good at fitting into the native look and feel.
Also, with wxPython, it has kind of a "flow" layout like JFrame,
whereas it will adjust it's layout to look like a native Mac App,
Windows app or Linux App, correct? It'll look almost identical,
right? Not that it matters, I'm just curious! :D

Possibly. I know Qt and Gtk both can flip the button orders, etc to
look more native. And all good toolkits give you layout managers so you
never have to resort to fixed layouts. Qt's layout system is very
different than Gtk's, but once you get the feel of it (use the Qt
Designer program!), it makes a lot of sense.
 
E

eamonnrea

What do you mean? Gtk has a GUI designer too. what of it?







Not me. wxWidgets' event model is way too MFC-esque for me. Does it

still use event numbers that you define? Shudder.



Gtk and Qt's method of signals and slots is by far the most powerful and

flexible.








I still don't understand why you are excluding Qt. All modern toolkits

are heading towards imperative GUI design. With Gtk I use Glade and

GtkBuilder. My GUI is in a nice XML file that gets loaded and

manipulated by my python class. It's extremely clean. And in the case

of compiled programming, you don't have to recompile just to tweak

something like a layout.



At the moment if someone were to come in from scratch and ask what GUI

toolkit to use, I would answer Qt with PySide. It's the most

cross-platform of all the toolkits, and it's one of the most mature.

Gtk is also good, but Windows and Mac support is always lagging behind

X11, and it's not as good at fitting into the native look and feel.









Possibly. I know Qt and Gtk both can flip the button orders, etc to

look more native. And all good toolkits give you layout managers so you

never have to resort to fixed layouts. Qt's layout system is very

different than Gtk's, but once you get the feel of it (use the Qt

Designer program!), it makes a lot of sense.

I didn't realise GTK has a GUI designer too :(

I don't like it when you can D&D to position things. I don't understand whysomeone wouldn't want to write the positioning code, and have fun with thedebugging. That's the best part about writing a program, in my opinion. I'm against D&D with programming, and I'm not sure why.
 
R

Robert Kern

I didn't realise GTK has a GUI designer too :(

I don't like it when you can D&D to position things. I don't understand why someone wouldn't want to write the positioning code, and have fun with the debugging. That's the best part about writing a program, in my opinion. I'm against D&D with programming, and I'm not sure why.

There is nothing forcing you to use the GUI designers if you don't want to.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
 
B

Benjamin Kaplan

I didn't realise GTK has a GUI designer too :(

I don't like it when you can D&D to position things. I don't understand
why someone wouldn't want to write the positioning code, and have fun with
the debugging. That's the best part about writing a program, in my opinion.
I'm against D&D with programming, and I'm not sure why.
There are gui designers for wx as well. Doesn't mean you ever have to use
any of them (although I wouldn't want to write windows forms code by hand).
I do find it generally nicer to work with the markup formats (xrc for wx,
xaml for wpf, and so on) rather than trying to describe a gui in a
programming language.

The main difference between wx and qt is that qt looks native on every
platform while wx *is* native on every platform (it uses native controls
wherever possible). This means that wx integrates into the OS better, but
your also more likely to need OS-specific tweaks in wx, at least from my
experience from a few years ago.
 
J

Jerry Hill

Have you got anything to say on what one I should be using(excluding PyQT because it has a D&D designer :mad: )? Is Tkinter really dead? Should I stick with wxPython?

If that's a reason for excluding a GUI toolkit, you're in trouble.
Drag and drop layout tools exist for all of your proposed systems.
 
Ad

Advertisements

D

Dave Cook

Not me. wxWidgets' event model is way too MFC-esque for me. Does it
still use event numbers that you define? Shudder.

You don't have to define IDs explicitly. That's been the case for a
long time.
Gtk and Qt's method of signals and slots is by far the most powerful and
flexible.

wxPython's event manager adds some flexibility.

Dave Cook
 
I

Ian Foote

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

There are a few known GUI toolkits out there, and the main ones
from what I can tell are:

Tkinter -- Simple to use, but limited PyQT -- You have a GUI
designer, so I'm not going to count that PyGTK -- Gnome officially
back this I think wxPython -- Very nice, very professional,
approved by Python creator, but alas hard to get started with

So, what are your personal preferences and why? Why use X over Y?

I, personally, really like wxPython, but I also really like
Tkinter. I've messed with PyGTK, but I'd choose wxPython over it.

Have you got anything to say on what one I should be
using(excluding PyQT because it has a D&D designer :mad: )? Is
Tkinter really dead? Should I stick with wxPython?

It's might be similar to the "What language to use" argument, or
the "What background to code on" argument(I prefer darker
backgrounds xD Please don't argue about this though!), in the sense
that there is *no* answer, just preference.

Also, with wxPython, it has kind of a "flow" layout like JFrame,
whereas it will adjust it's layout to look like a native Mac App,
Windows app or Linux App, correct? It'll look almost identical,
right? Not that it matters, I'm just curious! :D

Thanks!

Another GUI toolkit is kivy (kivy.org). It has a focus on supporting a
wide range of platforms, including Android and IOs, and various input
devices (mouse, keyboard, touchscreen, etc).

Kivy is in active development and I think is well worth a look.

Regards,
Ian F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSMiFNAAoJEODsV4MF7PWzOsAH/3hidUN4pNxDG5ox2hNmfFkz
g8D+hhXz/zKC+MpEh2iEm9G9NhaxoSTLQkcsUs5bxL9MvIQ0TYy68/vbQddRA52I
GN0ofz8+E5h7MX57wegE/uxv0N9+CjdpWfwOfESoR5TXGUD8tr9ONEKAENLvod3W
JUgU0KvN410J8+2yxI+LKpqezW3hNr43VoUO4zEmRgCm6KEK6wdKdooI5j45tb9r
HW7vZgd12RCzE4XMVSBRl20xcYB9isi9erP7UnTCep8FUQKV0XxdnXY00rEBPQEm
7hgh66dIX5c2SC3fPgiYHFA7fSv7x4hrCJcokr+z5LEfdzRInra01tqnQLxnA+Q=
=uPwE
-----END PGP SIGNATURE-----
 
M

Michael Torrie

I didn't realise GTK has a GUI designer too :(

I don't like it when you can D&D to position things. I don't
understand why someone wouldn't want to write the positioning code,
and have fun with the debugging. That's the best part about writing a
program, in my opinion. I'm against D&D with programming, and I'm not
sure why.

Oh, I understand now. You mean you dislike the old fixed-position,
pixel-based layouts that visual studio used to use, right? Well, rest
easy, because both Gtk and Qt use layout managers (packing managers)
instead. Much more flexible, and can automatically resize as a window
sizes, and deal with things like dpi changes.

And in both cases you don't have to use the imperative tools. You can
still hand-code your GUI in code in Gtk, Qt, or any other gui system.

In any event I think you should give both Glade-3 and Qt Designer a
serious look. I think your hate of gui designers is about 10 years out
of date now, even if you still prefer not to use them.
 
Ad

Advertisements

P

Peter

I stuck with Tkinter combined with PMW for a very long time, but the lack of extra widgets finally drove me to look elsewhere.

I tried PyQT but didn't have a good experience. I can't remember details, but things just seemed to have little "gotchas" - which the mailing list were very helpful with sorting out, but I found it frustrating to keep asking for help over little items of unexpected behaviour.

I have not tried PyGTK so cannot comment.

I finally decided on wxPython - with my basis of Tkinter (graysons book) itwas quite easy to pick up and run with. The wxPython book is quite good and helps get started and using it. I would suggest if you buy and read that,then you will no longer find wxPython difficult to get started with.
 
M

Michael Torrie

I stuck with Tkinter combined with PMW for a very long time, but the
lack of extra widgets finally drove me to look elsewhere.

I tried PyQT but didn't have a good experience. I can't remember
details, but things just seemed to have little "gotchas" - which the
mailing list were very helpful with sorting out, but I found it
frustrating to keep asking for help over little items of unexpected
behaviour.

Interesting. I have used Qt and PyQt, and except for the fact that PyQt
isn't very pythonic (feels like C++ translated directly to Python), I
never had any problems with it. Maybe since I was already familiar with
signals and slots programming I never found any unexpected behavior[1].
I've never used Tkinter, and I only ever used wxWidgets once (back when
it was called wxWindows), and the close similarity to MFC at the time
(which I was fleeing) didn't sit right with me. Also the flexible
layout that Qt and Gtk encouraged was a big plus in my mind. I guess
you like what you get used to.
 
C

CM

Tkinter -- Simple to use, but limited

PyQT -- You have a GUI designer, so I'm not going to count that

As others have pointed out, that's nonsensical. If you don't like the GUI designer, just don't use it.
wxPython -- Very nice, very professional, approved by Python creator, but alas hard to get started with

Why is it hard to get started with? Download the installer, install, and:

import wx
app = wx.App(False)
frame = wx.Frame(None, -1, "Hello World")
frame.Show(True)
app.MainLoop()
 
K

Kevin Walzer

Tkinter -- Simple to use, but limited

With the themed widget introduced in Tk 8.5, Tkinter is now a peer to
the other GUI toolkits in most respects, surpasses them in some (canvas
widget), and lags behind in just two areas: printing (several
platform-specific solutions but no cross-platform API) and HTML display
(a few extensions but no standard widget set).

I've stayed with Tkinter because it fits my brain the best. Old
complaints about it being ugly or limited no longer hold water.

--Kevin
 
Ad

Advertisements

E

eamonnrea

I don't like the idea of being able to drag and drop anything in the programming world. Outside of that, I use D&D programs a lot. I got into GUI programming because I thought that I could get away from them, but I guess not.

Maybe I'm against them because if I can't code, I don't have anything else to do with my time. If I don't program, the only other thing I have to do is... well... nothing. So, because of this, they're making programming easier... by not coding as much. Oh well, guess coding is dead :(
 
P

petmertens

Enthought.traits !! http://code.enthought.com/projects/traits/
I started using traits a couple of months ago and I really like it.

Traits provides a framework which creates a UI based on your data structures. Using some "hints" you can do anything you want. Just check out their website and try the examples.
Even creating an executable out of it is quite easy using bbfreeze.

The "negative" thing about is that the user group doesn't seem to be very large. In other words: if you get stuck on something, there aren't many people to help you. This however should not prevent you from using traits.

Just try it and let me know what you think about it.
 
E

eamonnrea

On 09/12/2013 10:03 AM, (e-mail address removed) wrote:
I think your hate of gui designers is about 10 years out of date now,
even if you still prefer not to use them.

So, you are recommending not to code as much? :'( That is what depresses me. These "tools" depress me!

I don't understand why people don't want to code. It's time consuming: But that's the point!!! It *should* be time consuming. It *should* take time to make programs. Speed isn't the main thing, fun is. And these "tools" are taking the fun away.
 
Ad

Advertisements

J

John Gordon

In said:
they're making programming easier... by not coding as much. Oh well,
guess coding is dead :(

Pressing keys on a keyboard was never the hard part of coding.
 

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