How to write GUI in Python?
python, user-interface
Solution
- Depends on what application you are writing. I would use Python for a simple GUI, yes.
- Use a proper toolkit (such as PyQt - Python bindings for the popular Qt)
- Sure
Hello world in PyQt:
import qt,sys
a = qt.QApplication(sys.argv)
w = qt.QPushButton("Hello World",None)
a.setMainWidget(w)
w.show()
a.exec_loop()
Problem
I would like to try to write a GUI application in Python. I found out that there are a lot of ways to do it (different toolkits). And, in this context, I have several basic (and I think simple) question? Is it, in general, a good idea to write a GUI application in Python? What is the standard (easiest and most stable) way to create a GUI applications in Python? Does anybody can give me a link to a simple Hello World GUI application written in Python?