Adding GUI elements to Python scripts

GUI Treatment

Article from Issue 143/2012
Author(s):

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

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Blogging on the Move with wpToGo
  • Python 3

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

  • Archipel

    The innovative Archipel cross-hypervisor management tool uses the Jabber protocol to chat with servers running Xen, KVM, OpenVZ, and VMware.

  • 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
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News