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

comments powered by Disqus