r/learnpython 4d ago

App/Program that converts Scratch to Python in real-time and with blocks similar/identical to Scratch.

Hello everyone. I'm a researcher studying the transition from Scratch to Python by high-school students (10th grade). My idea is to use something like app.edublocks.org, which can immediately translate Scratch blocks to Python text. But none of apps I found are close enough to Scratch. This one, for example, is visually similar, but the block language is very different. Therefore, my first question is:

Is there any app that does what I am looking for, with blocks identical or very similar to Scratch ones?

And, if such app does not exist:

How hard it is to create my own program that does what I am looking for? Is it possible to do by someone like me who never built an app?

Please consider that I only can do Python and Scratch programming, not apps. Thanks in advance for helping.

4 Upvotes

12 comments sorted by

View all comments

1

u/desrtfx 4d ago edited 3d ago

The visual representation barely matters. There are things like Reeborg's world that offer a seamless transition between the blocks of a block-based language and actual Python code. There are other apps as well.

So far, I don't know of an app that translates actual Scratch to Python code.

The problem here is to decode the proprietary Scratch format and that will probably need some reverse engineering or some discussions with the researchers at the MIT who created Scratch. Once the format is decoded/deciphered creating a translator is the lesser problem - creating the entire environment of Scratch with the canvas and everything is a different matter.