Antoine van Gelder wrote:
Don Hopkins wrote:
Of course it might just be more powerful and efficient to re-implement something like Klik-and-Play from scratch in Python, as a plug-in visual scripting component, which can be used to script a HyperCard-like gui environment, and games built on top of it like SimCity and Robot Odyssey.


Anyone know the current status of being able to turn an AST tree emitted by the Python compiler module back into code after it has been modified ?

I think Boxer is an interesting middleground between a full visual scripting environment, and something more visual than typical Python source code. It's an old/dead project, and I never was able to actually get the code to run well (in OS 9 emulation), but the paper is interesting: http://www.soe.berkeley.edu/boxer/papers.html

In the context of Python, and at its simplest, there would be a different representation of indentation. Like a box. Which isn't a big jump for Python, since indentation is already a visual structure for the code. Then you could add in non-text literals, like a color. These could be live objects (which I think is how Boxer worked), but that's not a good fit for Python. A simpler option is just having the idea of, well, non-text literals. This requires some groking of the code by the editor (and the entire coding environment, i.e., what binds to what). But it can be fairly simple, I think, maybe based on some magic methods attached to types that can have visual source representations.

Anyway, all of that can be serialized to text. Maybe not normal Python source code, I'm not sure. It could be very close, at least. Anyway, if I was going to pursue a more visual version of Python that's how I'd do it. But I'm not going to pursue it, so these choices are left up to whoever will do that ;)

--
Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org
_______________________________________________
Sugar mailing list
[email protected]
http://mailman.laptop.org/mailman/listinfo/sugar

Reply via email to