Python

Tkinter – Python’s De Facto GUI

Tkinter - Python’s De Facto GUI

Python provides the standard library Tkinter for creating the graphical user interface for desktop based applications.Tkinter is an open source, portable graphical user interface (GUI) library designed for use in Python scripts. Learning Tkinter is very intuitive, and therefore quick and painless. Its implementation hides the detailed and complicated calls with simple, intuitive methods. This is on par with the Python way of thinking, since the language excels at quickly building prototypes. For this reason , it is expected that its preferred Graphical User Interface library be implemented using the same approach.

Python scripts that use Tkinter do not require modifications to be ported from one platform to the other. Tkinter can be used on any platform that Python is implemented for, for example, Microsoft Windows, X Windows, Macintosh etc… This property gives it a great advantage over most of the competing libraries, which are usually restricted to one or two platforms. Tkinter is now included in any Python distribution. Therefore, no supplementary modules are required in order to run scripts using Tkinter.

Tkinter widgets, when instantiated, creates a window component that can be styled to respond to the programmer’s need. To make changes in the appearance of a widget, we can use options rather than method calls. Typical attributes can include text, color, size, command callbacks, position, etc. When widgets are instantiated, they don’t immediately appear on the screen. Geometric managers such as pack, grid, place have to be called in order to make the widget visible on the screen. Aside from the methods inherited from the parent class Widget, each one of them has distinct options and methods suitable for configuration of the particular widget. Therefore, Tkinter widgets don’t only provide a tool to build a graphical interface, it also allows the programmers to create a fully functional application.

Author: STEPS

Leave a Reply

Your email address will not be published. Required fields are marked *