![]() There’s that Synta圎rror in the shell.Ġ2:11 And it’s also giving us that same Synta圎rror in the Assistant. And as we can see, running it has given us a Synta圎rror. Here we can see that it’s blank at the moment because the Assistant view doesn’t work until you try to run the program.Ġ1:58 So because the program has been saved previously, we can click Run, which will save it and then run it. But if you think you’ve finished typing a line and it’s still highlighted, then there’s definitely something you need to look at.Ġ1:43 You can see what’s really going on with this by going to View > Assistant. And while you can put that in as you add an extra code inside there, such as a function call, until you put in the correct closing bracket it will be highlighted as wrong.Ġ1:33 Until you’ve finished typing a line, probably best to ignore it. As soon as we put that in place, the highlighting disappears because we’ve got good syntax.Ġ1:09 Thonny will always be looking over your shoulder to make sure your code has good syntax, although you will notice as you create the code, it’s initially highlighted as being incorrect because we haven’t got a closing bracket. ![]() ![]() It still looks wrong because Python knows that this is wrong and we’re looking for another bracket. So, here, in a print statement, by leaving out the last of two brackets, we can see that that line is highlighted.Ġ0:44 If I move to another line and try typing, you can see I’ve got an indent, which seems a little bit odd, and that should probably highlight to you that something’s wrong.Ġ0:53 If I start another print statement, it doesn’t help. So as you’re typing the code, it’s checking for syntax errors and it will highlight them, in this case, by leaving a highlighted line. This is done as you’re creating the code. It has a powerful debugger built in and other tools which let you manage packages and plugins.00:05 Thonny has a number of other great features which will help you write more accurate code more quickly, the first of which is finding syntax errors.Ġ0:19 Thonny can find a syntax error in your code and highlight it to you. Thonny looks quite different to IDLE - it has different panels for the editor, the shell and the variables watcher plus (show view) lots of other options as well. The download options are at the top right. Thonny is built for education and you can download the latest version from the Thonny website. The second alternative you can use is Thonny. You can download IDLEX from the IDLEX website. It looks very similar to IDLE except that it has an extensions manager and, most importantly, allows you to clear the console - amazing! The first alternative IDE is a simple extension manager for IDLE called IDLEX. When you are installing Python, it is a good idea to add the python executable to the system path variable to make it easier to use python on your machine. The Python environment is available from the Python website you can download the latest version for your operating system from the downloads button near the top. ![]() IDLE, the Integrated Development Environment or IDE that ships with Python is OK but there are better alternatives out there. Before you start, you obviously have to have Python installed. So, in the third video ( Twitter/ YouTube), we took a speedy look at two alternative IDEs for Python - IDLEX and Thonny.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |