[Gsoc] 2013/07/19 Meeting Absence

Marion Zepf marion.zepf at gmail.com
Fri Jul 19 18:24:01 EDT 2013


Hi all,

Sorry I couldn't make the meeting today.  Here is my update:

This week, I wrote Primitive objects for the 'repeat' and 'start' block.
 And I finally implemented the actual python export functionality.  That
is, I added a module similar to the one for the Logo export tool.  It takes
a stack of blocks, extracts their primitives and converts them into ASTs.
 Then it glues the ASTs together in the same way the blocks were combined.
 E.g., argument blocks become argument ASTs etc.  Finally, it uses codegen
to transform the ASTs into python code.
I decided to use the 'codegen' module, since it lets me get the python code
as a string.  (The 'unparse' module would write it directly to a file.)  I
also added a menu item for the python export tool to the GNOME version of
TA.
I can now export a little block program that draws a square.  Though, the
exported code doesn't work yet, since I haven't yet implemented special
handling of loops.  (At the moment, a loop is just a call to a loop
function.)  That's a task for next week.

If you want to take a look at my work, it's in the branch primitive-class of
https://git.sugarlabs.org/~mzepf/gsoc-python-export

Feedback and comments are welcome!

Marion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/gsoc/attachments/20130720/79e9b3be/attachment.html>


More information about the GSoC mailing list