- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference between tkinter and Tkinter
In order to install tkinter in a local computer, we use several commands on the basis of our OS architecture. There are two ways to import the tkinter library in our Window-based machine which are based on the Python version. Earlier, for lower versions of Python, we generally used to import the tkinter library using the following command −
from Tkinter import *
However, for Python 3 or later, we generally import the Tkinter library in the environment using the following command −
from tkinter import *
The only difference between Tkinter and tkinter is that Tkinter was initially used with Python 2 and tkinter is used for working with Python 3 or later versions.
Example
Try to run this simple code in Python 3 or higher, it will display an error message.
#Import the tkinter library from Tkinter import * #Create an instance of tkinter frame win = Tk() #Set the geometry win.geometry("650x200") win.mainloop()
Output
ModuleNotFoundError: No module named 'Tkinter'
Advertisements