Overview & Use Cases - Thonny
Learn more about Thonny in our dedicated course: Thonny: The Beginner-Friendly Python Editor
00:00 In this section, we’re going to talk about Thonny, which is a very beginner-friendly Python editor. We have a tutorial on how to use Thonny on Real Python, so I’ll link that down there in the course notes for getting installation instructions and help on that. Go there and check it out after the course.
00:17 Now I’m just going to show you how it works and give you a quick overview of Thonny. We have this overview and the quick use cases.
00:26
After you’ve downloaded and installed it, this is how it’s going to look when you open it up. You don’t have print("Hello World!")
in there yet, but you’re going to see these two windows probably. First of all, our editor—up here—and down here, we have a shell.
00:40 We have a Python console and an editor by default. There’s more, and I’m going to show you this in a moment. And then we also have a slim, but very useful, command palette up here. Like saving, opening a new file, running something, debugging, and already some features for debugging.
00:59 I’ll talk more about debugging in a separate video, but for now, I’ll just show you. So if I write some code in here—I increased the font size a little bit, so that’s why it’s so big.
01:08 You can do that with Command + Shift + Plus. You see, Increase font size, Command + Shift + Plus. Or make it a little smaller. You can see here that it does syntax highlighting by default, so that’s already a great plus. And it also gives us hints when there’s some syntax errors. It’s marked here in green, we can notice that something’s going wrong.
01:27
And we can run this code right from in here, so I can say, “I built this, now I want to run it.” The first time I run it, it tells me—okay, currently it’s just a scratch file. We didn’t give it any name yet, so I need to save it somewhere. We’re just going to say test.py
and save it. And here we see, we can run our script and we can see the output down here in our shell.
01:51
At the same time, we can continue working with this shell down here. I can say x = 2
and it works just as you would expect the normal Python shell to work.
02:01 So we have these two tools—one for quickly checking up something, and then up here for writing our script. And that works pretty nicely, integrated in a simple way.
02:09 So without much other things getting in the way, it’s already easy to see what you can do and easy to interact with it. Now, there’s other help in here as well, so let’s try that.
02:20
If I would run the script now, I’m getting a SyntaxError
, but that’s not the only thing I’m getting. Up here on the right, the Assistant pops up. We can make this window bigger.
02:31
And here’s some explanations that are just great when you’re getting started. So, we’re getting a SyntaxError: EOL
(end of line) while scanning string literal
, and then we have a description of what does this mean.
02:41
You haven’t properly closed the string on line 1. If you want a multi-line string
—so, there’s lots of interesting and helpful information right in here that helps you as a beginner to be—like, if you don’t exactly know yet what is a SyntaxError
, you can read up on it here and quickly figure out what’s going wrong.
02:59
And then there’s also more links for directly, like, performing a web search. It’s giving you hints on what you could type, so we have this, for example, which just picks out the SyntaxError
and that’s Python up in front.
03:12 You can literally copy this and go to Google and figure out what you can find there. So this Assistant is a helpful tool that can just help you to improve your code and learn while you’re coding.
03:23 So it’s kind of like an integrated coding/learning environment, Thonny. Okay. And that already nicely describes what is the main point of using Thonny, is if you’re getting started and you want to learn Python, then this is just a great IDE to get started with because there’s so much support, it’s very simple, and yet at the same time, it’s very powerful.
03:44 Okay! Let’s go to the next video and over there, we’ll be able to start writing our code snippet, and I will talk a little bit more about using Thonny. See you in the next video.
Become a Member to join the conversation.