Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am looking forward to develop a desktop application using python. I am a beginner and I do not have sufficient expertise in python. I am a java programmer. Although I have some experience in building UIs using swings, I see that apps developed on swings are too damn slow. Well this might be one reason why many of the major implementations are done in C/C++ as in browsers/games etc.

Developing a UI in C++ might be a better option but I prefer to chose a high level programming language over C/C++. So I have opted for python presuming that it would perform well over java swings as python itself is natively build on C/C++.

So can I go ahead with this assumption that python is better than java swings to develop a UI? Or do you suggest a language that is better than python to develop UIs? If at all I go ahead with python, which toolkit should I use Tkinter or wxPython and why? please help me.

share|improve this question
3  
Your assumptions seems flawed. Python is built on C/C++, but so is the JVM (most likely). –  user281377 Jun 15 '11 at 8:21
    
Why limit yourself to Tkinter and wxPython? –  Anto Jun 15 '11 at 9:15
1  
I am not trying to limit myself. I was under the impression that these were the two well known toolkits for GUI development. –  Vamsi Emani Jun 17 '11 at 5:17
    
The Lazarus IDE, Free Pascal Compiler, and Object Pascal makes for a very fast and easy way to develop GUIs. –  systemovich Sep 21 '11 at 10:24
add comment

6 Answers

up vote 10 down vote accepted

I have just started development of a windows desktop app, using python. I am using PyQt.

It's very easy to install and get up and running. The tutorial here: http://zetcode.com/tutorials/pyqt4/firstprograms/ shows how easy, I'll show the code:

#!/usr/bin/python

# simple.py

import sys
from PyQt4 import QtGui

app = QtGui.QApplication(sys.argv)

widget = QtGui.QWidget()
widget.resize(250, 150)
widget.setWindowTitle('simple')
widget.show()

sys.exit(app.exec_())

That gets you a window up.

I chose Python/PyQt over C#/WPF because I want to learn python and my employer is giving me the time.

My manager recommended PyQt to me over other frameworks, as in his experience it's easier to use.

share|improve this answer
1  
There's also pyside (pyside.org), see stackoverflow.com/questions/1297660/pyside-vs-pyqt –  codeape Jun 15 '11 at 10:56
    
I've used PySide before and it works pretty well. However PySide's future development is in a bit of limbo because Nokia has sold off Qt. –  jhocking Jun 15 '11 at 14:36
add comment

If you're looking to develop a native GUI for Windows or OSX, I'd advise using Tkinter (i.e., the GUI library Tk with pythonic clothes on) as that gets you much closer to the native look than wxPython (wxWidgets for python). I'm not finding it easy to quantify, but to my eyes the Windows and OSX screenshots. YMMV. I do know that Tk (important: with the Ttk widget set) is very strongly native looking.

If you're developing for Linux… I can't really honestly advise one over the other, as I've lost track what the current favored platform look is there. :-)

share|improve this answer
1  
Note that Tkinter does not provide many commonly used widgets out of the box. For example, if you want a progress bar you'll have to either write one yourself or find one someone else has written. –  James Jun 15 '11 at 16:50
1  
Wait, but wxWidgets uses native GUI elements. At least, the C++ bindings do. I'm not so sure about Python. –  Zhehao Mao Jun 16 '11 at 2:09
add comment

I would say it's a good choice if you already know and like Python. Otherwise, use the language you already know, which is Java. The one exception here is if this is a learning project, in which case I would suggest that getting experience with other languages would be a good idea.

My point here is that Python is not really any better or worse than Java for UI applications, so use whichever tool you like working with.

share|improve this answer
add comment

The only real advice one can give for all questions like this is "give it a try and see if you like it" - other peoples opinions on programming languages (particularly on what may be their most loved or most hated languages) are rarely worth much.

However, my 5 cents worth - for knocking up quick, simple Windows GUIs, the combination of Python and wxWidgets works very well. But as I said, try it for yourself - you can put together something simple but useful in an hour or so, even without much Python experience (I certainly don't have much).

share|improve this answer
add comment

I think certain types of applications are fairly managable to write in Python.

For example Task Coach is written in Python/wxPython. They use a Python2exe compiler like py2app, py2exe etc to create cross-platform, native-looking executables.

share|improve this answer
add comment

If you are restricted to developing in the Windows ecosystem, and use Visual Studio, then consider Iron Python. Iron Python is Python plus .NET objects.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.