Tkinter For Python 2.7
Python provides various options for developing graphical user interfaces (GUIs). Most important are listed below.Tkinter − Tkinter is the Python interface to the Tk GUI toolkit shipped with Python. We would look this option in this chapter.wxPython − This is an open-source Python interface for wxWindows.JPython − JPython is a Python port for Java which gives Python scripts seamless access to Java class libraries on the local machine.There are many other interfaces available, which you can find them on the net.
Download Tkinter For Python 2.7 Linux
Tkinter ProgrammingTkinter is the standard GUI library for Python. Python when combined with Tkinter provides a fast and easy way to create GUI applications. Tkinter provides a powerful object-oriented interface to the Tk GUI toolkit.Creating a GUI application using Tkinter is an easy task. All you need to do is perform the following steps −.Import the Tkinter module.Create the GUI application main window.Add one or more of the above-mentioned widgets to the GUI application.Enter the main event loop to take action against each event triggered by the user.Example#!/usr/bin/pythonimport Tkintertop = Tkinter.Tk# Code to add widgets will go here.top.mainloopThis would create a following window − Tkinter WidgetsTkinter provides various controls, such as buttons, labels and text boxes used in a GUI application.
Tkinter Version For Python 2.7
These controls are commonly called widgets.There are currently 15 types of widgets in Tkinter. We present these widgets as well as a brief description in the following table − Sr.No.Operator & Description1The Button widget is used to display buttons in your application.2The Canvas widget is used to draw shapes, such as lines, ovals, polygons and rectangles, in your application.3The Checkbutton widget is used to display a number of options as checkboxes. The user can select multiple options at a time.4The Entry widget is used to display a single-line text field for accepting values from a user.5The Frame widget is used as a container widget to organize other widgets.6The Label widget is used to provide a single-line caption for other widgets. It can also contain images.7The Listbox widget is used to provide a list of options to a user.8The Menubutton widget is used to display menus in your application.9The Menu widget is used to provide various commands to a user.
These commands are contained inside Menubutton.10The Message widget is used to display multiline text fields for accepting values from a user.11The Radiobutton widget is used to display a number of options as radio buttons.
MtTkinterA wrapper around Tkinter for multi-threading by Allen B. TaylorThis is the mtTkinter module written by Allen B. Taylor, originally published.This module was originally created to fix problems in a program that was not thread-safe, but I have found it to be useful in myown programs as well.
This GitHub repository is available for those who want to fork the code, but mostly I just created it toget the module on PyPI. Publishing the module on PyPI was quite a while ago. InstallationYou can install mtTkinter by copying it directly into your project folder, install it Python-installation wide by copying themtTkinter.py file into%PYTHONDIR%/Libs/lib-tk/mtTkinter.py or you could use pip install mttkinter, a method for which thisrepository was specifically created. LicenseAllen B. Taylor licensed this code under the GNU LGPL license from version 0.4 on.
DevelopmentSince I have not found any bugs or problems with the current code, there will be no further development of the module. If you want,you can fork the repository and suggest changes through pull requests. You will be credited for your work.