Adding GUI elements to Python scripts

GUI Treatment

Article from Issue 143/2012

If you need to add graphical elements to Python script, EasyGUI can help beginners and experts alike.

When it comes to wrapping up Python scripts into a graphical interface, you have several options, including Tkinter, wxPython, PySide, and PyGTK, but using these libraries is overkill if you just want to add a few GUI elements to a Python script to make it more user friendly.

In this case, EasyGUI is a much better tool for the job because it allows you to add common graphical elements without going through the rigmarole of coding GUI by hand. For example, a simple task like displaying a message box using the PyGTK toolkit requires a hefty chunk of code (see Listing 1).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Table of Contents: 143

    New vulnerabilities appear every day. To keep your network safe, you need to think like an attacker.

  • Blogging on the Move with wpToGo
  • Python 3

    What do Python 2.x programmers need to know about Python 3?

  • Wordpress

    Wordpress is an easy, frugal, and feature-rich tool for creating a personal weblog. If you always wanted your own blog, but you don't have time for the technical details, Wordpress lets you get started in style.

  • Practical Python in Linux

    We’ll introduce you to Python, an easy-to-learn scripting language, and also help you get started creating your own practical Python scripts.

comments powered by Disqus