Tkinter vs wxPython
Greetings all. I will have about 2 weeks to pursue some Python related activities and would like to learn more about the graphical end of things. In that vein I would like some opinions regarding Tkinter and wxPython. (The previously recommended PyGame is appropriate for me for now, but I am looking ahead) I am especially interested in terms of learning curve, documentation, portability across platforms Linux/Windows and anything else you care to add. As I know only what I have read on this forum & surfing the web I would really appreciate the input of those who have used both, or decided to use one over the other. Thanks a bunch, Esmail ps: this is basically the same query as posted December 10 “Re: GUIs: wxPython vs. Tkinter (and others)” -- http://mail.python.org/mailman/listinfo/python-list
Re: Tkinter vs wxPython
My post wasn't complete, sorry for the additional post: ps: this is basically the same query as posted December 10 “Re: GUIs: wxPython vs. Tkinter (and others)” by Erik Johnson which really seemed to end up comparing PyQt (?) -- http://mail.python.org/mailman/listinfo/python-list
Re: Tkinter vs wxPython
Esmail Bonakdarian wrote: My post wasn't complete, sorry for the additional post: ps: this is basically the same query as posted December 10 “Re: GUIs: wxPython vs. Tkinter (and others)” by Erik Johnson which really seemed to end up comparing PyQt (?) I recommend PyQt because of the easy to use designer progam that speeds up GUI development. Designer allows you to design your UI visually and establish handlers for events. It outputs a .ui file. You then call 'pyuic myui.ui > myui.py' to turn your ui into a python class. The Qt framework is very straightforward to use as well and www.trolltech.com maintains good documentation on the framework. Check it out: http://doc.trolltech.com/3.3/index.html PS: You can also use your .ui files to output C++ classes with 'uic' instead of 'pyuic'. I also think there is a 'puic' to create Perl code. So, that single ui description can be used in multiple languages. My two cents, Michael -- http://mail.python.org/mailman/listinfo/python-list
Re: Tkinter vs wxPython
Esmail Bonakdarian wrote: > Greetings all. > > I will have about 2 weeks to pursue some Python related activities and > would like to learn more about the graphical end of things. In that > vein I would like some opinions regarding Tkinter and wxPython. > (The previously recommended PyGame is appropriate for me for now, but > I am looking ahead) > > I am especially interested in terms of learning curve, documentation, > portability across platforms Linux/Windows and anything else you care > to add. As I know only what I have read on this forum & surfing the > web I would really appreciate the input of those who have used both, > or decided to use one over the other. Well I would recomend Tkinter because it's the easiest to use. I recomend using this document. http://infohost.nmt.edu/tcc/help/lang/python/tkinter.html I used it and just worked my way through it. I found it very useful. -- http://mail.python.org/mailman/listinfo/python-list
Re: Tkinter vs wxPython
> I am especially interested in terms of learning curve, documentation, > portability across platforms Linux/Windows and anything else you care > to add. As I know only what I have read on this forum & surfing the > web I would really appreciate the input of those who have used both, > or decided to use one over the other. I was in the same shoes a time ago. I started with Tkinter since is the standard GUI for Python. I read some tutorials, but didn't go to far, and didn't like the Tkinter looks too much. Then I tried wxPython, and things were better. And were much better when I started using wxGlade. IMO, wxPython has a softert learning curve (specially if you use wxGlade), is portable between unix/windows/mac, with the advantage over Tkinter that it has a native look. Regarding documentation, there is plenty of it. I must admit that my background regarding GUIs comes from Delphi, so that might bias my opinion. In case you take the Tkinter route, I founded this tutorial useful : http://www.bembry.org/tech/python/notes/tkinter_1.php Regards, Alejandro. -- http://mail.python.org/mailman/listinfo/python-list
Re: Tkinter vs wxPython
Michael McGarry wrote: Esmail Bonakdarian wrote: My post wasn't complete, sorry for the additional post: ps: this is basically the same query as posted December 10 “Re: GUIs: wxPython vs. Tkinter (and others)” by Erik Johnson which really seemed to end up comparing PyQt (?) I recommend PyQt because of the easy to use designer progam that speeds up GUI development. Designer allows you to design your UI visually and establish handlers for events. It outputs a .ui file. You then call 'pyuic myui.ui > myui.py' to turn your ui into a python class. The Qt framework is very straightforward to use as well and www.trolltech.com maintains good documentation on the framework. Check it out: http://doc.trolltech.com/3.3/index.html PS: You can also use your .ui files to output C++ classes with 'uic' instead of 'pyuic'. I also think there is a 'puic' to create Perl code. So, that single ui description can be used in multiple languages. My two cents, Michael Michael: Just a bit less-than-helpful when the original post specifically asked for comparisons *between Tkinter and wxPython* in the context of having two weeks to work on *Python* ;-) regards Steve -- Steve Holden http://www.holdenweb.com/ Python Web Programming http://pydish.holdenweb.com/ Holden Web LLC +1 703 861 4237 +1 800 494 3119 -- http://mail.python.org/mailman/listinfo/python-list
Re: Tkinter vs wxPython
Esmail Bonakdarian wrote: I will have about 2 weeks to pursue some Python related activities and would like to learn more about the graphical end of things. In that vein I would like some opinions regarding Tkinter and wxPython. This is an area where personal preference reigns strong. You really ought to try both out. Following through a tutorial or examining some example code and trying to make a few changes on your own will give you a far better perspective than anything you learn from others here. For example, I see "flaxeater" has just said that Tkinter is "the easiest to use". I, however, found it anything but, and had no end of trouble figuring out how to make it do the things I wanted. In spite of its "better" documentation, too, I might add. When I switched to wxPython, I faced some of the typical wxPython issues (the docs simply aren't as good), and yet I was able to make progress faster and get closer to my goals. The demo program, for example, is worth its weight in gold. (Well, bad analogy in the computer world. :-( ) Try them both out for an hour or two, and go with whichever one "feels right". You very likely won't be making a mistake. -Peter -- http://mail.python.org/mailman/listinfo/python-list
Re: Tkinter vs wxPython
In article <[EMAIL PROTECTED]>, Alejandro Weinstein <[EMAIL PROTECTED]> wrote: . . . >the standard GUI for Python. I read some tutorials, but didn't go to >far, and didn't like the Tkinter looks too much. Then I tried . . . >IMO, wxPython has a softert learning curve (specially if you use >wxGlade), is portable between unix/windows/mac, with the advantage >over Tkinter that it has a native look. Regarding documentation, . . . While people seem to mean a range of different things when they write, "Tkinter doesn't look 'native'", most of them are being addressed in revisions currently underway. In fact, new look- and-feel are available in early releases for those interested in experimentation. -- http://mail.python.org/mailman/listinfo/python-list
Re: Tkinter vs wxPython
Hi I have found ALL of the posts useful, thank you so much. Please keep them coming! I am learning a lot. I will probably play a bit with Tkinter and wxPython and see how each feels, just as Peter Hansen suggested). PyQt also looks interesting, so I will take a look at that at some point down the line aswell. Thanks again, this is a great resource. Esmail -- http://mail.python.org/mailman/listinfo/python-list
Re: Tkinter vs wxPython
"Esmail Bonakdarian" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Hi > > I have found ALL of the posts useful, thank you so much. > > Please keep them coming! I am learning a lot. > > I will probably play a bit with Tkinter and wxPython and see how > each feels, just as Peter Hansen suggested). PyQt also looks It couldn't have been said better than Peter has. I might add this: Try both *and learn both*. Despite the fact, that I do most GUI stuff with wxPython, I sometimes face situations, where I need to be able to do some Tkinter stuff (mostly by use of PMW). This could happen to you too, more likely than you might think now. As for the wxPython path: I recently prototyped a GUI-app for Windows with wxPython and then (alas) had to port it to C++. I simply could download the wxWidgets (which wxPython is built upon) and kind of simply translate the Python stuff into C++! It really helped me *a lot* having a working wx/Python app, and saved me a lot of time, of course (but no as much as I had saved, if I hadn't to port it to C++). And while I am at it: It was a big benefit for me to *not* use a GUI builder (which could be the next thing you might ask for), when I started Python programming. When I started Python programming with 1.5.2 there wasn't a descent GUI builder for wx (or at least I couldn't find one). And today, where there are a few options (wxDesigner, Boa, to be concrete), I'm really glad never having used one: Everything I do is under *my* full control, and I guess this is the only way to get the most out of wx/Python. And for sure, it's the only way knowing what you do. As Peter said, the wxPython demo is a bonanza - use it. Summary: Taking all my experience into account, I'd advise you to learn Tkinter, to learn wxPython and to not use a GUI builder (which could be not what a newbie likes to hear). HTH Franz GEIGER P.S.: Concerning PyQt: Yes, so far I only can speak for Tkinter and wxPython. But as soon as I will be on Linux (hopefully next year), I'll try PyQt. So if you would have asked me next year, I had said (phew, is that correct English?): Learn Tkinter and wxPython and/or PyQt and no GUI builder :-) > interesting, so I will take a look at that at some point down the > line aswell. > > Thanks again, this is a great resource. > > Esmail -- http://mail.python.org/mailman/listinfo/python-list
Re: Tkinter vs wxPython
Cameron Laird wrote: IMO, wxPython has a softert learning curve (specially if you use wxGlade), is portable between unix/windows/mac, with the advantage over Tkinter that it has a native look. Regarding documentation, . While people seem to mean a range of different things when they write, "Tkinter doesn't look 'native'", most of them are being addressed in revisions currently underway. In fact, new look- and-feel are available in early releases for those interested in experimentation. Well, while on Windows "native" look exists, on X11 "native" has other meaning. On my wife's desktop it's KDE that is native, GNUStep is native on mine and I strongly object calling GTK "native", as one can read on SWT/Eclipse website. There's no "universally native" look on X11. Some toolkits look better, but this is a matter of personal taste, for software developer clean, stable API and suitable widgets are of much higher value. -- Jarek Zgoda http://jpa.berlios.de/ | http://www.zgodowie.org/ -- http://mail.python.org/mailman/listinfo/python-list
Re: Tkinter vs wxPython
Definitely look at PyQt. It was the GUI framework I chose when going through the same process 3 weeks ago. I have to disagree with F.Geiger (sorry, F.Geiger), I think a GUI builder is a necessity. It saves you a lot of time. The alternative is to keep changing your code until your GUI looks as you want. With a GUI builder you "draw" what you want and have the tool generate the Python class for the GUI. It also sets up event handlers for you too. Visual elements are best designed visually!!! -- http://mail.python.org/mailman/listinfo/python-list
Re: Tkinter vs wxPython
I have to agree with F. Gieger learning to code a framework by hand only helps you. Sure wxGlade/Boa/etc can help speed design and layout up, but what happens when you want to do non standard things or just get stuck because some thing just isn't working. Check recent threads .All the newbies needing help are using wxGlade or Boa and it helps them get neck deep into trouble before they even realize what they are doing wrong. Because they have not worked directly with the framework they don't understand the framework . But YMMV M.E.Farmer -- http://mail.python.org/mailman/listinfo/python-list
Re: Tkinter vs wxPython
> Sure wxGlade/Boa/etc can help speed design and layout up, but what > happens when you want to do non standard things or just get stuck > because some thing just isn't working. Then you add the necesary hand crafted code to the automatic generated code. At least is what I did when I needed. -- http://mail.python.org/mailman/listinfo/python-list
Re: Tkinter vs wxPython
Alejandro Weinstein wrote: Sure wxGlade/Boa/etc can help speed design and layout up, but what happens when you want to do non standard things or just get stuck because some thing just isn't working. Then you add the necesary hand crafted code to the automatic generated code. At least is what I did when I needed. I've tried a number of these tools, including BlackAdder, wxDesigner, wxGlade and BoaConstructor. I even paid money for some of them. They all have their problems, and I keep coming back to good old PythonCard. It's kinda clunky (though I have most experience with the 0.7 prototype, and the newer releases are improving), but it's definitely the most usable of all the ones I've tried. Dammit, you can actually *do stuff* with it rather than spend all your time fighting the tool. The only complaint I have is the need to add components from a menu rather than a tool, but I patched 0.7 to fix that, and I believe it will be possible to patch the 0.8 series to operate the same way. Whether I'll ever persuade Kevin Altis to include the patch in a live release is, of course, a question for another day :-) regards Steve -- Steve Holden http://www.holdenweb.com/ Python Web Programming http://pydish.holdenweb.com/ Holden Web LLC +1 703 861 4237 +1 800 494 3119 -- http://mail.python.org/mailman/listinfo/python-list
Re: Tkinter vs wxPython
"Jarek Zgoda" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Cameron Laird wrote: > > Well, while on Windows "native" look exists, on X11 "native" has other > meaning. On my wife's desktop it's KDE that is native, GNUStep is native > on mine and I strongly object calling GTK "native", as one can read on > SWT/Eclipse website. There's no "universally native" look on X11. Some > toolkits look better, but this is a matter of personal taste, for > software developer clean, stable API and suitable widgets are of much > higher value. > What I think people mean by "native" is that it follows the design scheme selected for the desktop. When run under Linux, my wxPython programs follow the look and feel of my Gnome desktop. When the same program is run on Windows, it follows that desktop theme. Both Gnome and Windows XP alter the the controls design according to user preferences. wxPython GUIs reflect this automatically and the controls always look and work like the underlying system. I may be wrong but I don't think you get that with TKinter! Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list
Re: Tkinter vs wxPython
On Wed, 29 Dec 2004 13:37:22 -0600, Thomas Bartkus <[EMAIL PROTECTED]> wrote: >"Jarek Zgoda" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Cameron Laird wrote: > > > > Well, while on Windows "native" look exists, on X11 "native" has other > > meaning. On my wife's desktop it's KDE that is native, GNUStep is native > > on mine and I strongly object calling GTK "native", as one can read on > > SWT/Eclipse website. There's no "universally native" look on X11. Some > > toolkits look better, but this is a matter of personal taste, for > > software developer clean, stable API and suitable widgets are of much > > higher value. > > > > What I think people mean by "native" is that it follows the design scheme > selected for the desktop. > > When run under Linux, my wxPython programs follow the look and feel of my > Gnome desktop. When the same program is run on Windows, it follows that > desktop theme. Both Gnome and Windows XP alter the the controls design > according to user preferences. wxPython GUIs reflect this automatically and > the controls always look and work like the underlying system. I think you're right about what "native" means. > > I may be wrong but I don't think you get that with TKinter! Tk has native widgets for many platforms. Jp -- http://mail.python.org/mailman/listinfo/python-list
Re: Tkinter vs wxPython
Steve Holden wrote: > I've tried a number of these tools, including BlackAdder, wxDesigner, > wxGlade and BoaConstructor. I even paid money for some of them. I have also tried each of these and paid money for the first two. My personal favorite is wxDesigner. It is very polished and worth every cent it costs. Try them all and choose the one that fits you. -- http://mail.python.org/mailman/listinfo/python-list
Re: Tkinter vs wxPython
Thomas Bartkus schrieb: When run under Linux, my wxPython programs follow the look and feel of my Gnome desktop. When the same program is run on Windows, it follows that desktop theme. Both Gnome and Windows XP alter the the controls design according to user preferences. wxPython GUIs reflect this automatically and the controls always look and work like the underlying system. Sure, but on my Linux, I use KDE, never Gnome, other people use Windowmaker or something else. wxPython with KDE-Look? What is the native look with wxPython and KDE? I don't think there is something like this, and the problem is that there isn't a free QT on Windows. Bernd -- http://mail.python.org/mailman/listinfo/python-list
Re: Tkinter vs wxPython
Bernd Schmidt wrote: Thomas Bartkus schrieb: When run under Linux, my wxPython programs follow the look and feel of my Gnome desktop. When the same program is run on Windows, it follows that desktop theme. Both Gnome and Windows XP alter the the controls design according to user preferences. wxPython GUIs reflect this automatically and the controls always look and work like the underlying system. Sure, but on my Linux, I use KDE, never Gnome, other people use Windowmaker or something else. wxPython with KDE-Look? What is the native look with wxPython and KDE? I don't think there is something like this, and the problem is that there isn't a free QT on Windows. Bernd Well, of course, the problem with X Window has always been when you ran an application built using one toolkit under a window manager built using another. *Then* the ugliness is due to the fact that different parts of the window are decorated by different toolkits. That's always going to be ugly. remembering-motif-under-open-windows-ly y'rs - steve -- Steve Holden http://www.holdenweb.com/ Python Web Programming http://pydish.holdenweb.com/ Holden Web LLC +1 703 861 4237 +1 800 494 3119 -- http://mail.python.org/mailman/listinfo/python-list
Re: Tkinter vs wxPython
Steve Holden wrote: Bernd Schmidt wrote: Sure, but on my Linux, I use KDE, never Gnome, other people use Windowmaker or something else. wxPython with KDE-Look? What is the native look with wxPython and KDE? I don't think there is something like this, and the problem is that there isn't a free QT on Windows. Bernd Well, of course, the problem with X Window has always been when you ran an application built using one toolkit under a window manager built using another. *Then* the ugliness is due to the fact that different parts of the window are decorated by different toolkits. That's always going to be ugly. Not always - the KDE and Gnome folks are doing a fair bit of work to make apps written with each others' framework blends in with the currently running window manager. To answer Bernd's question, a wx-based app will looks as good on KDE as any other GTK app does. For most distros, the app should look fine, since the vendor generally sets up the Gnome and KDE themes to be virtually identical. As I understand it, there are a couple of cross-theming engines that allow you to set GTK to 'use the KDE theme' and vice-versa so that apps written with the 'other' toolkit track any changes you make to the theme used by your window manager. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://boredomandlaziness.skystorm.net -- http://mail.python.org/mailman/listinfo/python-list
RE: Tkinter vs wxPython
Title: RE: Tkinter vs wxPython *warning* My very own opinions ahead. no flame intended. > Try them both out for an hour or two, and go with whichever > one "feels right". You very likely won't be making a mistake. i did that for java+swing, python+tk, python+gtk, python+wxWindow and python+glade I limited myself in one hour, and at a maximum 2 hours if the docs aren't perfect (i had zero experience at the time with all of them) The program code was already written, it only needed the gui. Java took me 3 hours to hook all the ungly hacks for dealing with threads in the AWT... but i will not elaborate on it because it would be kicking a dead horse. now for something completely diferent: python :) tk: the docs where superberb! done everything in 25min! then spent an hour polishing and adding status bars for everything :) gtk: had to use the C api docs. wasted some time figuring it out, gave up after one hour and a half and ended up with a window layout that didn't maximezed well. wx: Almost two hours. Once you get used to the docs and get the knowledge to read some examples all is fine. i liked the result. and liked the api but disliked the sea of constants necessary (i hated it in gtk also) glade: i gave up after 2hours of reading licenses and dealing with broken libs. Also, i can't run in beOS or tweak widgets. bah! rather go back to visual basic ;) Now going back on topic: A think that neighter Tk nor wxWindow is a good choice for python. They both suck much of it when it came to abstraction. They're still better than glade or gtk. But could improve a lot. wxWindow has simple an ugly API, and Tk has a huge sin in the syntax to pass actions to the buttons. But after all, i'm using exclusively TK for now. But things might change as i'm in a project with a huge need of non-ortodox input, so i may be going back to read about wxWindow event handlers or even pygame. peace, Gabriel -- http://mail.python.org/mailman/listinfo/python-list
Re: Tkinter vs wxPython
On Jan 27, 2005, at 12:17 PM, Gabriel Cosentino de Barros wrote: Now going back on topic: A think that neighter Tk nor wxWindow is a good choice for python. They both suck much of it when it came to abstraction. They're still better than glade or gtk. But could improve a lot. wxWindow has simple an ugly API, and Tk has a huge sin in the syntax to pass actions to the buttons. I agree with that assessment, although I preferred wxPython over Tk. One of the fundamental design goals of the Dabo framework is to wrap the UI toolkits to hide all that ugliness, and present a uniform, simple API for all the UI controls. We are using wxPython initially as our UI toolkit of choice, but the long-term plan is to wrap Tk, too, so that the interface to both is the same. IOW, the same app code will work with wxPython or Tk. That's a lofty goal, but one that I think is essential to bring Python UI development up to level available to other languages. ___/ / __/ / / Ed Leafe http://leafe.com/ http://dabodev.com/ -- http://mail.python.org/mailman/listinfo/python-list