Other Useful Features - Thonny
00:00 After talking about debugging in Thonny, let’s look at some other useful features that the program has to offer.
00:06 So one thing that I already showed you—I’m just going to give it a quick, uh, re-show, yeah?—is the file inspector. So, View > Files gives you this overview that you can navigate in your file directory, figure out where you are, and see an overview of all your project-related files. You can switch it on and off. So, that’s just a quick recap.
00:26 And another useful thing that I want to show you here is the variables inspector. You can find it in View > Variables and it opens up this window for you here.
00:37
I will change our code a little bit just to make you see how useful this is a bit more, so I’m going to assign an additional variable in here. Let’s print out that y
so we have the same functionality. And if I run this current script now—let’s run it in debug. Yeah.
00:55 So, we step through this…
01:00
and we see that we can observe the variables that are getting assigned over here. So, x
is currently referencing to 0
, and if I keep going, now we’re evaluating this expression on the right side of y
. We talked about this in the debugging section, and you can see that it evaluates to 0
.
01:19
We can see the variables that we have in our program over here, which is very, very useful, like if you want to keep an overview of what’s going on. In this case, yeah, now we know x
equals 0
at the moment and y
also equals 0
. It’s not that interesting, but if I click through this a couple of times, like so—1
, 1
, and now we’re at the next one. Now it’s going to be different, right? Now y
evaluates to 4
and x
is 2
because 2
to the power of 2
is 4
. Yeah, that’s the variable inspector.
01:49 You can imagine that if you have a more complex program, having an overview of what are the different variables currently and what values do they refer to—especially if they’re changing through the course of the program, as they do in here—can be extremely helpful as an additional aid to debugging, or just also getting an idea of what’s going on in your project.
02:08 So, that’s the variable inspector. You can switch it on here by just clicking this in View as we can do with most of these things. And a last thing I still want to show you as a useful feature are the Notes.
02:22 So often, when you’re getting started and when you’re learning, there’s something that’s maybe interesting about this that you want to take a note about, and Thonny simply has that built-in. You can go in here, open up the Notes and then just say something like, “Double * symbol means ‘to power of’”. That’s just a quick note that I want to take, because I’m only starting in learning this, and this is going to get saved in the notes together with my script.
02:51 So if I close the program and open it up again, and I look at the Notes block again, my notes are going to be there waiting for me, and it’s just a quick way that allows you to not have some kind of text editor open on the side, because you already have it built-in here.
03:07 And if you’re getting started with Python, I would heavily encourage you to take notes because having to formulate your understandings or your questions in text—or speaking them out, as well, if you have someone to learn with—is a great learning tool.
03:20 So, I like that this is built-in here in Thonny and—yeah. Use it extensively. It’s helpful. So yeah, the most important features, I think, that really make Thonny stand out as a learning environment, as a getting-started Python code editor, is the great debugging feature, and just this additional help that we saw a couple of times.
03:42 Let me see that again. I have to stop the debugger first.
03:48 That just pops up the Assistant that gives you such great hints and explains what do these things mean. If you’re working with other programs, you’re just going to get those errors, but here in Thonny, you actually get a description of what does it mean, and it gives you hints on how to proceed and how to solve these errors. Yeah, so that’s it! Big recommendation. Try it out if you’re getting started.
04:11 Use Thonny, use the debugging, and use the assistant as much as you can, and understand what’s going on in your code. It’s really helpful for getting a better grip on programming and in Python in general. Okay, so in the next video, we’re going to take a look at what are some ways to get more familiar with Thonny and what’s maybe some good resources to learn it better. Okay, I’ll see you over there.
Become a Member to join the conversation.