Thonny: The Heart of Your MicroPython Toolkit

Thonny Workshop: Your Adventure Toolkit

Thonny IDE: Your Coding Swiss Army Knife


In this Thonny Workshop, we will explore Thonny, your free, open-source Integrated Development Environment (IDE)! Think of it as a super-powered text editor with built-in tools to make coding a breeze.


Fun Fact:

Thonny is an Integrated Development Environment (IDE) for Python, developed at the University of Tartu in Estonia. It's designed to be beginner-friendly, featuring a unique step-by-step code visualization tool that helps newcomers understand program flow. Despite its simplicity, Thonny includes advanced features for experienced programmers and comes with Python built-in. Its support for microcontrollers has made it popular in the maker community. Thonny's clean interface and powerful tools have led to its widespread adoption in educational settings and beyond.

Embarking on Your Thonny Quest

To get your own copy of Thonny, visit https://www.thonny.org/

  1. Select your operating system of your host computer (Windows, Mac, or Linux)
  2. Choose the latest installer to download and install

it's that simple!

Screenshot of thonny.org home page, click your operating system in the upper right corner, then select the download optoin.



Running Thonny


Let's take Thonny out for a spin. Depending on what kind of computer you have, you pretty much just need to find where it installed to, and click to run.


MS Windows Icon Windows:

  1. Click the Start menu or press the Windows key
  2. Type "Thonny" in the search bar
  3. Click on the Thonny icon when it appears in the search results Alternatively, you can double-click the Thonny shortcut on your desktop if one was created during installation.

Apple Logo Mac:

  1. Open the Applications folder in Finder
  2. Look for the Thonny icon
  3. Double-click the Thonny icon to launch the application. Note: you can also use Spotlight Search by pressing Cmd + Space (⌘ + space bar), typing "Thonny" into the search box, and pressing Enter when Thonny appears.

Linux Logo Linux:

  1. Open your application menu (this varies depending on your Linux distribution and desktop environment)
  2. Search for "Thonny" in the application menu
  3. Click on the Thonny icon to launch it Alternatively, you can open a terminal and type thonny then press Enter.

Remember, the exact steps might vary slightly depending on your specific OS version or settings. If you have trouble finding Thonny or the installer, you can always search for it in your system's search function.



Exploring the Thonny Terrain

Let's take Thonny for a test drive.

When you first run Thonny, it will open your coding environment, with tools and some of the windows visible.

Screengrab of Thonny application, menubar, toolbar, coding window, assistant window, shell window and connection status.

Let's take a look at some of the parts.

  1. Menu Bar: Your gateway to advanced functions and settings
  2. Tool Bar: Quick access to essential actions (New, Open, Save, Run, Debug, Stop)
  3. Code Editor: Your magical scrolls await! Write and save your code here
  4. Shell Window: Watch your code come to life and catch those sneaky bugs
  5. Assistant Window: Your friendly guide offering tips and tricks along the way
  6. Connection Status: Shows where your code is running: local on your computer or on your Pico microcontroller once you connect it. You can select which to use by clicking on this line for a menu of options.

Cool Features to Discover:

Thonny offers the following:

  • Line numbers for easy navigation
  • Syntax highlighting to make your code pop
  • Tabs for juggling multiple projects and files, with asterisks (*) on the tabs to remind you to save your work


Adventure Tip:

Many of Thonny's helpful built in tools are available under the View menu. Simply select them in this menu to give them a look and try them out. We highly recommend the Assistant, Shell, Variables, and Files to start out with. And especially give Help a spin. It's like having your own guide sitting next to you while you code.

Use Thonny's View menu to select tools to display in the Thonny interface.


Adventure Recap

In this leg of the adventure you discovered:

  • The Thonny IDE and how to download and install it on your host computer
  • Some of Thonny's main features
    • The code window
    • The Shell
    • The Assistant
    • The main menu and tool bar
  • Tips for exploring Thonny's other features

Complete and Continue  
Discussion

0 comments