Skip to main content

20 June 2024

Strype: Python with a blocks-like interface, in the browser - CAS Secondary TC meeting

Marta Bronowicka profile image
Written by

Marta Bronowicka | Community Specialist

Strype: A Bridge Between Block-Based and Text-Based Python Programming

Key Summary Points:

  • Strype offers a frame-based Python editor designed to ease the transition from block-based to text-based coding.
  • The tool maintains the syntax error-free environment of block-based editors while introducing text entry.
  • Strype's interface is split into distinct sections (imports, function definitions, main code) to guide beginners.
  • Keyboard shortcuts and contextual frame insertion enhance the editing experience.


Strype, developed by the Programming Educational Tools Group at King's College London, is a frame-based editor for Python. During the presentation, Pierre Weill-Tessier and Neil Brown walked us through the features and functionalities of Strype, which is currently in its beta version.

The key selling point of Strype is its hybrid nature. It combines the error-preventing benefits of block-based editors like Scratch with the flexibility and complexity of text-based coding. Block-based editors are excellent for beginners because they eliminate syntax errors and provide an easy-to-use, drag-and-drop interface. However, transitioning to text-based coding can be daunting for students, as it introduces a higher likelihood of syntax errors and requires a deeper understanding of the programming language's grammar.

Strype addresses this challenge by using frames, which are similar to blocks in their visual and interactive properties but allow text entry within specific slots. This setup helps students gradually acclimate to text-based coding without being overwhelmed by syntax errors. Frames in Strype are designed to prevent grammatical errors and maintain code structure integrity, much like blocks. However, they also allow for more advanced coding constructs and text input, providing a middle ground between block-based and text-based programming.

The tool's interface is split into three main sections: imports, function definitions, and the main code. This deliberate structure not only mirrors typical Python code organisation but also guides students in understanding where different types of code belong. The frame cursor, an essential feature of Strype, helps students navigate and manipulate their code efficiently. It allows for both mouse and keyboard interactions, supporting various styles of coding and making the editing process smoother and faster.

One particularly impressive aspect of Strype is its error-prevention mechanism. For instance, when typing, paired symbols like quotation marks and parentheses are automatically completed and managed. This feature significantly reduces common syntax errors, such as unmatched brackets or unclosed strings, which are frequent stumbling blocks for beginners.

Neil Brown's demonstration highlighted how Strype can make coding more accessible while still providing the depth needed for more advanced programming. The ability to drag and drop frames, use keyboard shortcuts, and see contextual options based on the current position of the frame cursor all contribute to a streamlined and intuitive coding experience.

In addition to its general programming capabilities, Strype can be effectively used for projects involving micro:bit.


Watch the recording 

Start coding in python 

Start coding for micro:bit

Join CAS Secondary Community