
- Python Basic Tutorial
- Python - Home
- Python - Overview
- Python - Environment Setup
- Python - Basic Syntax
- Python - Comments
- Python - Variables
- Python - Data Types
- Python - Operators
- Python - Decision Making
- Python - Loops
- Python - Numbers
- Python - Strings
- Python - Lists
- Python - Tuples
- Python - Dictionary
- Python - Date & Time
- Python - Functions
- Python - Modules
- Python - Files I/O
- Python - Exceptions
Tkinter Programming in Python
Tkinter 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/python import Tkinter top = Tkinter.Tk() # Code to add widgets will go here... top.mainloop()
This would create a following window −
- Related Articles
- Turtle programming in Python
- Socket programming In Python
- Functional Programming in Python
- Object Oriented Programming in Python?
- Hangman Game in Python Programming
- Collapsible Pane in Tkinter Python
- askopenfile() function in Python Tkinter
- Progressbar widget in Python Tkinter
- after method in Python Tkinter
- destroy() method in Tkinter - Python
- Different messages in Tkinter - Python
- Python - geometry method in Tkinter
- asksaveasfile() function in Python Tkinter
- Binding function in Python Tkinter
- Mouse Position in Python Tkinter

Advertisements