Pytch – a bridge from Scratch to Python programming

Publication date: August 30, 2022

By Glenn Strong, Assistant Professor in computer science in the School of Computer Science in Trinity College.

Pytch – pronounced “pitch” – is a new free coding environment designed to help learners with the transition from block-based programming with languages like Scratch to text-based programming in Python.

It is developed by researchers at Trinity College Dublin and the Technological University of Dublin in Ireland, with the support of funding from Science Foundation Ireland.

The Pytch environment lets learners explore Python programming through the lens of Scratch – that means, making Python programs that have sprites, images and sounds, and which can react to user events (like mouse clicks and button presses) the way Scratch programs do.

Scratch and Pytch side-by-side.

Learners often start off with visual and block-based languages, especially Scratch, which lets them create amazing and fun programs. After a while they usually want to try out text-based programming, and Python is a natural next step for them.

But making this leap can be hard. Usually, the learners have to give up on making the kinds of fun games, animations, and stories that Scratch allows, and instead start making much plainer text-based programs. Even if they use something like Pygame, they must switch away from the way programs are designed in Scratch; instead of saying something like “Forever glide to random position” to make a simple animation, they have to think about moving an image a little bit at a time within a loop or “update” function, doing any other steps carefully interleaved. In a sense, they have to “unlearn” some of what they have learned with Scratch about writing programs.

All this comes at exactly the same time that they have to learn to very carefully type in their code instead of building it from blocks. For some it’s too big a leap to do all at once, and their interest can drop off at this crucial stage in their coding journey.

Screenshots of some projects written in Pytch.

There are many great tools for helping learners with this blocks-to-text transition, but none of them that we found were tackling this problem of making learners forget things that they had learned about program design! So, we have built Pytch to be a bridge from Scratch to Python. Our aim is to let learners keep their Scratch knowledge of how to write a computer program – Sprites, graphics, sounds, event-driven concurrency – while they learn the Python language. “Python through the lens of Scratch”.

Eventually a learner might want to move on to do other things – web development, or work with microcontrollers, say. With a solid foundation in text-based programming they can do that more easily; our idea is that they don’t have to go all the way in one big leap.

A screen shot of the Pytch environment.

A full launch is planned for later this year. The beta version is already on the web at, where you’ll find the environment, help, and set of self-paced tutorials.

We are also conducting formal trials in schools and code clubs, so if you’d be willing to help us test the system, or if you just want to find out more, contact the project lead at, or, and you can follow us on Twitter @pytchlang for updates.

Some graphics in the Pytch demo were taken from a Wireframe Magazine project and are used under a creative commons license.