Skip to main content
Chemistry LibreTexts

A1.2: Thonny IDE

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    The RPi (Raspberry Pi) comes with the Thonny IDE (Interactive Development Environment) installed on it and so it is simplest to install the Thonny IDE on your laptop. When you install Thonny it will also install Python 3.7 and so you do not need to install python.  If you are planning on doing machine learning you may want to install the Anaconda Package (which has Spyder IDE).  An IDE is a GUI (Graphical User Interface) that has an editor, interpreter and debugger and thus can be used to write, test and debug python code.

    Download Thonny at

    Thonny is now the default IDE for *.py and you can open it from either the start menu or by clicking on a *.py file.  If you want, you can also pin it to the taskbar.

    UI Modes 

    There are three User Interface Modes, simplified, regular and expert. Figure \(\PageIndex{1}\) shows the simplified view and you do not have access to the File/Edit/View... menu.

    clipboard_e40e9258f89ae537ac2094f847e9f7647.pngFigure \(\PageIndex{1}\): Simplified UI mode

    You would want to use the above mode if you had a very small screen and needed all the screen devoted to your code. To switch to regular view (below) you would click the command on the top right "Switch to regular mode". This requires restarting Thonny to take effect.

    clipboard_e407e118c17eedc25b47ce2892cf77947.pngFigure \(\PageIndex{2}\): Thonny in Regular mode gives you access to the Fiel/Edit/View.... menu


    To go to the simplified menu you would toggle Tools/Options/General/UI mode and choose simple (or regular or expert)


    Editor Options

    Under the regular UI you can go to Tools/Options/Editor and do things like insert/remove line numbers, set the reccomended line length (standard python libraries limit line length to 79 characters with comments being recommended to be limited to 72)

    Figure \(\PageIndex{3}\): Editor options under Tools/Options/Editor of normal UI.

    A1.2: Thonny IDE is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?