473,396 Members | 1,599 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Tkinter vs. wxPython?

Do many people think that wxPython should replace Tkinter? Is this
likely to happen?

I ask because I have just started learning Tkinter, and I wonder if I
should abandon it in favor of wxPython.

Mitchell Timin

--
"Many are stubborn in pursuit of the path they have chosen, few in
pursuit of the goal." - Friedrich Nietzsche

http://annevolve.sourceforge.net is what I'm into nowadays.
Humans may write to me at this address: zenguy at shaw dot ca
Jul 18 '05 #1
7 11874
Se******@SeeBelow.Nut wrote:
Do many people think that wxPython should replace Tkinter? Is this
likely to happen?

I ask because I have just started learning Tkinter, and I wonder if I
should abandon it in favor of wxPython.


Could you share a little more info, like are you new to GUI programming,
what platform do you develop on (windows, mac, linux), and what features
do you need for your application.

If you this is your first time using a GUI toolkit I'd recommend
sticking with Tkinter. It is simpler to use and there is much more and
better documentation since it has been a standard part of Python for a
long time.

But myself I use wxPython because it has more features.
Jul 18 '05 #2
Se******@SeeBelow.Nut wrote on Tue, 27 Apr 2004 17:52:09 GMT:
Do many people think that wxPython should replace Tkinter? Is this
likely to happen?
From my POV it would be a good idea since I don't use Tkinter/Tkinter apps
but I do use wxPython. However, I don't think it will happen because things
out of the standard distro don't get phased out that easily; programs count
on Tkinter being there. Plus Idle would have to be removed as well, which
is not very likely to happen since it's the standard Python IDE :).
I ask because I have just started learning Tkinter, and I wonder if I
should abandon it in favor of wxPython.


If you like Tkinter, use it. If you like wxPython, use that - neither of
them shows any signs of going away in the near or not so near future. BTW,
there are several nice GUI builders for wxPython available which might be
of assistance in using wxPython. Personally I prefer wxPython and I avoid
Tk-based apps whenever I have an alternative, which is basically always :).

--
Yours,

Andrei

=====
Real contact info (decode with rot13):
ce******@jnanqbb.ay. Fcnz-serr! Cyrnfr qb abg hfr va choyvp cbfgf. V ernq
gur yvfg, fb gurer'f ab arrq gb PP.
Jul 18 '05 #3
wxPython will not "replace" Tkinter (IMO :-)) if you mean that Tkinter will
become a dead letter. Tkinter was first, has much support through add-ons
such as Pmw and is still the most extensively documented Python GUI. It
builds on the broadbase available through the Tcl/Tk community and provides
many more resources than I could find for wxPython.

I originally wrote a small app using Tkinter, then attempted a rewrite in
wxPython ("lunch time" exercise in both cases so this activity literally
spanned years! :-)) . I don't claim to be a GUI programmer BTW :-)

The main reason I started down the wxPython conversion path was I wanted to
be able print on a Windoze platform and wxPython seemed to offer an
interface that would achieve that. I can't really remember what "went wrong"
but I abandoned the wxPython conversion and went back to using Tkinter -
however, I did keep the print code that I developed and actually communicate
via TCP/IP to that "app" from my Tkinter app with print instructions and the
stream of text to print. I think the sticking point with wxPython was I was
unable to achieve the same key binding flexibility that I had achieved
through Tkinter - I'm sorry, I really can't remember what exactly it was. I
remember some extreme frustration though getting my head around the
different model that wxPython offered :-)

Having said all that, I have a background in Tcl/Tk (probably 7 years ago
now, I wrote a small GUI app in Tcl/Tk and then re-wrote it in Ada/Tk). I
have a GUI book for the Tcl/Tk and then purchased Grayson's Tkinter GUI book
when I moved across to Python - I find reading a much simpler way of
learning :-). I was unable to find an published work on wxPython and whilst
the mailing list is helpful it just wasn't the same as solving a problem by
using one of more books as reference :-) I haven't remained in touch with
the wxPython community, but last I heard, that book on wxPython was still in
the "real soon now" category :-)

I find the Tkinter/Pmw combination very powerful - much of my later
additions to my small GUI app have used Pmw and inheritance extremely
heavily and I am exceptionally pleased at how re-usable some of my GUI
classes worked out - I saved some significent work on at least one GUI page
by small class modification and re-use. Tkinter builds on the efforts of
another large group of individuals - the Tcl/Tk people. Whereas, dare I say
it?, the wxPython effort is based on the efforts of a much smaller group of
individuals, leaving you often to puzzle through wx reference
documentation - and it ain't easy to learn something from reference
documentation! :-)

So my personal recommendation would be to stick with the Tkinter approach,
there is more documentation available (you can even read books based on
using Tk with Tcl that will help you to learn and "solve" those GUI problems
if you can't find a solution from a Tkinter book :-)) and I believe there
are more Python users of Tkinter from which you can request help if you find
a sticking point.

Just my thoughts on the topic :-)

Peter

<Se******@SeeBelow.Nut> wrote in message news:40***************@shaw.ca...
Do many people think that wxPython should replace Tkinter? Is this
likely to happen?

I ask because I have just started learning Tkinter, and I wonder if I
should abandon it in favor of wxPython.

Mitchell Timin

--
"Many are stubborn in pursuit of the path they have chosen, few in
pursuit of the goal." - Friedrich Nietzsche

http://annevolve.sourceforge.net is what I'm into nowadays.
Humans may write to me at this address: zenguy at shaw dot ca

Jul 18 '05 #4
Am Dienstag, 27. April 2004 23:06 schrieb Peter Milliken:
I haven't remained in touch with
the wxPython community, but last I heard, that book on wxPython was still
in the "real soon now" category :-)


There's a german book on GUI Programming with Python, which covers Tkinter,
wxPython, PyQT and PyGTK+ 2... I actually liked the read, the author creates
a lightweight contact management program in each of the four, and discusses
step by step how the functionality is implemented, showing the differences
between the event handling code in each of the four, etc.

You might wonder how he achieves to go through all four different programming
environments in a single book, but I think he manages quite well to keep it
simple and short, and showing relevant links to the available documentation
where it is needed as a starting-point for further projects.

Anyway, if anybody's interested:

Name: Python und GUI-Toolkits
Author: Michael Lauer
ISBN: 3-8266-0844-5
Publisher: mitp-Verlag
First published in 2002 (I have the first edition, IIRC there's a second
edition out already)

I can only recommend to have a look at this book if you speak german,learn
easily from example, and would like to get insight knowledge on
GUI-Programming with Python...

Heiko.

Jul 18 '05 #5
Doug Holton wrote:

Se******@SeeBelow.Nut wrote:
Do many people think that wxPython should replace Tkinter? Is this
likely to happen?

I ask because I have just started learning Tkinter, and I wonder if I
should abandon it in favor of wxPython.


Could you share a little more info, like are you new to GUI programming,
what platform do you develop on (windows, mac, linux), and what features
do you need for your application.

If you this is your first time using a GUI toolkit I'd recommend
sticking with Tkinter. It is simpler to use and there is much more and
better documentation since it has been a standard part of Python for a
long time.

But myself I use wxPython because it has more features.


I'm mostly a C programmer, with a little Python experience. I have only
basic needs for GUI and graphics. The Tkinter set of widgets seems
adequate for my needs, although one never knows for sure what ones needs
might be.

Portability is important. My audience is 50/50 linux and Windows
people. I myself use Win 2000.

Ease of learning is important to me. I have only a little experience
with GUI and graphics programming. I keep using the phrase "GUI and
graphics" because I need graphical output from my programs, not just a
GUI to control them.

Mitchell Timin

--
"Many are stubborn in pursuit of the path they have chosen, few in
pursuit of the goal." - Friedrich Nietzsche

http://annevolve.sourceforge.net is what I'm into nowadays.
Humans may write to me at this address: zenguy at shaw dot ca
Jul 18 '05 #6
Se******@SeeBelow.Nut wrote:
Do many people think that wxPython should replace Tkinter? Is this
likely to happen?

I ask because I have just started learning Tkinter, and I wonder if I
should abandon it in favor of wxPython.


wxPython comes with a demo which includes sample code for almost all
the different controls. I would recommend looking at the demo (and
sample code) to see the scope of wxPython. The sample code will
give you an idea of how readable the code is.

In the end I used wxPython because I wanted things like printer
support.

Roger
Jul 18 '05 #7
Mark Hughes wrote:
The image support is
terrible (especially since the cropping function from Tk has never been
implemented in Tkinter, and the maintainers don't seem to give a damn),


Easily fixable from the Python side:

def subimage(src, l, t, r, b):
dst = PhotoImage()
dst.tk.call(dst, 'copy', src, '-from', l, t, r, b, '-to', 0, 0)
return dst

Jason Harper
Jul 18 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Leo | last post by:
hi there for somebody who wants tostart small/medium GUI apps with python: what's the best toolkit: tkinter, wxPython or what? stability, ease of use and portability between mac and windows...
25
by: BJörn Lindqvist | last post by:
See: http://www.wxpython.org/quotes.php. especially: "wxPython is the best and most mature cross-platform GUI toolkit, given a number of constraints. The only reason wxPython isn't the standard...
8
by: Erik Johnson | last post by:
I am looking for some input on GUI libraries. I want to build a Python-driven GUI, but don't really understand the playing field very well. I have generally heard good things about wxPython. I...
7
by: krishnakant Mane | last post by:
hello all, I seam to have noticed this a bit late but it appears to me that tkinter is being used very widely for gui development on all platform? is that right? since fredric lundh has written a...
2
by: Kevin Walzer | last post by:
I'm porting a Tkinter application to wxPython and had a question about wxPython's event loop. The Tkinter app provides a GUI to a command-line tool. It gathers user input, and opens an...
44
by: bg_ie | last post by:
Hi, I'm in the process of writing some code and noticed a strange problem while doing so. I'm working with PythonWin 210 built for Python 2.5. I noticed the problem for the last py file...
4
by: fabdeb | last post by:
Hi every one, I m a sysadmin who want to know how to use python. I dont know anything about oriented object programation, i only know bash and a little perl. I have some simple questions about...
7
by: Protected | last post by:
Hello. I'm a complete newbie trying to learn Python. I decided to try some Tkinter examples, including the one from the library reference, but they don't seem to do anything! Shouldn't there be,...
0
by: Guilherme Polo | last post by:
On 10/29/08, Olrik Lenstra <o.lenstra@gmail.comwrote: It will be a combination of commands, not a single one. Initially I considered this as "probably without solution", since tcl acquired a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.