![]() ![]() Execute the script by clicking on the “play” button.Save the script into a file thanks to the graphical interface.Open the IDE and write Python code in the text editor.If you’ve used the Thonny IDE (or any other IDE) before on the Raspberry Pi, you’ve seen that you just need to: Create and run Python scripts on Raspberry Pi So, only use the shell for quick tests, and when you want to create real programs, create your own Python scripts instead. Note that when you exit the shell, all variable states and functions you’ve written inside the shell will be lost. ![]() To close the shell, you’ll have to execute the command “exit()” – with the parenthesis. Python will catch the signal sent by CTRL+C and will throw a KeyboardInterrupt exception, which you can also catch in your code if you want to.īut the shell won’t be closed. You can power on/off a LED directly from the Raspberry Pi terminal.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |