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

  • Table of Contents: 143

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

  • Gimp Scripting

    Many users turn to GIMP for pictures in the window, but some may not realize GIMP also has scripting capabilities that allow you to automate recurring tasks. The Python scripting language is a useful alternative to the GIMP’s integrated Lisp dialect.

  • Python 3

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

  • 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.

  • KTools: Treeline

    Mindmaps are useful for organizing ideas and data. Treeline is a promising mindmap tool for KDE.

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95

News

njobs Europe
What:
Where:
Country:
Njobs Netherlands Njobs Deutschland Njobs United Kingdom Njobs Italia Njobs France Njobs Espana Njobs Poland
Njobs Austria Njobs Denmark Njobs Belgium Njobs Czech Republic Njobs Mexico Njobs India Njobs Colombia