Cross-platform GUI development

P

psaffrey

I've been programming in Python for 5 or more years now and whenever I
want a quick-n-dirty GUI, I use Tkinter. This is partly because it's
the first toolkit I learnt, but also because it's part of the standard
Python distribution and therefore easy to get Python apps to work
cross platform - it usually requires almost no porting effort.

However, when I need a little bit more grunt, I tend to turn to Tix,
which I thought was also fairly standard. However, this week, I wrote
a Tix application under Linux which I'd really like to work on Mac OS
and it's proving fairly painful to get it going. There is no Tix in
the standard fink or apt repositories and when I download a tar-ball,
it wouldn't build because it had a lot of unmet dependencies. I then
read a post which said that only Tkinter/Python people really use Tix
anymore and people in tcl/tk moved onto better toolkits long ago.

My question is if Tix is old hat, what is the GUI toolkit I *should*
be using for quick-n-dirty cross platform GUI development? I guess
this is tangentially related to:

http://groups.google.com/group/comp...d0d40ffd0b1c0?lnk=gst&q=tix+#42ed0d40ffd0b1c0

I hope this isn't a stupid question. I'm wearing flame retardant
underwear.

Peter
 
A

Alexandre Badez

I've been programming in Python for 5 or more years now and whenever I
want a quick-n-dirty GUI, I use Tkinter. This is partly because it's
the first toolkit I learnt, but also because it's part of the standard
Python distribution and therefore easy to get Python apps to work
cross platform - it usually requires almost no porting effort.

However, when I need a little bit more grunt, I tend to turn to Tix,
which I thought was also fairly standard. However, this week, I wrote
a Tix application under Linux which I'd really like to work on Mac OS
and it's proving fairly painful to get it going. There is no Tix in
the standard fink or apt repositories and when I download a tar-ball,
it wouldn't build because it had a lot of unmet dependencies. I then
read a post which said that only Tkinter/Python people really use Tix
anymore and people in tcl/tk moved onto better toolkits long ago.

My question is if Tix is old hat, what is the GUI toolkit I *should*
be using for quick-n-dirty cross platform GUI development? I guess
this is tangentially related to:

http://groups.google.com/group/comp.lang.python/browse_thread/thread/...

I hope this isn't a stupid question. I'm wearing flame retardant
underwear.

Peter

Personnaly, I use PyQt simply because I prefere Qt to Gtk, witch is
much more integrated with all desktop than Gtk.
In fact, your application in Qt on Mac, Win or Linux look like a
native app.

Just a question of "feeling" I think; because most of those GUI
framework, offer quiet the same functionality.
 
N

Nick Craig-Wood

Alexandre Badez said:
Personnaly, I use PyQt simply because I prefere Qt to Gtk, witch is
much more integrated with all desktop than Gtk.
In fact, your application in Qt on Mac, Win or Linux look like a
native app.

I'd recommend wxPython over those becase

1) native look and feel on all platforms
2) doesn't require expensive licensing for non-commercial apps (QT)
3) Isn't a pain to install on windows (GTK)

That said, times change and 1-3 may have changed since I last looked
at it!
 
B

BlueBird

From my point of view, PyQt is very good. Qt is very actively
developed and maintained, and the PyQt binding is of very good
quality, and fully documented. I have used personally for several
cross-platform projects and it worked like a charm.

I like Qt's approach and extensive documentation. I've found that it
works both for complex GUI as for quick'n dirty. There is usually a
widget to do just what I need so that I can focus on my application
logic instead of on the GUI code.

In short, usage of Qt has driven me to love it.

When looking at the other guis, I always find that the documentation
is under my expectations, or that that things are quite complex to set-
up to get what you need.

I'd recommend wxPython over those becase

1) native look and feel on all platforms

You get it with PyQt as well.
2) doesn't require expensive licensing for non-commercial apps (QT)

You mean "doesn't require expensive licensing for close source apps".
Open source apps are free of charge. For professional developments, I
bought the Qt license several times in the past because it was worth
the time saved in my opinion.
3) Isn't a pain to install on windows (GTK)

You get it with Qt as well. I was able to use it even as a windows
newbie.
 
E

Eric Brunel

I've been programming in Python for 5 or more years now and whenever I
want a quick-n-dirty GUI, I use Tkinter. This is partly because it's
the first toolkit I learnt, but also because it's part of the standard
Python distribution and therefore easy to get Python apps to work
cross platform - it usually requires almost no porting effort.

However, when I need a little bit more grunt, I tend to turn to Tix,
which I thought was also fairly standard. However, this week, I wrote
a Tix application under Linux which I'd really like to work on Mac OS
and it's proving fairly painful to get it going. There is no Tix in
the standard fink or apt repositories and when I download a tar-ball,
it wouldn't build because it had a lot of unmet dependencies. I then
read a post which said that only Tkinter/Python people really use Tix
anymore and people in tcl/tk moved onto better toolkits long ago.

My question is if Tix is old hat, what is the GUI toolkit I *should*
be using for quick-n-dirty cross platform GUI development?

Since you're already used to Tkinter, I'd say: just wait... tcl/tk 8.5 is
on the way and it will bring a lot of new and long-awaited widgets, along
with native look on most platforms. See here:
http://wiki.tcl.tk/14796
and here for the look:
http://tktable.sf.net/tile/

Note that there are already Tkinter wrappers for these widgets, but they
may not be the ones that'll end up in the official distribution. If you
want to play with them, you can find them here:
https://sourceforge.net/project/showfiles.php?group_id=165637
(download tkinter-wrappers)

If you want to use these, you'll of course also need the latest beta of
tcl/tk 8.5, downloadable from here:
http://www.tcl.tk/software/tcltk/8.5.html
I hope this isn't a stupid question. I'm wearing flame retardant
underwear.

You won't need these much around here... ;-)

HTH
 
P

Peter Decker

My question is if Tix is old hat, what is the GUI toolkit I *should*
be using for quick-n-dirty cross platform GUI development?

I would heartily recommend Dabo (http://dabodev.com). It wraps the
wxPython toolkit, but eliminates 99% of the hassle in dealing with the
C++ feel of wxPython. And while it is supposed to be for
database-related apps, it works great for UI-only apps, which is what
I use it for.
 
G

Grant Edwards

Personnaly, I use PyQt simply because I prefere Qt to Gtk,
witch is much more integrated with all desktop than Gtk.

So you're claiming Qt is much more integrated with Gnome than
Gtk? The mind wobbles. The Gnome and XFCE desktops are _built_
using Gtk. A machine running a Gnome or XFCE desktop doesn't
even need to have Qt installed. The same can be said for
various other deskops (openstep, equinox, etc. -- most of them
other than KDE, actually).
In fact, your application in Qt on Mac, Win or Linux look like
a native app.

Qt sure doesn't look native on my Linux machines, and it's not
going to look native on any GTK-based desktops such an Gnome or
XFCE. Qt will only look native on Linux machines running a Qt
based desktop such as KDE.
Just a question of "feeling" I think; because most of those
GUI framework, offer quiet the same functionality.

I use wxPython, because it uses Gtk on Linux, and Gtk is
"native" for both me and for my Windows users.
 
G

Grant Edwards

Not true for KDE or other non-Gtk desktops.
You get it with PyQt as well.

Not true for Gnome or other non-Qt desktops.

There is no single "native look and feel" for Linux systems.

There are about a half-dozen different widget sets (Gtk and Qt
being the two big ones).
 
G

Grant Edwards

I use wxPython, because it uses Gtk on Linux, and Gtk is
"native" for both me and for my Windows users.

I didn't state that very well.

What I meant was that wxPython uses Gtk under Linux (which is
native for me) so wxPython looks native for both me and my
Windows users.
 
K

Kevin Walzer

My question is if Tix is old hat, what is the GUI toolkit I *should*
be using for quick-n-dirty cross platform GUI development? I guess
this is tangentially related to:

What widgets are you using in Tix? They may be available in BWidgets,
Tablelist, or other script-level Tk exetensions (i.e. they do not
require compiliaton). Wrappers for many of these are available at the
Tkinter wiki (http://tkinter.unpythonic.net/wiki/FrontPage)

--Kevin
 
D

Dan Stromberg

3) Isn't a pain to install on windows (GTK)

pygtk is easy to install on windows if you use cygwin.

I started developing a little ssh GUI frontend on a windows laptop using
cygwin pygtk and cygwin openssh. When I moved it over to a Linux VMware
on the same laptop to finish it, the code Just Worked.
 
M

Michael L Torrie

Alexandre said:
Personnaly, I use PyQt simply because I prefere Qt to Gtk, witch is
much more integrated with all desktop than Gtk.
In fact, your application in Qt on Mac, Win or Linux look like a
native app.

Qt doesn't look very native on my desktop. In fact, Qt apps have always
looked out of place on a Gnome desktop.

On Windows and Mac, no question, they look pretty native. You do have
to take pains to make the app "feel" native, though. Like follow the UI
guidelines of the platform, etc.
 
D

David Tremouilles

Hello,

I would recommend pyGTK http://www.pygtk.org/
- your app does look the same on all platform (like for Tkinter) (This
argurment apply if the same user would like to run the same app on
different platform and thus do not want to see something different on
each platform...)
- easy to install on all platform:
An all in one installed exist for windows:
http://aruiz.typepad.com/siliconisland/2006/12/allinone_win32_.html
- it looks nice and simple (it is originally the Gimp toolkit).

Just my two cents,

David
 
D

Dave Cook

I would recommend pyGTK http://www.pygtk.org/

Native GTK on OSX is still in its infancy. For early adopters only at
this point. See

http://www.oreillynet.com/articles/author/2414

That leaves PyQt and WxPython as the only other realistic choices.
Licensing issues aside, I think Qt has the most polished and well
thought out API. The OSX Tiger dev tools include WxPython, though you
may want to install a newer version. I suggest installing both and
trying some of the included examples.

Another possibility is Jython, if you like the Java way of doing
things.

Dave Cook
 
D

David Tremouilles

No issue with pygtk on mac!
Actually I develop on this platform everyday. Macport take care of the
installation for me http://www.macports.org/ (Fink should do the work
too).
Of course native GTK on OSX could be nice but definitely not needed at
this point in time.

David
 
K

Kevin Walzer

David said:
No issue with pygtk on mac!
Actually I develop on this platform everyday. Macport take care of the
installation for me http://www.macports.org/ (Fink should do the work
too).
Of course native GTK on OSX could be nice but definitely not needed at
this point in time.

"Native" Gtk on the Mac still isn't really native. I tried a "native"
build of Wireshark and was very disappointed. Yes, it uses Quartz/Aqua
instead of X to draw Windows, but it completely ignores other Aqua
interface conventions--the menu is still attached to each window instead
of at the top of the screen, buttons aren't Aqua buttons, and so on.
Based on what I've seen, I don't think Gtk is really viable as a native
Mac development environment; it looks as weird as Fltk, which also uses
Aqua windowing but which also draws its own widgets and puts the menubar
on each window.

Tk does much better; while it's not very pretty, menubars are in the
correct place and buttons work correctly.
 
K

Kevin Walzer

David said:
No issue with pygtk on mac!
Actually I develop on this platform everyday. Macport take care of the
installation for me http://www.macports.org/ (Fink should do the work
too).
Of course native GTK on OSX could be nice but definitely not needed at
this point in time.

"Native" Gtk on the Mac still isn't really native. I tried a "native"
build of Wireshark and was very disappointed. Yes, it uses Quartz/Aqua
instead of X to draw Windows, but it completely ignores other Aqua
interface conventions--the menu is still attached to each window instead
of at the top of the screen, buttons aren't Aqua buttons, and so on.
Based on what I've seen, I don't think Gtk is really viable as a native
Mac development environment; it looks as weird as Fltk, which also uses
Aqua windowing but which also draws its own widgets and puts the menubar
on each window.

Tk does much better; while it's not very pretty, menubars are in the
correct place and buttons work correctly.
 
D

Diez B. Roggisch

David said:
No issue with pygtk on mac!
Actually I develop on this platform everyday. Macport take care of the
installation for me http://www.macports.org/ (Fink should do the work
too).
Of course native GTK on OSX could be nice but definitely not needed at
this point in time.

It sure looks crappy in comparison to the rest of the OSX apps - and
given that with Qt (and of course the brilliant PyObjc-bridge) there
exist options that look & feel waaay better, I wouldn't consider using GTK.
 
D

David Tremouilles

"crappy", "waaay better"
I will not feed the troll...
Pygtk on mac just do the work for me on a more than satisfying way.

David
 

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,754
Messages
2,569,529
Members
45,001
Latest member
Kendra00E1

Latest Threads

Top