This blog will discuss the Thonny IDE, which is possibly the best IDE for Beginners in Python, we will discuss how to download and install it, the first view, install libraries in it, write programs in it, its basic features, and some tips and tricks.
Features of Thonny:
- in-built python(you do not need to download and install Python in your system)
- Highlights syntax errors
- Explains scopes
- Code completion
- Line numbers
- Statement stepping without breakpoints
- Live variables during debugging
How to Download the Thonny IDE?
You can download it from the official website: https://thonny.org/. They have mirrors for Windows, Mac, and Linux.
Installing Thonny on Windows
- After downloading the .exe file from the official website, run the file to start the installation process.
- Select if you want to install it for all users or not. If you don’t know, just install it for all users.
- Give the program administrative privileges.
- Welcome Page: Click on Next.
- Accept all terms of service and click on “Next” until the installation starts because all the suggested settings are set in the default. Click on Finish after the installation is complete.
- Congratulations, you have installed Thonny on your Windows machine.
First look at the Graphical User Interface
The first look of the app is like in the image below
The IDE is divided into the Menu and icons tab, code editor, console or the shell, and the Assistant(Right side).
The header of the application has the Quick Access Menu. Let’s see all options:-
- The File menu allows the developer to work on preferences and file edits.
- The Edit menu will allow the developer to do small tasks like undo, redo, copy, and paste in the code editor.
- The View menu will allow us to edit the application’s User Interface.
- The Run menu will let us conduct actions related to running the python program.
- The Tools and Help menu allows us to do other not-so-important stuff.
The icons tab allows some regular stuff to do faster, like creating a new file, opening an older file, saving the file, running the file, debugging for solutions, stopping the current process, etc.
How to write and run Python code in Thonny IDE?
Write the following code into the editor and run by clicking F5 or the play button on the icon bar.
This is a simple program to print a string.
Let’s try a more complex program for generating the Fibonacci sequence. Write the following code in your code editor and run it.
a = 0 b = 1 for i in range(5): print(a) print(b) a = a + b b = b + a
Handling Syntax Errors
When you make a simple mistake and create a syntax error, the IDE will open up a new section in the program called the “Assistant”, which will suggest you possible solution for the error and the bug. Suppose a small syntax error in the above code where we write “rang” instead of the range function.
You can see that the assistant also suggests some edits to eliminate the errors.
Installing a new Python Module
To install a new python module, first, click on the Tools in the Action Menu and click on “Manage packages“. Then, search for the package you want. Remember that the package must be available on the PyPI Library. In this tutorial, we are installing “Selenium“.
Now on the search bar, search for the package and click on the desired module
Click on the first option and click “Install“
The installation will start
After installing it, you will see something like this
Congrats, you can now install a module on the Thonny IDE.
Thanks for reading this blog until the end. To learn more about basic scripting with Python, you can read other blogs on this website with the category: https://copyassignment.com/category/python-projects/.
Our GitHub: https://github.com/copyassignment
- Pong Game in Java
- Puzzle Game in Python
- Hospital Management System Project in Java
- Attendance Management System Project In Java
- How did Python help in Black Hole Discovery?
- Hyphenate Letters in Python
- Ludo Game in Java
- Python Numpy Min
- Draw Goku in Python Turtle
- Medical Store Management System Project in Python
- Restaurant Management System Project in Java
- Flappy Bird Game in Java
- Draw Mickey Mouse in Python Turtle
- Creating Dino Game in Python
- HackerRank Day 9 Solution in Python: Recursion
- HackerRank Day 8 Solution in Python: Dictionaries and Maps
- HackerRank Day 7 Solution in Python: Arrays
- ATM Simulator In Java
- Tic Tac Toe Game in Python
- Brick Breaker Game in Java
- HackerRank Day 6 Solution in Python: Let’s review
- HackerRank Day 5 Solution in Python: Loops