473,700 Members | 2,446 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 11899
Se******@SeeBel ow.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******@SeeBel ow.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******@jnanqb b.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******@SeeBe low.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******@SeeBel ow.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******@SeeBel ow.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
23535
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 are the main criteria. thanks, leo
25
3348
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 Python GUI toolkit is that Tkinter was there first." - Guido van Rossum Guess, that answers my question, but isn't "Tkinter was there first" a very bad answer? :) It is kinda ugly too, so I wonder why it can't be replaced? Or maybe another GUI...
8
4490
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 happen to already own John Grayson's book about Tkinter programming, so that is rather handy if I decide to use Tkinter. I have done some things slightly more involved than "Hello World" in Tkinter - I have never used wxPython. So, basically the...
7
1945
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 very good introduction to tkinter (was that just an intro?), I have got keen interest to know the following. may be fredric himself might put some light on these points. 1. I seriously don't intend to start a flame war but does tkinter stand...
2
3957
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 asynchronous pipe to the external tool via os.popen(). Then, it dumps the output from the external process into a text display. Although threads are often recommended for use with GUI apps, I am able to keep the GUI responsive with Tkinter's event loop,...
44
4990
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 processed by this script, where the concerned tmp file is only actually written to when PythonWin is closed. In other words, after I run this script, one of the generated tmp files has a size of 0kB. I then close PythonWin and it is then written to.
4
1994
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 python. the first: what is the differences between a function and a classe? In which case i should use a function ? In which case i should use a class ?
7
3276
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, like, a dialog? I'm running Windows XP and using IDLE. You can assume my version of Python is the latest.
0
1803
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 yield command just in the 8.6a3 release, but then I looked at wx.SafeYield code and apparently it is possible to replicate it. Here is an initial cut, it is very possible to contain something not equivalent to wx.SafeYield (besides it could be...
0
8731
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9218
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9081
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8975
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7816
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6564
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5904
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4408
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2031
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.