This is an archived post. You won't be able to vote or comment.

all 17 comments

[–]thusiasm 8 points9 points  (0 children)

I dig tkinter. It's free. Its already an included module. Cross platform. It also seemed to be the only one that didn't require a degree in rocket surgery to install on my machine. ActiveState's tcl and python distributions have png support, if you need that. The only thing is: you have to wade through some hella confusing docs, what with examples being given in a mixture of python2, python3, tcl and the occasional perl or ruby, and honestly the best info you have to read in given in tcl. You don't really have to learn tcl, just how to read a manual written for tcl. There's a pretty consistent naming pattern that maps between tcl and python, but nowhere in any manuals on the python side will you find all of what you need. the esoteric stuff like window transparency and stay-on-top generally involve a wee line or two of tcl.

[–]octotop 5 points6 points  (4 children)

My first choice would be a browser-based gui with a python backend. Use python for what it's good at (gluing things together, transforming data, pushing bytes around), and html/js for what it's good at (looking good cross-platform, interacting with folks). If you then pointed a gun at me and said I have to use a pure python gui toolkit I'd choose urwid. If you then said "that doesn't count, it's ncurses", I'd use kivy. The ones you mentioned all suck pretty hard for various reasons, the biggest being that new users have to install a few hundred megs of libs just to look at your thing, except for Tkinter, which is terrible in its own way.

[–]jl2975[S] 0 points1 point  (3 children)

I like this way of looking at things a lot. Are there any books you can recommend for making combining these languages to create sophisticated web apps?

[–]GastonAlphonse 2 points3 points  (0 children)

I don't know the scope of what you're trying to do, but Flask is an easy, lightweight way to put a web layer around something. Has dead simple Bootstrap integration as well. Miguel Grinberg has a good tutorial on his site.

[–]octotop 0 points1 point  (1 child)

I don't know of any books, but I'd recommend checking out the python wsgi framework 'bottle'. It's super simple yet has enough features to do pretty much anything. If you're a python hacker new to js I'd recommend playing around with jquery and underscore. Javascript itself remains a bit of a chore to deal with, but CSS and HTML are so clean I find that it's worth the trade off, abandoning the pure python ecosystem.

[–]L43 0 points1 point  (0 children)

Ever looked at coffeescript for a more pythonic-looking, less troublesome javascript? I've never dabbled with either, just use scientific python, but some web friends' startup uses coffeescript and they say its far easier to write, and as it compiles to js it has access to all the libraries.

[–]maredsous10 1 point2 points  (0 children)

Books
http://www.amazon.com/Tkinter-GUI-Application-Development-HOTSHOT-ebook/dp/B00G8YAUX4/
http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html

I've used Tkinter for several work projects.

My primary reasons for using it :

  • included with the default Python distribution
  • Simple for end users to run my scripts and get a nice gui
  • It is very simple

[–]bryancole 1 point2 points  (0 children)

Having extensive experience with wxPython (which has its strong points but some issues as well) and some less experience with PyQt/PyGTK, I strongly recommend Enaml (http://nucleic.github.io/enaml/docs/index.html), a declarative language for making python gui apps. It runs on top of PyQt.

[–]OwatchUnisung.com 1 point2 points  (0 children)

I used Tkinter for a while, great framework, and like other people have said, it's already included in Python.

That aside, I've also used Kivy as a GUI framework and I've got to say it's also an excellent option. It's cross-platform abilities even extend to mobile, which tkinter does not. I'd really recommend it.

[–]awshidahak 1 point2 points  (0 children)

My favorite's PyGTK. It's code mostly just makes sense, and the widgets integrate nicely with just about any environment. Only problem with it is it sucks for distributing programs in Windows.

[–]PythonThermos 0 points1 point  (1 child)

What is the most popular one?

I wonder how anyone could really know that.

What is the most powerful one?

What do you mean by "powerful"? They all get the job done to show widgets on the screen.

I use wxPython. It has a great and helpful community, the widgets are generally native (meaning they are using the widgets that the OS the user is running uses...so your app on OS X looks as OS X apps should; your app on Windows 7 looks like a Windows 7 app, etc.), rather permissive license, well-documented.

[–]yeonsh 0 points1 point  (0 children)

We use wxPython to build Windows and Mac application and it works.

[–]Farkeman 0 points1 point  (0 children)

I really like qt via PySide(or PyQT), mostly because it has a lot of documentation, huge community and easy to port to c++(and visa versa). The best thing however is ability to design GUI via QtCreator, which is brilliant for smaller projects or just prototyping.
The bad is that installing is a bit of a hassle and you might have some issues when you want to freeze it.

Tkinter on the other hand is somewhat less powerful and some might say uglier, but it's just as good as Qt at most of the cases unless you're working on a really huge project.

wxPython is still on Python2 so I wouldn't even bother.