I’ve long since wanted to try building a blocks-based programming environment for Python. So I started by implementing a small Morphic port. It’s very basic and straightforward, doesn’t use any of Python’s advanced features, and implements only the barest of Morphic’s: It’s a simple, single-world, single-hand environment with just the minimum GUI-elements to start building something more complex. It’s also unfinished, because in the meantime I have been sort of pulled back into developing BYOB further (hang on for more).
What’s unique about Morphic? Three things:
- It’s a programming language independent mechanism for modelling concurrency. You don’t have to use native threads and processes in order to create lively, interactive applications. Just look at Scratch!
- It doesn’t use any OS-native widgets. You get to do what you really want, not what some industry standard thinks is cool. Again, take a look at Scratch!
- It’s easily portable. Okay, this is really the essence of the first two points: Because you neither use Smalltalk processes nor Smalltalk’s dependent-update mechanism, nor any OS-specific widgets, your application can easily be ported to both any other programming language as well as any other OS.
On the technical side, my little Morphic implementation uses the - awesome - PyGame library for primitives. To get an impression, please feel free to download the module morphic.py, and run it with Python 3.1.1 and PyGame 1.9.1. I’m aware that it looks and feels a lot like Squeak, it’s supposed to be that way :-).
You’re invited to use and modify / complete it any way you wish!