<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sugarlabs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Marion+Zepf</id>
	<title>Sugar Labs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sugarlabs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Marion+Zepf"/>
	<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/go/Special:Contributions/Marion_Zepf"/>
	<updated>2026-05-13T12:09:48Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89844</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89844"/>
		<updated>2013-10-07T18:18:06Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: highlight link to final report&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and [http://wiki.laptop.org/go/User:Claudia_Urrea Claudia Urrea].&lt;br /&gt;
&lt;br /&gt;
The summer is over, so I have written a &#039;&#039;&#039;[[Media:Final_Report_on_Turtle_Blocks_Python_export.pdf|final report]]&#039;&#039;&#039; on my project. It gives an overview of the task, my ideas and their implementation, as well as the final status of the project.&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
=== gsoc-python-export on gitorious ===&lt;br /&gt;
&lt;br /&gt;
I develop my project in a repository called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] in the SugarLabs Gitorious system. If you would like to have a look at my latest progress, check out the &amp;lt;code&amp;gt;primitive-class&amp;lt;/code&amp;gt; branch. It contains the latest &#039;&#039;&#039;stable&#039;&#039;&#039;, i.e. working, version of TurtleArt and the export tool.&lt;br /&gt;
&lt;br /&gt;
The branch &amp;lt;code&amp;gt;type-system&amp;lt;/code&amp;gt; contains some work-in-progress on the type system for &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects that I am currently introducing. It&#039;s a major change that affects how blocks are executed and exported to ASTs. Therefore, this branch should be considered &#039;&#039;&#039;unstable&#039;&#039;&#039;, i.e. there is no guarantee that things will work or even that you&#039;ll get useful error messages. As soon as the type system is fully established and everything works again, this branch will be merged back into &amp;lt;code&amp;gt;primitive-class&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt; branch is only used for submitting merge requests to [https://git.sugarlabs.org/turtleart/mainline the main TurtleArt repository].&lt;br /&gt;
&lt;br /&gt;
=== ta-python-export-dev on github ===&lt;br /&gt;
&lt;br /&gt;
Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub. There, the &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt; branch is the most recent one.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline is being modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;setxy&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
** July 1 – July 5 (1 week): Test the two Python code generators for suitability for my project. Develop a concept of how the blocks know what Python code they will be transformed into.&lt;br /&gt;
** July 6 – July 12 (1 week): Replace previous implementation of primitives (the backend of the blocks) with a class whose instances can be called to execute the block, or be transformed to a Python AST (class &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;). Use the class in TA and make sure calling instances works. Add &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects for the first five blocks and the &#039;repeat&#039; block.&lt;br /&gt;
** July 13 – July 21 (1 week): Work on transforming &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects to Python ASTs. Implement special handling for loop blocks when transforming them to ASTs. The sample program basics-square.ta can now be exported to python code.&lt;br /&gt;
* July 22 – July 28 (1 week): Introduce constant arguments to &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;forever&#039; block.&lt;br /&gt;
* July 29 – August 2: The exported Python code now uses TurtleArt&#039;s internal execution engine. This makes infinite loops executable and enables the user to watch the program run. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;clean&#039; block. Implement nice error handling when exporting a project and when running the exported code.&lt;br /&gt;
* Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to a few blocks (those that have a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object), but it can easily be extended to cover the rest.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** The complete &#039;Pen&#039; palette&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** The rest of the loops from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** Conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** The complete &#039;Pen colors&#039; palette&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette&lt;br /&gt;
*** Action stacks (functions) from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Write a tutorial on how to define a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; for a new block, so other TA (plugin) developers can make their blocks exportable.&lt;br /&gt;
*** Introduce strong typing to &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;s.&lt;br /&gt;
*** Pass argument blocks to the functor as &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects, not as ASTs or return values of a function call.&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Introduce disjunctions of &amp;lt;code&amp;gt;Type&amp;lt;/code&amp;gt;s, &amp;lt;code&amp;gt;ArgSlot&amp;lt;/code&amp;gt;s, argument lists, and &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;s.&lt;br /&gt;
*** Adjust the export functionality to the type system.&lt;br /&gt;
*** Start re-writing &#039;old&#039; &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;s to make use of the new type system.&lt;br /&gt;
*** Write new documentation about how to create a new block, including creating new &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;s.&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Screen dimensions from the &#039;Presentation templates&#039; palette&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** Heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;br /&gt;
* Code in named stacks will be put into functions with the same name. Blocks appended to the &#039;start&#039; block will be put into a function called &amp;lt;code&amp;gt;start()&amp;lt;/code&amp;gt;. Unnamed stacks will also be put into extra functions with auto-generated names (e.g., &amp;lt;code&amp;gt;unnamed_stack_1()&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Run only the block stack that has a &#039;start&#039; block at the top. If there is no &#039;start&#039; block, notify the user, but don&#039;t execute unnamed stacks. (TA itself should show the same behavior.)&lt;br /&gt;
* Assume the generated code will be run in GNOME, but keep the &amp;lt;code&amp;gt;running_sugar&amp;lt;/code&amp;gt; flag, so it can be ported to Sugar later.&lt;br /&gt;
* The path to the TA installation must be in the environment variable &amp;lt;code&amp;gt;PYTHONPATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Boxes and actions are stored in a dictionary in order to allow for arbitrary names (e.g., names that start with a number or names that are read from the content of a box).&lt;br /&gt;
* All blocks (including the ones introduced by plugins) reference a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object, which can be called to execute the block in TA, or transformed into a Python AST.&lt;br /&gt;
** Type conversion and other modification of the arguments of a block is done by &#039;&#039;slot wrappers&#039;&#039;. A slot wrapper is a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; that is attached to the argument of another &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;. Slot wrappers are called/ transformed before the &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; itself.&lt;br /&gt;
* The status bar may be shown when the exported code is run, as is necessary and appropriate during execution.&lt;br /&gt;
&lt;br /&gt;
=== Pending ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have yet to be decided:&lt;br /&gt;
&lt;br /&gt;
=== Deferred ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have not yet been decided, but are being deferred due to their low priority:&lt;br /&gt;
&lt;br /&gt;
* Enable the user to control the speed of execution (e.g., by setting a global &amp;lt;code&amp;gt;step_time&amp;lt;/code&amp;gt;)?&lt;br /&gt;
** How to implement this? E.g., call a &amp;lt;code&amp;gt;wait(step_time)&amp;lt;/code&amp;gt; function in between two steps?&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89843</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89843"/>
		<updated>2013-10-07T18:15:33Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: fix link to final report&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and [http://wiki.laptop.org/go/User:Claudia_Urrea Claudia Urrea].&lt;br /&gt;
&lt;br /&gt;
The summer is over, so I have written a [[Media:Final_Report_on_Turtle_Blocks_Python_export.pdf|final report]] on my project. It gives an overview of the task, my ideas and their implementation, as well as the final status of the project.&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
=== gsoc-python-export on gitorious ===&lt;br /&gt;
&lt;br /&gt;
I develop my project in a repository called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] in the SugarLabs Gitorious system. If you would like to have a look at my latest progress, check out the &amp;lt;code&amp;gt;primitive-class&amp;lt;/code&amp;gt; branch. It contains the latest &#039;&#039;&#039;stable&#039;&#039;&#039;, i.e. working, version of TurtleArt and the export tool.&lt;br /&gt;
&lt;br /&gt;
The branch &amp;lt;code&amp;gt;type-system&amp;lt;/code&amp;gt; contains some work-in-progress on the type system for &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects that I am currently introducing. It&#039;s a major change that affects how blocks are executed and exported to ASTs. Therefore, this branch should be considered &#039;&#039;&#039;unstable&#039;&#039;&#039;, i.e. there is no guarantee that things will work or even that you&#039;ll get useful error messages. As soon as the type system is fully established and everything works again, this branch will be merged back into &amp;lt;code&amp;gt;primitive-class&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt; branch is only used for submitting merge requests to [https://git.sugarlabs.org/turtleart/mainline the main TurtleArt repository].&lt;br /&gt;
&lt;br /&gt;
=== ta-python-export-dev on github ===&lt;br /&gt;
&lt;br /&gt;
Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub. There, the &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt; branch is the most recent one.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline is being modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;setxy&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
** July 1 – July 5 (1 week): Test the two Python code generators for suitability for my project. Develop a concept of how the blocks know what Python code they will be transformed into.&lt;br /&gt;
** July 6 – July 12 (1 week): Replace previous implementation of primitives (the backend of the blocks) with a class whose instances can be called to execute the block, or be transformed to a Python AST (class &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;). Use the class in TA and make sure calling instances works. Add &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects for the first five blocks and the &#039;repeat&#039; block.&lt;br /&gt;
** July 13 – July 21 (1 week): Work on transforming &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects to Python ASTs. Implement special handling for loop blocks when transforming them to ASTs. The sample program basics-square.ta can now be exported to python code.&lt;br /&gt;
* July 22 – July 28 (1 week): Introduce constant arguments to &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;forever&#039; block.&lt;br /&gt;
* July 29 – August 2: The exported Python code now uses TurtleArt&#039;s internal execution engine. This makes infinite loops executable and enables the user to watch the program run. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;clean&#039; block. Implement nice error handling when exporting a project and when running the exported code.&lt;br /&gt;
* Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to a few blocks (those that have a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object), but it can easily be extended to cover the rest.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** The complete &#039;Pen&#039; palette&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** The rest of the loops from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** Conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** The complete &#039;Pen colors&#039; palette&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette&lt;br /&gt;
*** Action stacks (functions) from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Write a tutorial on how to define a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; for a new block, so other TA (plugin) developers can make their blocks exportable.&lt;br /&gt;
*** Introduce strong typing to &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;s.&lt;br /&gt;
*** Pass argument blocks to the functor as &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects, not as ASTs or return values of a function call.&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Introduce disjunctions of &amp;lt;code&amp;gt;Type&amp;lt;/code&amp;gt;s, &amp;lt;code&amp;gt;ArgSlot&amp;lt;/code&amp;gt;s, argument lists, and &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;s.&lt;br /&gt;
*** Adjust the export functionality to the type system.&lt;br /&gt;
*** Start re-writing &#039;old&#039; &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;s to make use of the new type system.&lt;br /&gt;
*** Write new documentation about how to create a new block, including creating new &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;s.&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Screen dimensions from the &#039;Presentation templates&#039; palette&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** Heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;br /&gt;
* Code in named stacks will be put into functions with the same name. Blocks appended to the &#039;start&#039; block will be put into a function called &amp;lt;code&amp;gt;start()&amp;lt;/code&amp;gt;. Unnamed stacks will also be put into extra functions with auto-generated names (e.g., &amp;lt;code&amp;gt;unnamed_stack_1()&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Run only the block stack that has a &#039;start&#039; block at the top. If there is no &#039;start&#039; block, notify the user, but don&#039;t execute unnamed stacks. (TA itself should show the same behavior.)&lt;br /&gt;
* Assume the generated code will be run in GNOME, but keep the &amp;lt;code&amp;gt;running_sugar&amp;lt;/code&amp;gt; flag, so it can be ported to Sugar later.&lt;br /&gt;
* The path to the TA installation must be in the environment variable &amp;lt;code&amp;gt;PYTHONPATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Boxes and actions are stored in a dictionary in order to allow for arbitrary names (e.g., names that start with a number or names that are read from the content of a box).&lt;br /&gt;
* All blocks (including the ones introduced by plugins) reference a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object, which can be called to execute the block in TA, or transformed into a Python AST.&lt;br /&gt;
** Type conversion and other modification of the arguments of a block is done by &#039;&#039;slot wrappers&#039;&#039;. A slot wrapper is a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; that is attached to the argument of another &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;. Slot wrappers are called/ transformed before the &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; itself.&lt;br /&gt;
* The status bar may be shown when the exported code is run, as is necessary and appropriate during execution.&lt;br /&gt;
&lt;br /&gt;
=== Pending ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have yet to be decided:&lt;br /&gt;
&lt;br /&gt;
=== Deferred ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have not yet been decided, but are being deferred due to their low priority:&lt;br /&gt;
&lt;br /&gt;
* Enable the user to control the speed of execution (e.g., by setting a global &amp;lt;code&amp;gt;step_time&amp;lt;/code&amp;gt;)?&lt;br /&gt;
** How to implement this? E.g., call a &amp;lt;code&amp;gt;wait(step_time)&amp;lt;/code&amp;gt; function in between two steps?&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89842</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89842"/>
		<updated>2013-10-07T18:14:28Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: link to final report&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and [http://wiki.laptop.org/go/User:Claudia_Urrea Claudia Urrea].&lt;br /&gt;
&lt;br /&gt;
The summer is over, so I have written a [[File:Final_Report_on_Turtle_Blocks_Python_export.pdf|final report]] on my project. It gives an overview of the task, my ideas and their implementation, as well as the final status of the project.&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
=== gsoc-python-export on gitorious ===&lt;br /&gt;
&lt;br /&gt;
I develop my project in a repository called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] in the SugarLabs Gitorious system. If you would like to have a look at my latest progress, check out the &amp;lt;code&amp;gt;primitive-class&amp;lt;/code&amp;gt; branch. It contains the latest &#039;&#039;&#039;stable&#039;&#039;&#039;, i.e. working, version of TurtleArt and the export tool.&lt;br /&gt;
&lt;br /&gt;
The branch &amp;lt;code&amp;gt;type-system&amp;lt;/code&amp;gt; contains some work-in-progress on the type system for &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects that I am currently introducing. It&#039;s a major change that affects how blocks are executed and exported to ASTs. Therefore, this branch should be considered &#039;&#039;&#039;unstable&#039;&#039;&#039;, i.e. there is no guarantee that things will work or even that you&#039;ll get useful error messages. As soon as the type system is fully established and everything works again, this branch will be merged back into &amp;lt;code&amp;gt;primitive-class&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt; branch is only used for submitting merge requests to [https://git.sugarlabs.org/turtleart/mainline the main TurtleArt repository].&lt;br /&gt;
&lt;br /&gt;
=== ta-python-export-dev on github ===&lt;br /&gt;
&lt;br /&gt;
Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub. There, the &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt; branch is the most recent one.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline is being modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;setxy&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
** July 1 – July 5 (1 week): Test the two Python code generators for suitability for my project. Develop a concept of how the blocks know what Python code they will be transformed into.&lt;br /&gt;
** July 6 – July 12 (1 week): Replace previous implementation of primitives (the backend of the blocks) with a class whose instances can be called to execute the block, or be transformed to a Python AST (class &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;). Use the class in TA and make sure calling instances works. Add &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects for the first five blocks and the &#039;repeat&#039; block.&lt;br /&gt;
** July 13 – July 21 (1 week): Work on transforming &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects to Python ASTs. Implement special handling for loop blocks when transforming them to ASTs. The sample program basics-square.ta can now be exported to python code.&lt;br /&gt;
* July 22 – July 28 (1 week): Introduce constant arguments to &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;forever&#039; block.&lt;br /&gt;
* July 29 – August 2: The exported Python code now uses TurtleArt&#039;s internal execution engine. This makes infinite loops executable and enables the user to watch the program run. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;clean&#039; block. Implement nice error handling when exporting a project and when running the exported code.&lt;br /&gt;
* Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to a few blocks (those that have a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object), but it can easily be extended to cover the rest.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** The complete &#039;Pen&#039; palette&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** The rest of the loops from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** Conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** The complete &#039;Pen colors&#039; palette&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette&lt;br /&gt;
*** Action stacks (functions) from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Write a tutorial on how to define a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; for a new block, so other TA (plugin) developers can make their blocks exportable.&lt;br /&gt;
*** Introduce strong typing to &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;s.&lt;br /&gt;
*** Pass argument blocks to the functor as &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects, not as ASTs or return values of a function call.&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Introduce disjunctions of &amp;lt;code&amp;gt;Type&amp;lt;/code&amp;gt;s, &amp;lt;code&amp;gt;ArgSlot&amp;lt;/code&amp;gt;s, argument lists, and &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;s.&lt;br /&gt;
*** Adjust the export functionality to the type system.&lt;br /&gt;
*** Start re-writing &#039;old&#039; &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;s to make use of the new type system.&lt;br /&gt;
*** Write new documentation about how to create a new block, including creating new &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;s.&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Screen dimensions from the &#039;Presentation templates&#039; palette&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** Heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;br /&gt;
* Code in named stacks will be put into functions with the same name. Blocks appended to the &#039;start&#039; block will be put into a function called &amp;lt;code&amp;gt;start()&amp;lt;/code&amp;gt;. Unnamed stacks will also be put into extra functions with auto-generated names (e.g., &amp;lt;code&amp;gt;unnamed_stack_1()&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Run only the block stack that has a &#039;start&#039; block at the top. If there is no &#039;start&#039; block, notify the user, but don&#039;t execute unnamed stacks. (TA itself should show the same behavior.)&lt;br /&gt;
* Assume the generated code will be run in GNOME, but keep the &amp;lt;code&amp;gt;running_sugar&amp;lt;/code&amp;gt; flag, so it can be ported to Sugar later.&lt;br /&gt;
* The path to the TA installation must be in the environment variable &amp;lt;code&amp;gt;PYTHONPATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Boxes and actions are stored in a dictionary in order to allow for arbitrary names (e.g., names that start with a number or names that are read from the content of a box).&lt;br /&gt;
* All blocks (including the ones introduced by plugins) reference a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object, which can be called to execute the block in TA, or transformed into a Python AST.&lt;br /&gt;
** Type conversion and other modification of the arguments of a block is done by &#039;&#039;slot wrappers&#039;&#039;. A slot wrapper is a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; that is attached to the argument of another &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;. Slot wrappers are called/ transformed before the &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; itself.&lt;br /&gt;
* The status bar may be shown when the exported code is run, as is necessary and appropriate during execution.&lt;br /&gt;
&lt;br /&gt;
=== Pending ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have yet to be decided:&lt;br /&gt;
&lt;br /&gt;
=== Deferred ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have not yet been decided, but are being deferred due to their low priority:&lt;br /&gt;
&lt;br /&gt;
* Enable the user to control the speed of execution (e.g., by setting a global &amp;lt;code&amp;gt;step_time&amp;lt;/code&amp;gt;)?&lt;br /&gt;
** How to implement this? E.g., call a &amp;lt;code&amp;gt;wait(step_time)&amp;lt;/code&amp;gt; function in between two steps?&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=File:Final_Report_on_Turtle_Blocks_Python_export.pdf&amp;diff=89841</id>
		<title>File:Final Report on Turtle Blocks Python export.pdf</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=File:Final_Report_on_Turtle_Blocks_Python_export.pdf&amp;diff=89841"/>
		<updated>2013-10-07T17:09:36Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: Final report on the GSoC project &amp;quot;Turtle Blocks Python Export&amp;quot; by Marion Zepf&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Final report on the GSoC project &amp;quot;Turtle Blocks Python Export&amp;quot; by Marion Zepf&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89746</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89746"/>
		<updated>2013-09-24T13:15:34Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: update timeline&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and [http://wiki.laptop.org/go/User:Claudia_Urrea Claudia Urrea].&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
=== gsoc-python-export on gitorious ===&lt;br /&gt;
&lt;br /&gt;
I develop my project in a repository called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] in the SugarLabs Gitorious system. If you would like to have a look at my latest progress, check out the &amp;lt;code&amp;gt;primitive-class&amp;lt;/code&amp;gt; branch. It contains the latest &#039;&#039;&#039;stable&#039;&#039;&#039;, i.e. working, version of TurtleArt and the export tool.&lt;br /&gt;
&lt;br /&gt;
The branch &amp;lt;code&amp;gt;type-system&amp;lt;/code&amp;gt; contains some work-in-progress on the type system for &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects that I am currently introducing. It&#039;s a major change that affects how blocks are executed and exported to ASTs. Therefore, this branch should be considered &#039;&#039;&#039;unstable&#039;&#039;&#039;, i.e. there is no guarantee that things will work or even that you&#039;ll get useful error messages. As soon as the type system is fully established and everything works again, this branch will be merged back into &amp;lt;code&amp;gt;primitive-class&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt; branch is only used for submitting merge requests to [https://git.sugarlabs.org/turtleart/mainline the main TurtleArt repository].&lt;br /&gt;
&lt;br /&gt;
=== ta-python-export-dev on github ===&lt;br /&gt;
&lt;br /&gt;
Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub. There, the &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt; branch is the most recent one.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline is being modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;setxy&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
** July 1 – July 5 (1 week): Test the two Python code generators for suitability for my project. Develop a concept of how the blocks know what Python code they will be transformed into.&lt;br /&gt;
** July 6 – July 12 (1 week): Replace previous implementation of primitives (the backend of the blocks) with a class whose instances can be called to execute the block, or be transformed to a Python AST (class &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;). Use the class in TA and make sure calling instances works. Add &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects for the first five blocks and the &#039;repeat&#039; block.&lt;br /&gt;
** July 13 – July 21 (1 week): Work on transforming &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects to Python ASTs. Implement special handling for loop blocks when transforming them to ASTs. The sample program basics-square.ta can now be exported to python code.&lt;br /&gt;
* July 22 – July 28 (1 week): Introduce constant arguments to &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;forever&#039; block.&lt;br /&gt;
* July 29 – August 2: The exported Python code now uses TurtleArt&#039;s internal execution engine. This makes infinite loops executable and enables the user to watch the program run. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;clean&#039; block. Implement nice error handling when exporting a project and when running the exported code.&lt;br /&gt;
* Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to a few blocks (those that have a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object), but it can easily be extended to cover the rest.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** The complete &#039;Pen&#039; palette&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** The rest of the loops from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** Conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** The complete &#039;Pen colors&#039; palette&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette&lt;br /&gt;
*** Action stacks (functions) from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Write a tutorial on how to define a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; for a new block, so other TA (plugin) developers can make their blocks exportable.&lt;br /&gt;
*** Introduce strong typing to &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;s.&lt;br /&gt;
*** Pass argument blocks to the functor as &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects, not as ASTs or return values of a function call.&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Introduce disjunctions of &amp;lt;code&amp;gt;Type&amp;lt;/code&amp;gt;s, &amp;lt;code&amp;gt;ArgSlot&amp;lt;/code&amp;gt;s, argument lists, and &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;s.&lt;br /&gt;
*** Adjust the export functionality to the type system.&lt;br /&gt;
*** Start re-writing &#039;old&#039; &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;s to make use of the new type system.&lt;br /&gt;
*** Write new documentation about how to create a new block, including creating new &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;s.&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Screen dimensions from the &#039;Presentation templates&#039; palette&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** Heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;br /&gt;
* Code in named stacks will be put into functions with the same name. Blocks appended to the &#039;start&#039; block will be put into a function called &amp;lt;code&amp;gt;start()&amp;lt;/code&amp;gt;. Unnamed stacks will also be put into extra functions with auto-generated names (e.g., &amp;lt;code&amp;gt;unnamed_stack_1()&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Run only the block stack that has a &#039;start&#039; block at the top. If there is no &#039;start&#039; block, notify the user, but don&#039;t execute unnamed stacks. (TA itself should show the same behavior.)&lt;br /&gt;
* Assume the generated code will be run in GNOME, but keep the &amp;lt;code&amp;gt;running_sugar&amp;lt;/code&amp;gt; flag, so it can be ported to Sugar later.&lt;br /&gt;
* The path to the TA installation must be in the environment variable &amp;lt;code&amp;gt;PYTHONPATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Boxes and actions are stored in a dictionary in order to allow for arbitrary names (e.g., names that start with a number or names that are read from the content of a box).&lt;br /&gt;
* All blocks (including the ones introduced by plugins) reference a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object, which can be called to execute the block in TA, or transformed into a Python AST.&lt;br /&gt;
** Type conversion and other modification of the arguments of a block is done by &#039;&#039;slot wrappers&#039;&#039;. A slot wrapper is a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; that is attached to the argument of another &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;. Slot wrappers are called/ transformed before the &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; itself.&lt;br /&gt;
* The status bar may be shown when the exported code is run, as is necessary and appropriate during execution.&lt;br /&gt;
&lt;br /&gt;
=== Pending ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have yet to be decided:&lt;br /&gt;
&lt;br /&gt;
=== Deferred ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have not yet been decided, but are being deferred due to their low priority:&lt;br /&gt;
&lt;br /&gt;
* Enable the user to control the speed of execution (e.g., by setting a global &amp;lt;code&amp;gt;step_time&amp;lt;/code&amp;gt;)?&lt;br /&gt;
** How to implement this? E.g., call a &amp;lt;code&amp;gt;wait(step_time)&amp;lt;/code&amp;gt; function in between two steps?&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89553</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89553"/>
		<updated>2013-08-23T15:15:13Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: remove the footnotes in the timeline&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and [http://wiki.laptop.org/go/User:Claudia_Urrea Claudia Urrea].&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
=== gsoc-python-export on gitorious ===&lt;br /&gt;
&lt;br /&gt;
I develop my project in a repository called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] in the SugarLabs Gitorious system. If you would like to have a look at my latest progress, check out the &amp;lt;code&amp;gt;primitive-class&amp;lt;/code&amp;gt; branch. It contains the latest &#039;&#039;&#039;stable&#039;&#039;&#039;, i.e. working, version of TurtleArt and the export tool.&lt;br /&gt;
&lt;br /&gt;
The branch &amp;lt;code&amp;gt;type-system&amp;lt;/code&amp;gt; contains some work-in-progress on the type system for &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects that I am currently introducing. It&#039;s a major change that affects how blocks are executed and exported to ASTs. Therefore, this branch should be considered &#039;&#039;&#039;unstable&#039;&#039;&#039;, i.e. there is no guarantee that things will work or even that you&#039;ll get useful error messages. As soon as the type system is fully established and everything works again, this branch will be merged back into &amp;lt;code&amp;gt;primitive-class&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt; branch is only used for submitting merge requests to [https://git.sugarlabs.org/turtleart/mainline the main TurtleArt repository].&lt;br /&gt;
&lt;br /&gt;
=== ta-python-export-dev on github ===&lt;br /&gt;
&lt;br /&gt;
Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub. There, the &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt; branch is the most recent one.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline is being modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;setxy&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
** July 1 – July 5 (1 week): Test the two Python code generators for suitability for my project. Develop a concept of how the blocks know what Python code they will be transformed into.&lt;br /&gt;
** July 6 – July 12 (1 week): Replace previous implementation of primitives (the backend of the blocks) with a class whose instances can be called to execute the block, or be transformed to a Python AST (class &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;). Use the class in TA and make sure calling instances works. Add &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects for the first five blocks and the &#039;repeat&#039; block.&lt;br /&gt;
** July 13 – July 21 (1 week): Work on transforming &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects to Python ASTs. Implement special handling for loop blocks when transforming them to ASTs. The sample program basics-square.ta can now be exported to python code.&lt;br /&gt;
* July 22 – July 28 (1 week): Introduce constant arguments to &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;forever&#039; block.&lt;br /&gt;
* July 29 – August 2: The exported Python code now uses TurtleArt&#039;s internal execution engine. This makes infinite loops executable and enables the user to watch the program run. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;clean&#039; block. Implement nice error handling when exporting a project and when running the exported code.&lt;br /&gt;
* Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to a few blocks (those that have a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object), but it can easily be extended to cover the rest.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** The complete &#039;Pen&#039; palette&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** The rest of the loops from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** Conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** The complete &#039;Pen colors&#039; palette&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette&lt;br /&gt;
*** Action stacks (functions) from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Write a tutorial on how to define a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; for a new block, so other TA (plugin) developers can make their blocks exportable.&lt;br /&gt;
*** Introduce strong typing to &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;s.&lt;br /&gt;
*** Pass argument blocks to the functor as &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects, not as ASTs or return values of a function call.&lt;br /&gt;
*** Screen dimensions from the &#039;Presentation templates&#039; palette&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette&lt;br /&gt;
*** Presentation templates from the &#039;Presentation templates&#039; palette&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette&lt;br /&gt;
*** Printing and loading blocks and palettes from the &#039;Extra options&#039; palette&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;br /&gt;
* Code in named stacks will be put into functions with the same name. Blocks appended to the &#039;start&#039; block will be put into a function called &amp;lt;code&amp;gt;start()&amp;lt;/code&amp;gt;. Unnamed stacks will also be put into extra functions with auto-generated names (e.g., &amp;lt;code&amp;gt;unnamed_stack_1()&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Run only the block stack that has a &#039;start&#039; block at the top. If there is no &#039;start&#039; block, notify the user, but don&#039;t execute unnamed stacks. (TA itself should show the same behavior.)&lt;br /&gt;
* Assume the generated code will be run in GNOME, but keep the &amp;lt;code&amp;gt;running_sugar&amp;lt;/code&amp;gt; flag, so it can be ported to Sugar later.&lt;br /&gt;
* The path to the TA installation must be in the environment variable &amp;lt;code&amp;gt;PYTHONPATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Boxes and actions are stored in a dictionary in order to allow for arbitrary names (e.g., names that start with a number or names that are read from the content of a box).&lt;br /&gt;
* All blocks (including the ones introduced by plugins) reference a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object, which can be called to execute the block in TA, or transformed into a Python AST.&lt;br /&gt;
** Type conversion and other modification of the arguments of a block is done by &#039;&#039;slot wrappers&#039;&#039;. A slot wrapper is a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; that is attached to the argument of another &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;. Slot wrappers are called/ transformed before the &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; itself.&lt;br /&gt;
* The status bar may be shown when the exported code is run, as is necessary and appropriate during execution.&lt;br /&gt;
&lt;br /&gt;
=== Pending ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have yet to be decided:&lt;br /&gt;
&lt;br /&gt;
=== Deferred ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have not yet been decided, but are being deferred due to their low priority:&lt;br /&gt;
&lt;br /&gt;
* Enable the user to control the speed of execution (e.g., by setting a global &amp;lt;code&amp;gt;step_time&amp;lt;/code&amp;gt;)?&lt;br /&gt;
** How to implement this? E.g., call a &amp;lt;code&amp;gt;wait(step_time)&amp;lt;/code&amp;gt; function in between two steps?&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89552</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89552"/>
		<updated>2013-08-23T15:12:49Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: describe the type-system branch in the gitorious repo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and [http://wiki.laptop.org/go/User:Claudia_Urrea Claudia Urrea].&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
=== gsoc-python-export on gitorious ===&lt;br /&gt;
&lt;br /&gt;
I develop my project in a repository called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] in the SugarLabs Gitorious system. If you would like to have a look at my latest progress, check out the &amp;lt;code&amp;gt;primitive-class&amp;lt;/code&amp;gt; branch. It contains the latest &#039;&#039;&#039;stable&#039;&#039;&#039;, i.e. working, version of TurtleArt and the export tool.&lt;br /&gt;
&lt;br /&gt;
The branch &amp;lt;code&amp;gt;type-system&amp;lt;/code&amp;gt; contains some work-in-progress on the type system for &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects that I am currently introducing. It&#039;s a major change that affects how blocks are executed and exported to ASTs. Therefore, this branch should be considered &#039;&#039;&#039;unstable&#039;&#039;&#039;, i.e. there is no guarantee that things will work or even that you&#039;ll get useful error messages. As soon as the type system is fully established and everything works again, this branch will be merged back into &amp;lt;code&amp;gt;primitive-class&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt; branch is only used for submitting merge requests to [https://git.sugarlabs.org/turtleart/mainline the main TurtleArt repository].&lt;br /&gt;
&lt;br /&gt;
=== ta-python-export-dev on github ===&lt;br /&gt;
&lt;br /&gt;
Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub. There, the &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt; branch is the most recent one.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline is being modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;setxy&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
** July 1 – July 5 (1 week): Test the two Python code generators for suitability for my project. Develop a concept of how the blocks know what Python code they will be transformed into.&lt;br /&gt;
** July 6 – July 12 (1 week): Replace previous implementation of primitives (the backend of the blocks) with a class whose instances can be called to execute the block, or be transformed to a Python AST (class &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;). Use the class in TA and make sure calling instances works. Add &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects for the first five blocks and the &#039;repeat&#039; block.&lt;br /&gt;
** July 13 – July 21 (1 week): Work on transforming &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects to Python ASTs. Implement special handling for loop blocks when transforming them to ASTs. The sample program basics-square.ta can now be exported to python code.&lt;br /&gt;
* July 22 – July 28 (1 week): Introduce constant arguments to &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;forever&#039; block.&lt;br /&gt;
* July 29 – August 2: The exported Python code now uses TurtleArt&#039;s internal execution engine. This makes infinite loops executable and enables the user to watch the program run. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;clean&#039; block. Implement nice error handling when exporting a project and when running the exported code.&lt;br /&gt;
* Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to a few blocks (those that have a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object), but it can easily be extended to cover the rest.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** The complete &#039;Pen&#039; palette&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** The rest of the loops from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** Conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** The complete &#039;Pen colors&#039; palette&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette&lt;br /&gt;
*** Action stacks (functions) from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Write a tutorial on how to define a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; for a new block, so other TA (plugin) developers can make their blocks exportable.&lt;br /&gt;
*** Introduce strong typing to &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;s.&lt;br /&gt;
*** Pass argument blocks to the functor as &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects, not as ASTs or return values of a function call.&lt;br /&gt;
*** Screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette&lt;br /&gt;
*** Presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette&lt;br /&gt;
*** Printing and loading blocks and palettes from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;br /&gt;
* Code in named stacks will be put into functions with the same name. Blocks appended to the &#039;start&#039; block will be put into a function called &amp;lt;code&amp;gt;start()&amp;lt;/code&amp;gt;. Unnamed stacks will also be put into extra functions with auto-generated names (e.g., &amp;lt;code&amp;gt;unnamed_stack_1()&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Run only the block stack that has a &#039;start&#039; block at the top. If there is no &#039;start&#039; block, notify the user, but don&#039;t execute unnamed stacks. (TA itself should show the same behavior.)&lt;br /&gt;
* Assume the generated code will be run in GNOME, but keep the &amp;lt;code&amp;gt;running_sugar&amp;lt;/code&amp;gt; flag, so it can be ported to Sugar later.&lt;br /&gt;
* The path to the TA installation must be in the environment variable &amp;lt;code&amp;gt;PYTHONPATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Boxes and actions are stored in a dictionary in order to allow for arbitrary names (e.g., names that start with a number or names that are read from the content of a box).&lt;br /&gt;
* All blocks (including the ones introduced by plugins) reference a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object, which can be called to execute the block in TA, or transformed into a Python AST.&lt;br /&gt;
** Type conversion and other modification of the arguments of a block is done by &#039;&#039;slot wrappers&#039;&#039;. A slot wrapper is a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; that is attached to the argument of another &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;. Slot wrappers are called/ transformed before the &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; itself.&lt;br /&gt;
* The status bar may be shown when the exported code is run, as is necessary and appropriate during execution.&lt;br /&gt;
&lt;br /&gt;
=== Pending ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have yet to be decided:&lt;br /&gt;
&lt;br /&gt;
=== Deferred ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have not yet been decided, but are being deferred due to their low priority:&lt;br /&gt;
&lt;br /&gt;
* Enable the user to control the speed of execution (e.g., by setting a global &amp;lt;code&amp;gt;step_time&amp;lt;/code&amp;gt;)?&lt;br /&gt;
** How to implement this? E.g., call a &amp;lt;code&amp;gt;wait(step_time)&amp;lt;/code&amp;gt; function in between two steps?&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89522</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89522"/>
		<updated>2013-08-18T11:57:59Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: explain branches in the two repositories&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and [http://wiki.laptop.org/go/User:Claudia_Urrea Claudia Urrea].&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
I develop my project in a repository called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] in the SugarLabs Gitorious system. If you would like to have a look at my latest progress, check out the &amp;lt;code&amp;gt;primitive-class&amp;lt;/code&amp;gt; branch. (The &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt; branch is only used for submitting merge requests to [https://git.sugarlabs.org/turtleart/mainline the main TurtleArt repository].)&lt;br /&gt;
&lt;br /&gt;
Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub. There, the &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt; branch is the most recent one.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline is being modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;setxy&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
** July 1 – July 5 (1 week): Test the two Python code generators for suitability for my project. Develop a concept of how the blocks know what Python code they will be transformed into.&lt;br /&gt;
** July 6 – July 12 (1 week): Replace previous implementation of primitives (the backend of the blocks) with a class whose instances can be called to execute the block, or be transformed to a Python AST (class &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;). Use the class in TA and make sure calling instances works. Add &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects for the first five blocks and the &#039;repeat&#039; block.&lt;br /&gt;
** July 13 – July 21 (1 week): Work on transforming &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects to Python ASTs. Implement special handling for loop blocks when transforming them to ASTs. The sample program basics-square.ta can now be exported to python code.&lt;br /&gt;
* July 22 – July 28 (1 week): Introduce constant arguments to &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;forever&#039; block.&lt;br /&gt;
* July 29 – August 2: The exported Python code now uses TurtleArt&#039;s internal execution engine. This makes infinite loops executable and enables the user to watch the program run. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;clean&#039; block. Implement nice error handling when exporting a project and when running the exported code.&lt;br /&gt;
* Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to a few blocks (those that have a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object), but it can easily be extended to cover the rest.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** The complete &#039;Pen&#039; palette&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** The rest of the loops from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** Conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** The complete &#039;Pen colors&#039; palette&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette&lt;br /&gt;
*** Action stacks (functions) from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Write a tutorial on how to define a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; for a new block, so other TA (plugin) developers can make their blocks exportable.&lt;br /&gt;
*** Introduce strong typing to &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;s.&lt;br /&gt;
*** Pass argument blocks to the functor as &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects, not as ASTs or return values of a function call.&lt;br /&gt;
*** Screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette&lt;br /&gt;
*** Presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette&lt;br /&gt;
*** Printing and loading blocks and palettes from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;br /&gt;
* Code in named stacks will be put into functions with the same name. Blocks appended to the &#039;start&#039; block will be put into a function called &amp;lt;code&amp;gt;start()&amp;lt;/code&amp;gt;. Unnamed stacks will also be put into extra functions with auto-generated names (e.g., &amp;lt;code&amp;gt;unnamed_stack_1()&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Run only the block stack that has a &#039;start&#039; block at the top. If there is no &#039;start&#039; block, notify the user, but don&#039;t execute unnamed stacks. (TA itself should show the same behavior.)&lt;br /&gt;
* Assume the generated code will be run in GNOME, but keep the &amp;lt;code&amp;gt;running_sugar&amp;lt;/code&amp;gt; flag, so it can be ported to Sugar later.&lt;br /&gt;
* The path to the TA installation must be in the environment variable &amp;lt;code&amp;gt;PYTHONPATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Boxes and actions are stored in a dictionary in order to allow for arbitrary names (e.g., names that start with a number or names that are read from the content of a box).&lt;br /&gt;
* All blocks (including the ones introduced by plugins) reference a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object, which can be called to execute the block in TA, or transformed into a Python AST.&lt;br /&gt;
** Type conversion and other modification of the arguments of a block is done by &#039;&#039;slot wrappers&#039;&#039;. A slot wrapper is a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; that is attached to the argument of another &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;. Slot wrappers are called/ transformed before the &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; itself.&lt;br /&gt;
* The status bar may be shown when the exported code is run, as is necessary and appropriate during execution.&lt;br /&gt;
&lt;br /&gt;
=== Pending ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have yet to be decided:&lt;br /&gt;
&lt;br /&gt;
=== Deferred ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have not yet been decided, but are being deferred due to their low priority:&lt;br /&gt;
&lt;br /&gt;
* Enable the user to control the speed of execution (e.g., by setting a global &amp;lt;code&amp;gt;step_time&amp;lt;/code&amp;gt;)?&lt;br /&gt;
** How to implement this? E.g., call a &amp;lt;code&amp;gt;wait(step_time)&amp;lt;/code&amp;gt; function in between two steps?&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89517</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89517"/>
		<updated>2013-08-16T14:46:52Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: timeline: squeeze in two new awesome ideas&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and [http://wiki.laptop.org/go/User:Claudia_Urrea Claudia Urrea].&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
I develop my project in a branch called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] on Gitorious. Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline will be modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;setxy&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
** July 1 – July 5 (1 week): Test the two Python code generators for suitability for my project. Develop a concept of how the blocks know what Python code they will be transformed into.&lt;br /&gt;
** July 6 – July 12 (1 week): Replace previous implementation of primitives (the backend of the blocks) with a class whose instances can be called to execute the block, or be transformed to a Python AST (class &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;). Use the class in TA and make sure calling instances works. Add &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects for the first five blocks and the &#039;repeat&#039; block.&lt;br /&gt;
** July 13 – July 21 (1 week): Work on transforming &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects to Python ASTs. Implement special handling for loop blocks when transforming them to ASTs. The sample program basics-square.ta can now be exported to python code.&lt;br /&gt;
* July 22 – July 28 (1 week): Introduce constant arguments to &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;forever&#039; block.&lt;br /&gt;
* July 29 – August 2: The exported Python code now uses TurtleArt&#039;s internal execution engine. This makes infinite loops executable and enables the user to watch the program run. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;clean&#039; block. Implement nice error handling when exporting a project and when running the exported code.&lt;br /&gt;
* Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to a few blocks (those that have a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object), but it can easily be extended to cover the rest.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** The complete &#039;Pen&#039; palette&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** The rest of the loops from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** Conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** The complete &#039;Pen colors&#039; palette&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette&lt;br /&gt;
*** Action stacks (functions) from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Write a tutorial on how to define a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; for a new block, so other TA (plugin) developers can make their blocks exportable.&lt;br /&gt;
*** Introduce strong typing to &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;s.&lt;br /&gt;
*** Pass argument blocks to the functor as &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects, not as ASTs or return values of a function call.&lt;br /&gt;
*** Screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette&lt;br /&gt;
*** Presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette&lt;br /&gt;
*** Printing and loading blocks and palettes from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;br /&gt;
* Code in named stacks will be put into functions with the same name. Blocks appended to the &#039;start&#039; block will be put into a function called &amp;lt;code&amp;gt;start()&amp;lt;/code&amp;gt;. Unnamed stacks will also be put into extra functions with auto-generated names (e.g., &amp;lt;code&amp;gt;unnamed_stack_1()&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Run only the block stack that has a &#039;start&#039; block at the top. If there is no &#039;start&#039; block, notify the user, but don&#039;t execute unnamed stacks. (TA itself should show the same behavior.)&lt;br /&gt;
* Assume the generated code will be run in GNOME, but keep the &amp;lt;code&amp;gt;running_sugar&amp;lt;/code&amp;gt; flag, so it can be ported to Sugar later.&lt;br /&gt;
* The path to the TA installation must be in the environment variable &amp;lt;code&amp;gt;PYTHONPATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Boxes and actions are stored in a dictionary in order to allow for arbitrary names (e.g., names that start with a number or names that are read from the content of a box).&lt;br /&gt;
* All blocks (including the ones introduced by plugins) reference a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object, which can be called to execute the block in TA, or transformed into a Python AST.&lt;br /&gt;
** Type conversion and other modification of the arguments of a block is done by &#039;&#039;slot wrappers&#039;&#039;. A slot wrapper is a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; that is attached to the argument of another &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;. Slot wrappers are called/ transformed before the &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; itself.&lt;br /&gt;
* The status bar may be shown when the exported code is run, as is necessary and appropriate during execution.&lt;br /&gt;
&lt;br /&gt;
=== Pending ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have yet to be decided:&lt;br /&gt;
&lt;br /&gt;
=== Deferred ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have not yet been decided, but are being deferred due to their low priority:&lt;br /&gt;
&lt;br /&gt;
* Enable the user to control the speed of execution (e.g., by setting a global &amp;lt;code&amp;gt;step_time&amp;lt;/code&amp;gt;)?&lt;br /&gt;
** How to implement this? E.g., call a &amp;lt;code&amp;gt;wait(step_time)&amp;lt;/code&amp;gt; function in between two steps?&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89512</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89512"/>
		<updated>2013-08-16T13:51:32Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: timeline: add tutorial on defining Prims; move external functions down a week&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and [http://wiki.laptop.org/go/User:Claudia_Urrea Claudia Urrea].&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
I develop my project in a branch called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] on Gitorious. Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline will be modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;setxy&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
** July 1 – July 5 (1 week): Test the two Python code generators for suitability for my project. Develop a concept of how the blocks know what Python code they will be transformed into.&lt;br /&gt;
** July 6 – July 12 (1 week): Replace previous implementation of primitives (the backend of the blocks) with a class whose instances can be called to execute the block, or be transformed to a Python AST (class &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;). Use the class in TA and make sure calling instances works. Add &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects for the first five blocks and the &#039;repeat&#039; block.&lt;br /&gt;
** July 13 – July 21 (1 week): Work on transforming &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects to Python ASTs. Implement special handling for loop blocks when transforming them to ASTs. The sample program basics-square.ta can now be exported to python code.&lt;br /&gt;
* July 22 – July 28 (1 week): Introduce constant arguments to &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;forever&#039; block.&lt;br /&gt;
* July 29 – August 2: The exported Python code now uses TurtleArt&#039;s internal execution engine. This makes infinite loops executable and enables the user to watch the program run. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;clean&#039; block. Implement nice error handling when exporting a project and when running the exported code.&lt;br /&gt;
* Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to a few blocks (those that have a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object), but it can easily be extended to cover the rest.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** The complete &#039;Pen&#039; palette&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** The rest of the loops from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** Conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** The complete &#039;Pen colors&#039; palette&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette&lt;br /&gt;
*** Action stacks (functions) from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Write a tutorial on how to define a Primitive for a new block, so other TA (plugin) developers can make their blocks exportable.&lt;br /&gt;
*** Screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette&lt;br /&gt;
*** Presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette&lt;br /&gt;
*** Printing and loading blocks and palettes from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;br /&gt;
* Code in named stacks will be put into functions with the same name. Blocks appended to the &#039;start&#039; block will be put into a function called &amp;lt;code&amp;gt;start()&amp;lt;/code&amp;gt;. Unnamed stacks will also be put into extra functions with auto-generated names (e.g., &amp;lt;code&amp;gt;unnamed_stack_1()&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Run only the block stack that has a &#039;start&#039; block at the top. If there is no &#039;start&#039; block, notify the user, but don&#039;t execute unnamed stacks. (TA itself should show the same behavior.)&lt;br /&gt;
* Assume the generated code will be run in GNOME, but keep the &amp;lt;code&amp;gt;running_sugar&amp;lt;/code&amp;gt; flag, so it can be ported to Sugar later.&lt;br /&gt;
* The path to the TA installation must be in the environment variable &amp;lt;code&amp;gt;PYTHONPATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Boxes and actions are stored in a dictionary in order to allow for arbitrary names (e.g., names that start with a number or names that are read from the content of a box).&lt;br /&gt;
* All blocks (including the ones introduced by plugins) reference a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object, which can be called to execute the block in TA, or transformed into a Python AST.&lt;br /&gt;
** Type conversion and other modification of the arguments of a block is done by &#039;&#039;slot wrappers&#039;&#039;. A slot wrapper is a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; that is attached to the argument of another &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;. Slot wrappers are called/ transformed before the &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; itself.&lt;br /&gt;
* The status bar may be shown when the exported code is run, as is necessary and appropriate during execution.&lt;br /&gt;
&lt;br /&gt;
=== Pending ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have yet to be decided:&lt;br /&gt;
&lt;br /&gt;
=== Deferred ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have not yet been decided, but are being deferred due to their low priority:&lt;br /&gt;
&lt;br /&gt;
* Enable the user to control the speed of execution (e.g., by setting a global &amp;lt;code&amp;gt;step_time&amp;lt;/code&amp;gt;)?&lt;br /&gt;
** How to implement this? E.g., call a &amp;lt;code&amp;gt;wait(step_time)&amp;lt;/code&amp;gt; function in between two steps?&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89394</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89394"/>
		<updated>2013-08-02T20:26:06Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: decision: show status bar when running exported code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and [http://wiki.laptop.org/go/User:Claudia_Urrea Claudia Urrea].&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
I develop my project in a branch called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] on Gitorious. Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline will be modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;setxy&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
** July 1 – July 5 (1 week): Test the two Python code generators for suitability for my project. Develop a concept of how the blocks know what Python code they will be transformed into.&lt;br /&gt;
** July 6 – July 12 (1 week): Replace previous implementation of primitives (the backend of the blocks) with a class whose instances can be called to execute the block, or be transformed to a Python AST (class &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;). Use the class in TA and make sure calling instances works. Add &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects for the first five blocks and the &#039;repeat&#039; block.&lt;br /&gt;
** July 13 – July 21 (1 week): Work on transforming &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects to Python ASTs. Implement special handling for loop blocks when transforming them to ASTs. The sample program basics-square.ta can now be exported to python code.&lt;br /&gt;
* July 22 – July 28 (1 week): Introduce constant arguments to &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;forever&#039; block.&lt;br /&gt;
* July 29 – August 2: The exported Python code now uses TurtleArt&#039;s internal execution engine. This makes infinite loops executable and enables the user to watch the program run. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;clean&#039; block. Implement nice error handling when exporting a project and when running the exported code.&lt;br /&gt;
* Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to a few blocks (those that have a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object), but it can easily be extended to cover the rest.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** The complete &#039;Pen&#039; palette&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** The rest of the loops from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** Conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** The complete &#039;Pen colors&#039; palette&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette&lt;br /&gt;
*** Action stacks (functions) from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette&lt;br /&gt;
*** Presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette&lt;br /&gt;
*** Printing and loading blocks and palettes from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;br /&gt;
* Code in named stacks will be put into functions with the same name. Blocks appended to the &#039;start&#039; block will be put into a function called &amp;lt;code&amp;gt;start()&amp;lt;/code&amp;gt;. Unnamed stacks will also be put into extra functions with auto-generated names (e.g., &amp;lt;code&amp;gt;unnamed_stack_1()&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Run only the block stack that has a &#039;start&#039; block at the top. If there is no &#039;start&#039; block, notify the user, but don&#039;t execute unnamed stacks. (TA itself should show the same behavior.)&lt;br /&gt;
* Assume the generated code will be run in GNOME, but keep the &amp;lt;code&amp;gt;running_sugar&amp;lt;/code&amp;gt; flag, so it can be ported to Sugar later.&lt;br /&gt;
* The path to the TA installation must be in the environment variable &amp;lt;code&amp;gt;PYTHONPATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Boxes and actions are stored in a dictionary in order to allow for arbitrary names (e.g., names that start with a number or names that are read from the content of a box).&lt;br /&gt;
* All blocks (including the ones introduced by plugins) reference a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object, which can be called to execute the block in TA, or transformed into a Python AST.&lt;br /&gt;
** Type conversion and other modification of the arguments of a block is done by &#039;&#039;slot wrappers&#039;&#039;. A slot wrapper is a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; that is attached to the argument of another &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;. Slot wrappers are called/ transformed before the &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; itself.&lt;br /&gt;
* The status bar may be shown when the exported code is run, as is necessary and appropriate during execution.&lt;br /&gt;
&lt;br /&gt;
=== Pending ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have yet to be decided:&lt;br /&gt;
&lt;br /&gt;
=== Deferred ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have not yet been decided, but are being deferred due to their low priority:&lt;br /&gt;
&lt;br /&gt;
* Enable the user to control the speed of execution (e.g., by setting a global &amp;lt;code&amp;gt;step_time&amp;lt;/code&amp;gt;)?&lt;br /&gt;
** How to implement this? E.g., call a &amp;lt;code&amp;gt;wait(step_time)&amp;lt;/code&amp;gt; function in between two steps?&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89393</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89393"/>
		<updated>2013-08-02T20:17:08Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: delay &amp;#039;screen dimensions&amp;#039; (has low priority)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and [http://wiki.laptop.org/go/User:Claudia_Urrea Claudia Urrea].&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
I develop my project in a branch called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] on Gitorious. Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline will be modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;setxy&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
** July 1 – July 5 (1 week): Test the two Python code generators for suitability for my project. Develop a concept of how the blocks know what Python code they will be transformed into.&lt;br /&gt;
** July 6 – July 12 (1 week): Replace previous implementation of primitives (the backend of the blocks) with a class whose instances can be called to execute the block, or be transformed to a Python AST (class &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;). Use the class in TA and make sure calling instances works. Add &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects for the first five blocks and the &#039;repeat&#039; block.&lt;br /&gt;
** July 13 – July 21 (1 week): Work on transforming &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects to Python ASTs. Implement special handling for loop blocks when transforming them to ASTs. The sample program basics-square.ta can now be exported to python code.&lt;br /&gt;
* July 22 – July 28 (1 week): Introduce constant arguments to &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;forever&#039; block.&lt;br /&gt;
* July 29 – August 2: The exported Python code now uses TurtleArt&#039;s internal execution engine. This makes infinite loops executable and enables the user to watch the program run. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;clean&#039; block. Implement nice error handling when exporting a project and when running the exported code.&lt;br /&gt;
* Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to a few blocks (those that have a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object), but it can easily be extended to cover the rest.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** The complete &#039;Pen&#039; palette&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** The rest of the loops from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** Conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** The complete &#039;Pen colors&#039; palette&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette&lt;br /&gt;
*** Action stacks (functions) from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette&lt;br /&gt;
*** Presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette&lt;br /&gt;
*** Printing and loading blocks and palettes from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;br /&gt;
* Code in named stacks will be put into functions with the same name. Blocks appended to the &#039;start&#039; block will be put into a function called &amp;lt;code&amp;gt;start()&amp;lt;/code&amp;gt;. Unnamed stacks will also be put into extra functions with auto-generated names (e.g., &amp;lt;code&amp;gt;unnamed_stack_1()&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Run only the block stack that has a &#039;start&#039; block at the top. If there is no &#039;start&#039; block, notify the user, but don&#039;t execute unnamed stacks. (TA itself should show the same behavior.)&lt;br /&gt;
* Assume the generated code will be run in GNOME, but keep the &amp;lt;code&amp;gt;running_sugar&amp;lt;/code&amp;gt; flag, so it can be ported to Sugar later.&lt;br /&gt;
* The path to the TA installation must be in the environment variable &amp;lt;code&amp;gt;PYTHONPATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Boxes and actions are stored in a dictionary in order to allow for arbitrary names (e.g., names that start with a number or names that are read from the content of a box).&lt;br /&gt;
* All blocks (including the ones introduced by plugins) reference a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object, which can be called to execute the block in TA, or transformed into a Python AST.&lt;br /&gt;
** Type conversion and other modification of the arguments of a block is done by &#039;&#039;slot wrappers&#039;&#039;. A slot wrapper is a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; that is attached to the argument of another &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;. Slot wrappers are called/ transformed before the &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; itself.&lt;br /&gt;
&lt;br /&gt;
=== Pending ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have yet to be decided:&lt;br /&gt;
&lt;br /&gt;
=== Deferred ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have not yet been decided, but are being deferred due to their low priority:&lt;br /&gt;
&lt;br /&gt;
* Enable the user to control the speed of execution (e.g., by setting a global &amp;lt;code&amp;gt;step_time&amp;lt;/code&amp;gt;)?&lt;br /&gt;
** How to implement this? E.g., call a &amp;lt;code&amp;gt;wait(step_time)&amp;lt;/code&amp;gt; function in between two steps?&lt;br /&gt;
* Should the status bar be shown when the exported code is run?&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89392</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89392"/>
		<updated>2013-08-02T20:15:59Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and [http://wiki.laptop.org/go/User:Claudia_Urrea Claudia Urrea].&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
I develop my project in a branch called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] on Gitorious. Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline will be modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;setxy&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
** July 1 – July 5 (1 week): Test the two Python code generators for suitability for my project. Develop a concept of how the blocks know what Python code they will be transformed into.&lt;br /&gt;
** July 6 – July 12 (1 week): Replace previous implementation of primitives (the backend of the blocks) with a class whose instances can be called to execute the block, or be transformed to a Python AST (class &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;). Use the class in TA and make sure calling instances works. Add &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects for the first five blocks and the &#039;repeat&#039; block.&lt;br /&gt;
** July 13 – July 21 (1 week): Work on transforming &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects to Python ASTs. Implement special handling for loop blocks when transforming them to ASTs. The sample program basics-square.ta can now be exported to python code.&lt;br /&gt;
* July 22 – July 28 (1 week): Introduce constant arguments to &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;forever&#039; block.&lt;br /&gt;
* July 29 – August 2: The exported Python code now uses TurtleArt&#039;s internal execution engine. This makes infinite loops executable and enables the user to watch the program run. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;clean&#039; block. Implement nice error handling when exporting a project and when running the exported code.&lt;br /&gt;
* Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to a few blocks (those that have a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object), but it can easily be extended to cover the rest.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** The complete &#039;Pen&#039; palette&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** The rest of the loops from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** Conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** The complete &#039;Pen colors&#039; palette&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette&lt;br /&gt;
*** Action stacks (functions) from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette&lt;br /&gt;
*** Presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette&lt;br /&gt;
*** Printing and loading blocks and palettes from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;br /&gt;
* Code in named stacks will be put into functions with the same name. Blocks appended to the &#039;start&#039; block will be put into a function called &amp;lt;code&amp;gt;start()&amp;lt;/code&amp;gt;. Unnamed stacks will also be put into extra functions with auto-generated names (e.g., &amp;lt;code&amp;gt;unnamed_stack_1()&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Run only the block stack that has a &#039;start&#039; block at the top. If there is no &#039;start&#039; block, notify the user, but don&#039;t execute unnamed stacks. (TA itself should show the same behavior.)&lt;br /&gt;
* Assume the generated code will be run in GNOME, but keep the &amp;lt;code&amp;gt;running_sugar&amp;lt;/code&amp;gt; flag, so it can be ported to Sugar later.&lt;br /&gt;
* The path to the TA installation must be in the environment variable &amp;lt;code&amp;gt;PYTHONPATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Boxes and actions are stored in a dictionary in order to allow for arbitrary names (e.g., names that start with a number or names that are read from the content of a box).&lt;br /&gt;
* All blocks (including the ones introduced by plugins) reference a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object, which can be called to execute the block in TA, or transformed into a Python AST.&lt;br /&gt;
** Type conversion and other modification of the arguments of a block is done by &#039;&#039;slot wrappers&#039;&#039;. A slot wrapper is a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; that is attached to the argument of another &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;. Slot wrappers are called/ transformed before the &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; itself.&lt;br /&gt;
&lt;br /&gt;
=== Pending ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have yet to be decided:&lt;br /&gt;
&lt;br /&gt;
=== Deferred ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have not yet been decided, but are being deferred due to their low priority:&lt;br /&gt;
&lt;br /&gt;
* Enable the user to control the speed of execution (e.g., by setting a global &amp;lt;code&amp;gt;step_time&amp;lt;/code&amp;gt;)?&lt;br /&gt;
** How to implement this? E.g., call a &amp;lt;code&amp;gt;wait(step_time)&amp;lt;/code&amp;gt; function in between two steps?&lt;br /&gt;
* Should the status bar be shown when the exported code is run?&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89391</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=89391"/>
		<updated>2013-08-02T20:14:17Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: update schedule&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and [http://wiki.laptop.org/go/User:Claudia_Urrea Claudia Urrea].&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
I develop my project in a branch called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] on Gitorious. Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline will be modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;setxy&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
** July 1 – July 5 (1 week): Test the two Python code generators for suitability for my project. Develop a concept of how the blocks know what Python code they will be transformed into.&lt;br /&gt;
** July 6 – July 12 (1 week): Replace previous implementation of primitives (the backend of the blocks) with a class whose instances can be called to execute the block, or be transformed to a Python AST (class &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;). Use the class in TA and make sure calling instances works. Add &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects for the first five blocks and the &#039;repeat&#039; block.&lt;br /&gt;
** July 13 – July 21 (1 week): Work on transforming &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects to Python ASTs. Implement special handling for loop blocks when transforming them to ASTs. The sample program basics-square.ta can now be exported to python code.&lt;br /&gt;
* July 22 – July 28 (1 week): Introduce constant arguments to &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;forever&#039; block.&lt;br /&gt;
* July 29 – August 2: The exported Python code now uses TurtleArt&#039;s internal execution engine. This makes infinite loops executable and enables the user to watch the program run. Add a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object for the &#039;clean&#039; block. Implement nice error handling when exporting a project and when running the exported code.&lt;br /&gt;
* Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to a few blocks (those that have a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object), but it can easily be extended to cover the rest.&lt;br /&gt;
&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** The complete &#039;Pen&#039; palette&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette&lt;br /&gt;
*** The rest of the loops from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** Conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** The complete &#039;Pen colors&#039; palette&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette&lt;br /&gt;
*** Action stacks (functions) from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;br /&gt;
* Code in named stacks will be put into functions with the same name. Blocks appended to the &#039;start&#039; block will be put into a function called &amp;lt;code&amp;gt;start()&amp;lt;/code&amp;gt;. Unnamed stacks will also be put into extra functions with auto-generated names (e.g., &amp;lt;code&amp;gt;unnamed_stack_1()&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Run only the block stack that has a &#039;start&#039; block at the top. If there is no &#039;start&#039; block, notify the user, but don&#039;t execute unnamed stacks. (TA itself should show the same behavior.)&lt;br /&gt;
* Assume the generated code will be run in GNOME, but keep the &amp;lt;code&amp;gt;running_sugar&amp;lt;/code&amp;gt; flag, so it can be ported to Sugar later.&lt;br /&gt;
* The path to the TA installation must be in the environment variable &amp;lt;code&amp;gt;PYTHONPATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Boxes and actions are stored in a dictionary in order to allow for arbitrary names (e.g., names that start with a number or names that are read from the content of a box).&lt;br /&gt;
* All blocks (including the ones introduced by plugins) reference a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object, which can be called to execute the block in TA, or transformed into a Python AST.&lt;br /&gt;
** Type conversion and other modification of the arguments of a block is done by &#039;&#039;slot wrappers&#039;&#039;. A slot wrapper is a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; that is attached to the argument of another &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;. Slot wrappers are called/ transformed before the &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; itself.&lt;br /&gt;
&lt;br /&gt;
=== Pending ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have yet to be decided:&lt;br /&gt;
&lt;br /&gt;
=== Deferred ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have not yet been decided, but are being deferred due to their low priority:&lt;br /&gt;
&lt;br /&gt;
* Enable the user to control the speed of execution (e.g., by setting a global &amp;lt;code&amp;gt;step_time&amp;lt;/code&amp;gt;)?&lt;br /&gt;
** How to implement this? E.g., call a &amp;lt;code&amp;gt;wait(step_time)&amp;lt;/code&amp;gt; function in between two steps?&lt;br /&gt;
* Should the status bar be shown when the exported code is run?&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88751</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88751"/>
		<updated>2013-07-11T21:51:31Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: update decisions; move deferred ones to new Deferred section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and [http://wiki.laptop.org/go/User:Claudia_Urrea Claudia Urrea].&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
I develop my project in a branch called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] on Gitorious. Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline will be modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;setxy&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
** July 1 – July 5 (1 week): Test the two Python code generators for suitability for my project. Develop a concept of how the blocks know what Python code they will be transformed into.&lt;br /&gt;
** July 6 – July 12 (1 week): Replace previous implementation of primitives (the backend of the blocks) with a class whose instances can be called to execute the block, or be transformed to a Python AST (class &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;). Use the class in TA and make sure calling instances works.&lt;br /&gt;
** July 13 – July 21 (1 week): Work on transforming &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects to Python ASTs.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;br /&gt;
* Code in named stacks will be put into functions with the same name. Blocks appended to the &#039;start&#039; block will be put into a function called &amp;lt;code&amp;gt;start()&amp;lt;/code&amp;gt;. Unnamed stacks will also be put into extra functions with auto-generated names (e.g., &amp;lt;code&amp;gt;unnamed_stack_1()&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Run only the block stack that has a &#039;start&#039; block at the top. If there is no &#039;start&#039; block, notify the user, but don&#039;t execute unnamed stacks. (TA itself should show the same behavior.)&lt;br /&gt;
* Assume the generated code will be run in GNOME, but keep the &amp;lt;code&amp;gt;running_sugar&amp;lt;/code&amp;gt; flag, so it can be ported to Sugar later.&lt;br /&gt;
* The path to the TA installation must be in the environment variable &amp;lt;code&amp;gt;PYTHONPATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Boxes and actions are stored in a dictionary in order to allow for arbitrary names (e.g., names that start with a number or names that are read from the content of a box).&lt;br /&gt;
* All blocks (including the ones introduced by plugins) reference a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; object, which can be called to execute the block in TA, or transformed into a Python AST.&lt;br /&gt;
** Type conversion and other modification of the arguments of a block is done by &#039;&#039;slot wrappers&#039;&#039;. A slot wrapper is a &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; that is attached to the argument of another &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;. Slot wrappers are called/ transformed before the &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; itself.&lt;br /&gt;
&lt;br /&gt;
=== Pending ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have yet to be decided:&lt;br /&gt;
&lt;br /&gt;
=== Deferred ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have not yet been decided, but are being deferred due to their low priority:&lt;br /&gt;
&lt;br /&gt;
* Enable the user to control the speed of execution (e.g., by setting a global &amp;lt;code&amp;gt;step_time&amp;lt;/code&amp;gt;)?&lt;br /&gt;
** How to implement this? E.g., call a &amp;lt;code&amp;gt;wait(step_time)&amp;lt;/code&amp;gt; function in between two steps?&lt;br /&gt;
* Should the status bar be shown when the exported code is run?&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88747</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88747"/>
		<updated>2013-07-11T21:43:23Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: add details to timeline&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and [http://wiki.laptop.org/go/User:Claudia_Urrea Claudia Urrea].&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
I develop my project in a branch called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] on Gitorious. Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline will be modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;setxy&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
** July 1 – July 5 (1 week): Test the two Python code generators for suitability for my project. Develop a concept of how the blocks know what Python code they will be transformed into.&lt;br /&gt;
** July 6 – July 12 (1 week): Replace previous implementation of primitives (the backend of the blocks) with a class whose instances can be called to execute the block, or be transformed to a Python AST (class &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt;). Use the class in TA and make sure calling instances works.&lt;br /&gt;
** July 13 – July 21 (1 week): Work on transforming &amp;lt;code&amp;gt;Primitive&amp;lt;/code&amp;gt; objects to Python ASTs.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;br /&gt;
* Code in named stacks will be put into functions with the same name. Blocks appended to the &#039;start&#039; block will be put into a function called &amp;lt;code&amp;gt;start()&amp;lt;/code&amp;gt;. Unnamed stacks will also be put into extra functions with auto-generated names (e.g., &amp;lt;code&amp;gt;unnamed_stack_1()&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Run only the block stack that has a &#039;start&#039; block at the top. If there is no &#039;start&#039; block, notify the user, but don&#039;t execute unnamed stacks. (TA itself should show the same behavior.)&lt;br /&gt;
* Assume the generated code will be run in GNOME, but keep the &amp;lt;code&amp;gt;running_sugar&amp;lt;/code&amp;gt; flag, so it can be ported to Sugar later.&lt;br /&gt;
* The path to the TA installation must be in the environment variable &amp;lt;code&amp;gt;PYTHONPATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Boxes and actions are stored in a dictionary in order to allow for arbitrary names (e.g., names that start with a number or names that are read from the content of a box).&lt;br /&gt;
&lt;br /&gt;
=== Pending ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have yet to be decided:&lt;br /&gt;
&lt;br /&gt;
* Enable the user to control the speed of execution (e.g., by setting a global &amp;lt;code&amp;gt;step_time&amp;lt;/code&amp;gt;)? &#039;&#039;deferred on 2013-06-14&#039;&#039;&lt;br /&gt;
** How to implement this? E.g., call a &amp;lt;code&amp;gt;wait(step_time)&amp;lt;/code&amp;gt; function in between two steps?&lt;br /&gt;
* Should the status bar be shown when the exported code is run?&lt;br /&gt;
* Blocks introduced by plugins: Should the plugin provide info about how to transform its blocks into Python?&lt;br /&gt;
* How to handle type conversion between numbers and strings that is done implicitly in TA?&lt;br /&gt;
** E.g., resolve types when converting the code (possible?), and output the code specific to the type.&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88551</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88551"/>
		<updated>2013-06-24T09:22:14Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: add pending decision re. type conversion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and [http://wiki.laptop.org/go/User:Claudia_Urrea Claudia Urrea].&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
I develop my project in a branch called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] on Gitorious. Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline will be modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;br /&gt;
* Code in named stacks will be put into functions with the same name. Blocks appended to the &#039;start&#039; block will be put into a function called &amp;lt;code&amp;gt;start()&amp;lt;/code&amp;gt;. Unnamed stacks will also be put into extra functions with auto-generated names (e.g., &amp;lt;code&amp;gt;unnamed_stack_1()&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Run only the block stack that has a &#039;start&#039; block at the top. If there is no &#039;start&#039; block, notify the user, but don&#039;t execute unnamed stacks. (TA itself should show the same behavior.)&lt;br /&gt;
* Assume the generated code will be run in GNOME, but keep the &amp;lt;code&amp;gt;running_sugar&amp;lt;/code&amp;gt; flag, so it can be ported to Sugar later.&lt;br /&gt;
* The path to the TA installation must be in the environment variable &amp;lt;code&amp;gt;PYTHONPATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Boxes and actions are stored in a dictionary in order to allow for arbitrary names (e.g., names that start with a number or names that are read from the content of a box).&lt;br /&gt;
&lt;br /&gt;
=== Pending ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have yet to be decided:&lt;br /&gt;
&lt;br /&gt;
* Enable the user to control the speed of execution (e.g., by setting a global &amp;lt;code&amp;gt;step_time&amp;lt;/code&amp;gt;)? &#039;&#039;deferred on 2013-06-14&#039;&#039;&lt;br /&gt;
** How to implement this? E.g., call a &amp;lt;code&amp;gt;wait(step_time)&amp;lt;/code&amp;gt; function in between two steps?&lt;br /&gt;
* Should the status bar be shown when the exported code is run?&lt;br /&gt;
* Blocks introduced by plugins: Should the plugin provide info about how to transform its blocks into Python?&lt;br /&gt;
* How to handle type conversion between numbers and strings that is done implicitly in TA?&lt;br /&gt;
** E.g., resolve types when converting the code (possible?), and output the code specific to the type.&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88550</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88550"/>
		<updated>2013-06-23T12:37:51Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: add pending decision on blocks introduced by plugins&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and [http://wiki.laptop.org/go/User:Claudia_Urrea Claudia Urrea].&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
I develop my project in a branch called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] on Gitorious. Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline will be modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;br /&gt;
* Code in named stacks will be put into functions with the same name. Blocks appended to the &#039;start&#039; block will be put into a function called &amp;lt;code&amp;gt;start()&amp;lt;/code&amp;gt;. Unnamed stacks will also be put into extra functions with auto-generated names (e.g., &amp;lt;code&amp;gt;unnamed_stack_1()&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Run only the block stack that has a &#039;start&#039; block at the top. If there is no &#039;start&#039; block, notify the user, but don&#039;t execute unnamed stacks. (TA itself should show the same behavior.)&lt;br /&gt;
* Assume the generated code will be run in GNOME, but keep the &amp;lt;code&amp;gt;running_sugar&amp;lt;/code&amp;gt; flag, so it can be ported to Sugar later.&lt;br /&gt;
* The path to the TA installation must be in the environment variable &amp;lt;code&amp;gt;PYTHONPATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Boxes and actions are stored in a dictionary in order to allow for arbitrary names (e.g., names that start with a number or names that are read from the content of a box).&lt;br /&gt;
&lt;br /&gt;
=== Pending ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have yet to be decided:&lt;br /&gt;
&lt;br /&gt;
* Enable the user to control the speed of execution (e.g., by setting a global &amp;lt;code&amp;gt;step_time&amp;lt;/code&amp;gt;)? &#039;&#039;deferred on 2013-06-14&#039;&#039;&lt;br /&gt;
** How to implement this? E.g., call a &amp;lt;code&amp;gt;wait(step_time)&amp;lt;/code&amp;gt; function in between two steps?&lt;br /&gt;
* Should the status bar be shown when the exported code is run?&lt;br /&gt;
* Blocks introduced by plugins: Should the plugin provide info about how to transform its blocks into Python?&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88549</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88549"/>
		<updated>2013-06-23T09:48:37Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: add decisions on TA installation path, dictionary for boxes and actions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and [http://wiki.laptop.org/go/User:Claudia_Urrea Claudia Urrea].&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
I develop my project in a branch called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] on Gitorious. Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline will be modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;br /&gt;
* Code in named stacks will be put into functions with the same name. Blocks appended to the &#039;start&#039; block will be put into a function called &amp;lt;code&amp;gt;start()&amp;lt;/code&amp;gt;. Unnamed stacks will also be put into extra functions with auto-generated names (e.g., &amp;lt;code&amp;gt;unnamed_stack_1()&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Run only the block stack that has a &#039;start&#039; block at the top. If there is no &#039;start&#039; block, notify the user, but don&#039;t execute unnamed stacks. (TA itself should show the same behavior.)&lt;br /&gt;
* Assume the generated code will be run in GNOME, but keep the &amp;lt;code&amp;gt;running_sugar&amp;lt;/code&amp;gt; flag, so it can be ported to Sugar later.&lt;br /&gt;
* The path to the TA installation must be in the environment variable &amp;lt;code&amp;gt;PYTHONPATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Boxes and actions are stored in a dictionary in order to allow for arbitrary names (e.g., names that start with a number or names that are read from the content of a box).&lt;br /&gt;
&lt;br /&gt;
=== Pending ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have yet to be decided:&lt;br /&gt;
&lt;br /&gt;
* Enable the user to control the speed of execution (e.g., by setting a global &amp;lt;code&amp;gt;step_time&amp;lt;/code&amp;gt;)? &#039;&#039;deferred on 2013-06-14&#039;&#039;&lt;br /&gt;
** How to implement this? E.g., call a &amp;lt;code&amp;gt;wait(step_time)&amp;lt;/code&amp;gt; function in between two steps?&lt;br /&gt;
* Should the status bar be shown when the exported code is run?&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88502</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88502"/>
		<updated>2013-06-14T16:53:20Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: update decisions after meeting with Walter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and [http://wiki.laptop.org/go/User:Claudia_Urrea Claudia Urrea].&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
I develop my project in a branch called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] on Gitorious. Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline will be modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;br /&gt;
* Code in named stacks will be put into functions with the same name. Blocks appended to the &#039;start&#039; block will be put into a function called &amp;lt;code&amp;gt;start()&amp;lt;/code&amp;gt;. Unnamed stacks will also be put into extra functions with auto-generated names (e.g., &amp;lt;code&amp;gt;unnamed_stack_1()&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Run only the block stack that has a &#039;start&#039; block at the top. If there is no &#039;start&#039; block, notify the user, but don&#039;t execute unnamed stacks. (TA itself should show the same behavior.)&lt;br /&gt;
* Assume the generated code will be run in GNOME, but keep the &amp;lt;code&amp;gt;running_sugar&amp;lt;/code&amp;gt; flag, so it can be ported to Sugar later.&lt;br /&gt;
&lt;br /&gt;
=== Pending ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have yet to be decided:&lt;br /&gt;
&lt;br /&gt;
* Enable the user to control the speed of execution (e.g., by setting a global &amp;lt;code&amp;gt;step_time&amp;lt;/code&amp;gt;)? &#039;&#039;deferred on 2013-06-14&#039;&#039;&lt;br /&gt;
** How to implement this? E.g., call a &amp;lt;code&amp;gt;wait(step_time)&amp;lt;/code&amp;gt; function in between two steps?&lt;br /&gt;
* How to automatically determine the path to the TA installation (e.g., for finding the plugins)? &#039;&#039;deferred on 2013-06-14&#039;&#039;&lt;br /&gt;
** Either: check a list of standard paths.&lt;br /&gt;
** Or: expect it to be in the &amp;lt;code&amp;gt;PYTHONPATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
** Explain to the user what&#039;s wrong when the TA installation wasn&#039;t found.&lt;br /&gt;
* Should the status bar be shown when the exported code is run?&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88500</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88500"/>
		<updated>2013-06-14T15:12:22Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: add a decision on running unnamed stacks; defer the pending decision on the speed of execution&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and [http://wiki.laptop.org/go/User:Claudia_Urrea Claudia Urrea].&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
I develop my project in a branch called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] on Gitorious. Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline will be modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;br /&gt;
* Code in named stacks will be put into functions with the same name. Blocks appended to the &#039;start&#039; block will be put into a function called &amp;lt;code&amp;gt;start()&amp;lt;/code&amp;gt;. Unnamed stacks will also be put into extra functions with auto-generated names (e.g., &amp;lt;code&amp;gt;unnamed_stack_1()&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Run only the block stack that has a &#039;start&#039; block at the top. If there is no &#039;start&#039; block, notify the user, but don&#039;t execute unnamed stacks. (TA itself should show the same behavior.)&lt;br /&gt;
&lt;br /&gt;
=== Pending ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have yet to be decided:&lt;br /&gt;
&lt;br /&gt;
* Enable the user to control the speed of execution (e.g., by setting a global &amp;lt;code&amp;gt;step_time&amp;lt;/code&amp;gt;)? &#039;&#039;deferred on 2013-06-14&#039;&#039;&lt;br /&gt;
** How to implement this? E.g., call a &amp;lt;code&amp;gt;wait(step_time)&amp;lt;/code&amp;gt; function in between two steps?&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88499</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88499"/>
		<updated>2013-06-14T13:35:00Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: add a pending decision re speed of execution&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and [http://wiki.laptop.org/go/User:Claudia_Urrea Claudia Urrea].&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
I develop my project in a branch called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] on Gitorious. Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline will be modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;br /&gt;
* Code in named stacks will be put into functions with the same name. Blocks appended to the &#039;start&#039; block will be put into a function called &amp;lt;code&amp;gt;start()&amp;lt;/code&amp;gt;. Unnamed stacks will also be put into extra functions with auto-generated names (e.g., &amp;lt;code&amp;gt;unnamed_stack_1()&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Pending ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have yet to be decided:&lt;br /&gt;
&lt;br /&gt;
* When do we determine which block stacks are to be run? When we convert the code to Python or when the Python code is executed?&lt;br /&gt;
* Enable the user to control the speed of execution (e.g., by setting a global &amp;lt;code&amp;gt;step_time&amp;lt;/code&amp;gt;)?&lt;br /&gt;
** How to implement this? E.g., call a &amp;lt;code&amp;gt;wait(step_time)&amp;lt;/code&amp;gt; function in between two steps?&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88496</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88496"/>
		<updated>2013-06-14T10:51:10Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: add section on pending design decisions; add a pending decision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and [http://wiki.laptop.org/go/User:Claudia_Urrea Claudia Urrea].&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
I develop my project in a branch called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] on Gitorious. Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline will be modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;br /&gt;
* Code in named stacks will be put into functions with the same name. Blocks appended to the &#039;start&#039; block will be put into a function called &amp;lt;code&amp;gt;start()&amp;lt;/code&amp;gt;. Unnamed stacks will also be put into extra functions with auto-generated names (e.g., &amp;lt;code&amp;gt;unnamed_stack_1()&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Pending ===&lt;br /&gt;
&lt;br /&gt;
The following design issues have yet to be decided:&lt;br /&gt;
&lt;br /&gt;
* When do we determine which block stacks are to be run? When we convert the code to Python or when the Python code is executed?&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88494</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88494"/>
		<updated>2013-06-13T22:14:26Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: add decision to convert named and unnamed stacks to functions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and [http://wiki.laptop.org/go/User:Claudia_Urrea Claudia Urrea].&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
I develop my project in a branch called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] on Gitorious. Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline will be modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;br /&gt;
* Code in named stacks will be put into functions with the same name. Blocks appended to the &#039;start&#039; block will be put into a function called &amp;lt;code&amp;gt;start()&amp;lt;/code&amp;gt;. Unnamed stacks will also be put into extra functions with auto-generated names (e.g., &amp;lt;code&amp;gt;unnamed_stack_1()&amp;lt;/code&amp;gt;).&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88492</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88492"/>
		<updated>2013-06-13T18:57:53Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: design decision on which graphical elements to include in the output&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and Claudia Urrea.&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
I develop my project in a branch called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] on Gitorious. Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline will be modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;br /&gt;
&lt;br /&gt;
* The generated Python code will setup a window without menus and palettes. It will only be a plain canvas. Turtles will be visible with their (default or custom) sprites because this is the only way to make sprites move in TA.&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=User:Marion_Zepf&amp;diff=88491</id>
		<title>User:Marion Zepf</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=User:Marion_Zepf&amp;diff=88491"/>
		<updated>2013-06-13T16:49:27Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: add contact information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am a student who has been accepted for the Google Summer of Code 2013. I am working on the project &amp;quot;[[Summer of Code/2013/Turtle Blocks Python export project|Turtle Blocks Python export]].&amp;quot; Here are some related links:&lt;br /&gt;
* description of the project idea (as provided by the Sugar developer community): [[Summer_of_Code/2013#Python_export_functionality_for_Turtle_Blocks|Python export functionality for TurtleBlocks]]&lt;br /&gt;
* my project proposal for the GSoC, which includes an abstract: [[Summer of Code/2013/Turtle Blocks Python export]]&lt;br /&gt;
&lt;br /&gt;
== Contact Information and Profiles ==&lt;br /&gt;
&lt;br /&gt;
* IRC: mzepf on FreeNode.net&lt;br /&gt;
* email: marion döt zepf ät gmail döt com&lt;br /&gt;
* GitHub: [https://github.com/outofthecave outofthecave]&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=88490</id>
		<title>Summer of Code/2013/Turtle Blocks Python export</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=88490"/>
		<updated>2013-06-13T16:38:54Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My name is [[User:Marion Zepf|Marion Zepf]] and I have been accepted to work on the project [[Summer_of_Code/2013#Python_export_functionality_for_Turtle_Blocks|Python export functionality for TurtleBlocks]]. Please find my project proposal below. An up-to-date progress report on this project can be found on [[Summer of Code/2013/Turtle Blocks Python export project|its wiki page]].&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
Turtle Blocks teaches children an important skill in today&#039;s world: programming. Its block-based graphical interface makes abstract concepts like loops easy to understand and fun to play with. But it does not yet support the next step in learning: writing code in a &#039;real&#039; programming language. My project fills this gap by automatically converting block programs to Python code. It enables the children to transfer their knowledge to a text-based language and to focus on acquiring the new syntax.&lt;br /&gt;
&lt;br /&gt;
== About me ==&lt;br /&gt;
&lt;br /&gt;
=== What is your name? ===&lt;br /&gt;
Marion Zepf&lt;br /&gt;
&lt;br /&gt;
=== What is your email address? ===&lt;br /&gt;
[mailto:marion.zepf@gmail.com marion.zepf@gmail.com]&lt;br /&gt;
&lt;br /&gt;
=== What is your Sugar Labs wiki username? ===&lt;br /&gt;
[[User:Marion Zepf|Marion Zepf]]&lt;br /&gt;
&lt;br /&gt;
=== What is your IRC nickname? ===&lt;br /&gt;
I do not have a fixed nickname, but I try to use &amp;quot;mzepf&amp;quot; if it is available.&lt;br /&gt;
&lt;br /&gt;
=== What is your primary language? ===&lt;br /&gt;
&#039;&#039;(We have mentors who speak multiple languages and can match you with one of them if you&#039;d prefer.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My native language is German, but I am more comfortable in English when it comes to computers and programming.&lt;br /&gt;
&lt;br /&gt;
=== Where are you located, and what hours do you tend to work? ===&lt;br /&gt;
&#039;&#039;(We also try to match mentors by general time zone if possible.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am located in Stuttgart and Tübingen, Germany. My time zone is Central European Summer Time (CEST) or UTC+02:00 during summer.&lt;br /&gt;
I plan to work on this project Thu-Sun, approximately from noon until midnight.&lt;br /&gt;
&lt;br /&gt;
=== Have you participated in an open-source project before? ===&lt;br /&gt;
&#039;&#039;If so, please send us URLs to your profile pages for those projects, or some other demonstration of the work that you have done in open-source. If not, why do you want to work on an open-source project this summer?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is my first open-source project. In the past, I have benefited from open-source software countless times. Now I want to give something back to the community.&lt;br /&gt;
&lt;br /&gt;
== About my Project ==&lt;br /&gt;
&lt;br /&gt;
=== Project description  ===&lt;br /&gt;
&#039;&#039;What is the name of your project? Describe your project in 10-20 sentences. What are you making? Who are you making it for, and why do they need it? What technologies (programming languages, etc.) will you be using?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Turtle Blocks Python export&#039;&#039;&#039; lets the user export their programming project from the Turtle Blocks activity to a Python script. The generated Python code can be run outside of Turtle Blocks, for example from the command line or in the Pippy IDE.&lt;br /&gt;
&lt;br /&gt;
This tool is designed for users who are already proficient Turtle Block programmers and want to move on to text-based programming. It helps them transfer their knowledge and skills from block-based to text-based programming, as they can see their own creations in a new programming language. Thus, they can focus on the new language rather than the content of the program.&lt;br /&gt;
&lt;br /&gt;
The Python export functionality will be implemented in pure Python, drawing on the internal block code interpreter of Turtle Blocks to convert the blocks to a representation of the program flow. I will then use the &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://docs.python.org/2.6/library/ast.html&amp;lt;/ref&amp;gt; to build the Python syntax tree from this representation. In order to serialize the syntax tree to a string, which can then be written to a file, I plan to use either the &amp;lt;code&amp;gt;codegen&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://dev.pocoo.org/hg/sandbox/file/b2aea937f5bb/ast/codegen.py&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://gist.github.com/mattbasta/791312&amp;lt;/ref&amp;gt; or the &amp;lt;code&amp;gt;unparse&amp;lt;/code&amp;gt; module.&amp;lt;ref&amp;gt;http://svn.python.org/view/python/trunk/Demo/parser/unparse.py?view=markup&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The exported Python code will need to import a few classes from Turtle Blocks to set up a window etc. I will isolate these classes from the Turtle Blocks code, so it can easily be imported into the generated code.&lt;br /&gt;
&lt;br /&gt;
=== What is the timeline for development of your project? ===&lt;br /&gt;
&#039;&#039;The Summer of Code work period is June 17 - September 23; tell us what you will be working on each week. (As the summer goes on, you and your mentor will adjust your schedule, but it&#039;s good to have a plan at the beginning so you have an idea of where you&#039;re headed.) Note that you should probably plan to have something &amp;quot;working and 90% done&amp;quot; by the midterm evaluation (August 2); the last steps always take longer than you think, and we will consider cancelling projects which are not mostly working by then.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== My Background ===&lt;br /&gt;
&#039;&#039;Convince us, in 5-15 sentences, that you will be able to successfully complete your project in the timeline you have described. This is usually where people describe their past experiences, credentials, prior projects, schoolwork, and that sort of thing, but be creative. Link to prior work or other resources as relevant.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am a student of computational linguistics in my 6th semester.&lt;br /&gt;
I have three years of experience in writing Python programs of various kinds - from simple command line utilities to GUI applications (using pygame and tkinter) and code generators for Java code.&lt;br /&gt;
I also have strong competence in the object oriented programming paradigm.&lt;br /&gt;
Moreover, I am familiar with commonly used frameworks and tools like version control software (svn, git), the Eclipse IDE, and autotools.&lt;br /&gt;
I learn quickly, so I expect to acquire good skills in GTK before the start of the coding phase.&lt;br /&gt;
&lt;br /&gt;
Through my linguistic education, I can draw on substantial experience with grammars, parsers, and syntax trees.&lt;br /&gt;
This experience will help me with analyzing the block code and transforming it into Python code.&lt;br /&gt;
&lt;br /&gt;
My interest in educational software was sparked during my work on [http://purl.org/icall/view VIEW] (Visual Input Enhancement of the Web), an online language tutoring system.&lt;br /&gt;
During the past two years, I have made many contributions to VIEW, including, for example, the automatic recognition of main content, headlines, and boilerplate on web pages.&lt;br /&gt;
I also improved the user interface of its browser toolbar, and decreased the server&#039;s response time by enabling multi-threading.&lt;br /&gt;
&lt;br /&gt;
My working style is characterized by a high level of documentation, be it inline comments or commit messages.&lt;br /&gt;
I also keep my code modular, which makes it easy for others to build on my work.&lt;br /&gt;
Thus, the Sugar Labs community can profit ideally from my contribution, even after the end of the GSoC.&lt;br /&gt;
&lt;br /&gt;
== Me and the Community ==&lt;br /&gt;
&lt;br /&gt;
=== Impact on the Sugar Labs community ===&lt;br /&gt;
&#039;&#039;If your project is successfully completed, what will its impact be on the Sugar Labs community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Sugar Labs community, at least one of whom should be a Sugar Labs GSoC mentor. Provide email contact information for non-GSoC mentors.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Many Sugar activities allow exporting the user&#039;s creations as a sound file, a picture, a video, or a simple text file, which can then be imported into other activities. In the case of this project, the user can export their block program to Python code and view, edit, and run it in the Pippy and Terminal activities. Combining several activities to create a single piece of work inspires users&#039; creativity. Moreover, it makes Sugar a coherent system, rather than just an arbitrary collection of activities. Users will view it as a tool kit that helps them realize their ideas, no matter which forms they take. This unlimitedness is an important aspect of Sugar&#039;s quality, and thus it ensures continued interest in Sugar in the future.&lt;br /&gt;
&lt;br /&gt;
[[User:Walter|Walter Bender]], mentor of this project:&amp;lt;br/&amp;gt;&lt;br /&gt;
The primary goal of Turtle Blocks is to engage children in programming, specifically the joy of debugging. But also to give them a sense of empowerment over the tools that they use. Hence Turtle Blocks (as opposed to its sister project Turtle Art) exposes the learner to as much of the system as possible, through sensor blocks, Python blocks, etc. At the same time, Turtle Blocks is not an end in of itself. The further goal is to encourage the learners to move beyond block-based projects and get acquainted with the more expressive text-based languages. This project is an experiment to determine if providing a Python version of the block-based programming environment might provide a stepping stone to making this transition. Until we implement Sugar itself as a Turtle Blocks project, this experiment is a worthwhile bet at turning Sugar users into Sugar developers.&lt;br /&gt;
&lt;br /&gt;
[[User:Rgs|Raúl Gutiérrez Segalés]], Turtle Art contributor:&amp;lt;br/&amp;gt;&lt;br /&gt;
In my mind, the big take away here is that we&#039;ll enable portability of&lt;br /&gt;
Turtle Art projects. Being able to translate TA internal&lt;br /&gt;
code into external languages (initially Python, eventually Javascript&lt;br /&gt;
perhaps, or others) will allow this fundamental learning activity to&lt;br /&gt;
reach other platforms and a much broader audience. The question we&#039;ve&lt;br /&gt;
got in front of us is not if Sugar or Turtle Art belong in the Cloud;&lt;br /&gt;
it&#039;s just how fast can we get there.&amp;lt;br/&amp;gt;&lt;br /&gt;
This project is a key step towards our goal of getting Sugar/Turtle&lt;br /&gt;
Art onto more hands.&lt;br /&gt;
&lt;br /&gt;
=== Sugar pilot deployment ===&lt;br /&gt;
&#039;&#039;Sugar Labs will be working to set up a small (5-30 unit) Sugar pilot near each student project that is accepted to GSoC so that you can immediately see how your work affects children in a deployment. We will make arrangements to either supply or find all the equipment needed. Do you have any ideas on where you would like your deployment to be, who you would like to be involved, and how we can help you and the community in your area begin it?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My old primary school has an immigrant rate of about 80%, and many kids are socially disadvantaged. This results in a big difference in learning speed between individual children in one class, which is problematic for traditional &amp;quot;chalk and talk&amp;quot; teaching methods. I think that Sugar would enable each child to learn at its own pace without feeling left out if they are slower than their classmates. Faster learners can easily move on to other activities when they are done and no longer disturb the lesson because they are bored.&lt;br /&gt;
&lt;br /&gt;
In the first year, the school often faces the difficulty of teaching children who do not speak the class language (German). With its clean graphical interface and recognizable icons, Sugar could help these children understand the material without the need to translate everything into their mother language.&lt;br /&gt;
&lt;br /&gt;
I can set up contact to the school and act as an interpreter if necessary.&lt;br /&gt;
&lt;br /&gt;
=== What will you do if you get stuck on your project and your mentor isn&#039;t around? ===&lt;br /&gt;
&lt;br /&gt;
From experience I know that physical activity often helps me with getting rid of a thinking blockade. So, I will first take a short walk or do some household work to get fresh ideas into my head. If that does not help, I will suspend work on the feature that is causing the problem and work on a different feature in the meantime, until my mentor becomes available again.&lt;br /&gt;
&lt;br /&gt;
=== Keeping the community informed about problems and questions ===&lt;br /&gt;
&#039;&#039;How do you propose you will be keeping the community informed of your progress and any problems or questions you might have over the course of the project?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I plan to document the progress of my work through commit messages in an online repository. When I am faced with an important design decision, I will discuss it with other developers on the mailing list or on IRC. In addition, I will set up a Wiki page to announce the outcomes of such decisions and to keep track of my timeline.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== Screenshot of my Sugar development environment ===&lt;br /&gt;
&#039;&#039;We want to make sure that you can set up a development environment before the summer starts. Please send us a link to a screenshot of your Sugar development environment with the following modification: when you hover over the XO-person icon in the middle of Home view, the drop-down text should have your email in place of &amp;quot;Restart.&amp;quot; See the image on the right for an example. It&#039;s normal to need assistance with this, so please visit our IRC channel, #sugar on irc.freenode.net, and ask for help.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Marion-Zepf_devel-env-screenshot.png|400px|Screenshot of Marion Zepf&#039;s development environment of Sugar with the &#039;restart&#039; label replaced with her email address.]]&lt;br /&gt;
&lt;br /&gt;
=== What is your t-shirt size? ===&lt;br /&gt;
&#039;&#039;(Yes, we know Google asks for this already; humor us.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
S (female)&lt;br /&gt;
&lt;br /&gt;
=== Describe a great learning experience you had as a child. ===&lt;br /&gt;
&lt;br /&gt;
When I looked out of my window, I could see a hill with houses on the top. I would often move my head around, especially up and down, to see how the position of the houses would change with respect to the window frame. It took me a long time, but I eventually figured out that I had to imagine a straight line going out from my eyes to the house I wanted to see. If that line was interrupted by the window frame, I could not see the house. By moving my head around, I would change the angle of the line and some previously hidden houses would become visible. From this experience I learned that I can figure out how things work just by taking a closer look at them and playing around with them.&lt;br /&gt;
&lt;br /&gt;
=== Additional information ===&lt;br /&gt;
&#039;&#039;Is there anything else we should have asked you or anything else that we should know that might make us like you or your project more?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My project will also make Turtle Blocks more attractive for older learners (youths or adults). It allows them to learn the basic concepts of programming first, without having to hassle with the syntax of a text-based programming language. Once they have understood the basics, they can move on to learning the syntax of Python. This way, my project can help increase &#039;programming literacy&#039; all over the world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88489</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88489"/>
		<updated>2013-06-13T16:36:09Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: add mentors, repositories, section for decisions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
The mentors for this project are [[User:Walter|Walter Bender]] and Claudia Urrea.&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
I develop my project in a branch called [https://git.sugarlabs.org/~mzepf/gsoc-python-export gsoc-python-export] on Gitorious. Design documents, sample code, etc. go into [https://github.com/outofthecave/ta-python-export-dev ta-python-export-dev] on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline will be modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Decisions ==&lt;br /&gt;
&lt;br /&gt;
This section lists important design decisions.&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88488</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88488"/>
		<updated>2013-06-13T16:24:11Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: add timeline (copied from proposal page)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;br /&gt;
&lt;br /&gt;
== Timeline ==&lt;br /&gt;
&lt;br /&gt;
The following timeline will be modified as the project evolves.&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=User:Marion_Zepf&amp;diff=88487</id>
		<title>User:Marion Zepf</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=User:Marion_Zepf&amp;diff=88487"/>
		<updated>2013-06-13T16:20:54Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: add link to project progress page; state that I&amp;#039;ve been accepted for the GSoC&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am a student who has been accepted for the Google Summer of Code 2013. I am working on the project &amp;quot;[[Summer of Code/2013/Turtle Blocks Python export project|Turtle Blocks Python export]].&amp;quot; Here are some related links:&lt;br /&gt;
* description of the project idea (as provided by the Sugar developer community): [[Summer_of_Code/2013#Python_export_functionality_for_Turtle_Blocks|Python export functionality for TurtleBlocks]]&lt;br /&gt;
* my project proposal for the GSoC, which includes an abstract: [[Summer of Code/2013/Turtle Blocks Python export]]&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=88486</id>
		<title>Summer of Code/2013/Turtle Blocks Python export</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=88486"/>
		<updated>2013-06-13T16:13:59Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: add link to project progress page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My name is [[User:Marion Zepf|Marion Zepf]] and I have been accepted to work on the project [[Summer_of_Code/2013#Python_export_functionality_for_Turtle_Blocks|Python export funtionality for TurtleBlocks]]. Please find my project proposal below. An up-to-date progress report on this project can be found on [[Summer of Code/2013/Turtle Blocks Python export project|its wiki page]].&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
Turtle Blocks teaches children an important skill in today&#039;s world: programming. Its block-based graphical interface makes abstract concepts like loops easy to understand and fun to play with. But it does not yet support the next step in learning: writing code in a &#039;real&#039; programming language. My project fills this gap by automatically converting block programs to Python code. It enables the children to transfer their knowledge to a text-based language and to focus on acquiring the new syntax.&lt;br /&gt;
&lt;br /&gt;
== About me ==&lt;br /&gt;
&lt;br /&gt;
=== What is your name? ===&lt;br /&gt;
Marion Zepf&lt;br /&gt;
&lt;br /&gt;
=== What is your email address? ===&lt;br /&gt;
[mailto:marion.zepf@gmail.com marion.zepf@gmail.com]&lt;br /&gt;
&lt;br /&gt;
=== What is your Sugar Labs wiki username? ===&lt;br /&gt;
[[User:Marion Zepf|Marion Zepf]]&lt;br /&gt;
&lt;br /&gt;
=== What is your IRC nickname? ===&lt;br /&gt;
I do not have a fixed nickname, but I try to use &amp;quot;mzepf&amp;quot; if it is available.&lt;br /&gt;
&lt;br /&gt;
=== What is your primary language? ===&lt;br /&gt;
&#039;&#039;(We have mentors who speak multiple languages and can match you with one of them if you&#039;d prefer.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My native language is German, but I am more comfortable in English when it comes to computers and programming.&lt;br /&gt;
&lt;br /&gt;
=== Where are you located, and what hours do you tend to work? ===&lt;br /&gt;
&#039;&#039;(We also try to match mentors by general time zone if possible.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am located in Stuttgart and Tübingen, Germany. My time zone is Central European Summer Time (CEST) or UTC+02:00 during summer.&lt;br /&gt;
I plan to work on this project Thu-Sun, approximately from noon until midnight.&lt;br /&gt;
&lt;br /&gt;
=== Have you participated in an open-source project before? ===&lt;br /&gt;
&#039;&#039;If so, please send us URLs to your profile pages for those projects, or some other demonstration of the work that you have done in open-source. If not, why do you want to work on an open-source project this summer?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is my first open-source project. In the past, I have benefited from open-source software countless times. Now I want to give something back to the community.&lt;br /&gt;
&lt;br /&gt;
== About my Project ==&lt;br /&gt;
&lt;br /&gt;
=== Project description  ===&lt;br /&gt;
&#039;&#039;What is the name of your project? Describe your project in 10-20 sentences. What are you making? Who are you making it for, and why do they need it? What technologies (programming languages, etc.) will you be using?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Turtle Blocks Python export&#039;&#039;&#039; lets the user export their programming project from the Turtle Blocks activity to a Python script. The generated Python code can be run outside of Turtle Blocks, for example from the command line or in the Pippy IDE.&lt;br /&gt;
&lt;br /&gt;
This tool is designed for users who are already proficient Turtle Block programmers and want to move on to text-based programming. It helps them transfer their knowledge and skills from block-based to text-based programming, as they can see their own creations in a new programming language. Thus, they can focus on the new language rather than the content of the program.&lt;br /&gt;
&lt;br /&gt;
The Python export functionality will be implemented in pure Python, drawing on the internal block code interpreter of Turtle Blocks to convert the blocks to a representation of the program flow. I will then use the &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://docs.python.org/2.6/library/ast.html&amp;lt;/ref&amp;gt; to build the Python syntax tree from this representation. In order to serialize the syntax tree to a string, which can then be written to a file, I plan to use either the &amp;lt;code&amp;gt;codegen&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://dev.pocoo.org/hg/sandbox/file/b2aea937f5bb/ast/codegen.py&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://gist.github.com/mattbasta/791312&amp;lt;/ref&amp;gt; or the &amp;lt;code&amp;gt;unparse&amp;lt;/code&amp;gt; module.&amp;lt;ref&amp;gt;http://svn.python.org/view/python/trunk/Demo/parser/unparse.py?view=markup&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The exported Python code will need to import a few classes from Turtle Blocks to set up a window etc. I will isolate these classes from the Turtle Blocks code, so it can easily be imported into the generated code.&lt;br /&gt;
&lt;br /&gt;
=== What is the timeline for development of your project? ===&lt;br /&gt;
&#039;&#039;The Summer of Code work period is June 17 - September 23; tell us what you will be working on each week. (As the summer goes on, you and your mentor will adjust your schedule, but it&#039;s good to have a plan at the beginning so you have an idea of where you&#039;re headed.) Note that you should probably plan to have something &amp;quot;working and 90% done&amp;quot; by the midterm evaluation (August 2); the last steps always take longer than you think, and we will consider cancelling projects which are not mostly working by then.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== My Background ===&lt;br /&gt;
&#039;&#039;Convince us, in 5-15 sentences, that you will be able to successfully complete your project in the timeline you have described. This is usually where people describe their past experiences, credentials, prior projects, schoolwork, and that sort of thing, but be creative. Link to prior work or other resources as relevant.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am a student of computational linguistics in my 6th semester.&lt;br /&gt;
I have three years of experience in writing Python programs of various kinds - from simple command line utilities to GUI applications (using pygame and tkinter) and code generators for Java code.&lt;br /&gt;
I also have strong competence in the object oriented programming paradigm.&lt;br /&gt;
Moreover, I am familiar with commonly used frameworks and tools like version control software (svn, git), the Eclipse IDE, and autotools.&lt;br /&gt;
I learn quickly, so I expect to acquire good skills in GTK before the start of the coding phase.&lt;br /&gt;
&lt;br /&gt;
Through my linguistic education, I can draw on substantial experience with grammars, parsers, and syntax trees.&lt;br /&gt;
This experience will help me with analyzing the block code and transforming it into Python code.&lt;br /&gt;
&lt;br /&gt;
My interest in educational software was sparked during my work on [http://purl.org/icall/view VIEW] (Visual Input Enhancement of the Web), an online language tutoring system.&lt;br /&gt;
During the past two years, I have made many contributions to VIEW, including, for example, the automatic recognition of main content, headlines, and boilerplate on web pages.&lt;br /&gt;
I also improved the user interface of its browser toolbar, and decreased the server&#039;s response time by enabling multi-threading.&lt;br /&gt;
&lt;br /&gt;
My working style is characterized by a high level of documentation, be it inline comments or commit messages.&lt;br /&gt;
I also keep my code modular, which makes it easy for others to build on my work.&lt;br /&gt;
Thus, the Sugar Labs community can profit ideally from my contribution, even after the end of the GSoC.&lt;br /&gt;
&lt;br /&gt;
== Me and the Community ==&lt;br /&gt;
&lt;br /&gt;
=== Impact on the Sugar Labs community ===&lt;br /&gt;
&#039;&#039;If your project is successfully completed, what will its impact be on the Sugar Labs community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Sugar Labs community, at least one of whom should be a Sugar Labs GSoC mentor. Provide email contact information for non-GSoC mentors.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Many Sugar activities allow exporting the user&#039;s creations as a sound file, a picture, a video, or a simple text file, which can then be imported into other activities. In the case of this project, the user can export their block program to Python code and view, edit, and run it in the Pippy and Terminal activities. Combining several activities to create a single piece of work inspires users&#039; creativity. Moreover, it makes Sugar a coherent system, rather than just an arbitrary collection of activities. Users will view it as a tool kit that helps them realize their ideas, no matter which forms they take. This unlimitedness is an important aspect of Sugar&#039;s quality, and thus it ensures continued interest in Sugar in the future.&lt;br /&gt;
&lt;br /&gt;
[[User:Walter|Walter Bender]], mentor of this project:&amp;lt;br/&amp;gt;&lt;br /&gt;
The primary goal of Turtle Blocks is to engage children in programming, specifically the joy of debugging. But also to give them a sense of empowerment over the tools that they use. Hence Turtle Blocks (as opposed to its sister project Turtle Art) exposes the learner to as much of the system as possible, through sensor blocks, Python blocks, etc. At the same time, Turtle Blocks is not an end in of itself. The further goal is to encourage the learners to move beyond block-based projects and get acquainted with the more expressive text-based languages. This project is an experiment to determine if providing a Python version of the block-based programming environment might provide a stepping stone to making this transition. Until we implement Sugar itself as a Turtle Blocks project, this experiment is a worthwhile bet at turning Sugar users into Sugar developers.&lt;br /&gt;
&lt;br /&gt;
[[User:Rgs|Raúl Gutiérrez Segalés]], Turtle Art contributor:&amp;lt;br/&amp;gt;&lt;br /&gt;
In my mind, the big take away here is that we&#039;ll enable portability of&lt;br /&gt;
Turtle Art projects. Being able to translate TA internal&lt;br /&gt;
code into external languages (initially Python, eventually Javascript&lt;br /&gt;
perhaps, or others) will allow this fundamental learning activity to&lt;br /&gt;
reach other platforms and a much broader audience. The question we&#039;ve&lt;br /&gt;
got in front of us is not if Sugar or Turtle Art belong in the Cloud;&lt;br /&gt;
it&#039;s just how fast can we get there.&amp;lt;br/&amp;gt;&lt;br /&gt;
This project is a key step towards our goal of getting Sugar/Turtle&lt;br /&gt;
Art onto more hands.&lt;br /&gt;
&lt;br /&gt;
=== Sugar pilot deployment ===&lt;br /&gt;
&#039;&#039;Sugar Labs will be working to set up a small (5-30 unit) Sugar pilot near each student project that is accepted to GSoC so that you can immediately see how your work affects children in a deployment. We will make arrangements to either supply or find all the equipment needed. Do you have any ideas on where you would like your deployment to be, who you would like to be involved, and how we can help you and the community in your area begin it?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My old primary school has an immigrant rate of about 80%, and many kids are socially disadvantaged. This results in a big difference in learning speed between individual children in one class, which is problematic for traditional &amp;quot;chalk and talk&amp;quot; teaching methods. I think that Sugar would enable each child to learn at its own pace without feeling left out if they are slower than their classmates. Faster learners can easily move on to other activities when they are done and no longer disturb the lesson because they are bored.&lt;br /&gt;
&lt;br /&gt;
In the first year, the school often faces the difficulty of teaching children who do not speak the class language (German). With its clean graphical interface and recognizable icons, Sugar could help these children understand the material without the need to translate everything into their mother language.&lt;br /&gt;
&lt;br /&gt;
I can set up contact to the school and act as an interpreter if necessary.&lt;br /&gt;
&lt;br /&gt;
=== What will you do if you get stuck on your project and your mentor isn&#039;t around? ===&lt;br /&gt;
&lt;br /&gt;
From experience I know that physical activity often helps me with getting rid of a thinking blockade. So, I will first take a short walk or do some household work to get fresh ideas into my head. If that does not help, I will suspend work on the feature that is causing the problem and work on a different feature in the meantime, until my mentor becomes available again.&lt;br /&gt;
&lt;br /&gt;
=== Keeping the community informed about problems and questions ===&lt;br /&gt;
&#039;&#039;How do you propose you will be keeping the community informed of your progress and any problems or questions you might have over the course of the project?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I plan to document the progress of my work through commit messages in an online repository. When I am faced with an important design decision, I will discuss it with other developers on the mailing list or on IRC. In addition, I will set up a Wiki page to announce the outcomes of such decisions and to keep track of my timeline.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== Screenshot of my Sugar development environment ===&lt;br /&gt;
&#039;&#039;We want to make sure that you can set up a development environment before the summer starts. Please send us a link to a screenshot of your Sugar development environment with the following modification: when you hover over the XO-person icon in the middle of Home view, the drop-down text should have your email in place of &amp;quot;Restart.&amp;quot; See the image on the right for an example. It&#039;s normal to need assistance with this, so please visit our IRC channel, #sugar on irc.freenode.net, and ask for help.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Marion-Zepf_devel-env-screenshot.png|400px|Screenshot of Marion Zepf&#039;s development environment of Sugar with the &#039;restart&#039; label replaced with her email address.]]&lt;br /&gt;
&lt;br /&gt;
=== What is your t-shirt size? ===&lt;br /&gt;
&#039;&#039;(Yes, we know Google asks for this already; humor us.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
S (female)&lt;br /&gt;
&lt;br /&gt;
=== Describe a great learning experience you had as a child. ===&lt;br /&gt;
&lt;br /&gt;
When I looked out of my window, I could see a hill with houses on the top. I would often move my head around, especially up and down, to see how the position of the houses would change with respect to the window frame. It took me a long time, but I eventually figured out that I had to imagine a straight line going out from my eyes to the house I wanted to see. If that line was interrupted by the window frame, I could not see the house. By moving my head around, I would change the angle of the line and some previously hidden houses would become visible. From this experience I learned that I can figure out how things work just by taking a closer look at them and playing around with them.&lt;br /&gt;
&lt;br /&gt;
=== Additional information ===&lt;br /&gt;
&#039;&#039;Is there anything else we should have asked you or anything else that we should know that might make us like you or your project more?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My project will also make Turtle Blocks more attractive for older learners (youths or adults). It allows them to learn the basic concepts of programming first, without having to hassle with the syntax of a text-based programming language. Once they have understood the basics, they can move on to learning the syntax of Python. This way, my project can help increase &#039;programming literacy&#039; all over the world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88485</id>
		<title>Summer of Code/2013/Turtle Blocks Python export project</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export_project&amp;diff=88485"/>
		<updated>2013-06-13T16:11:16Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: create page to track the progress of my GSoC project, &amp;quot;Turtle Blocks Python export&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page tracks the progress of [[User:Marion Zepf|Marion Zepf]]&#039;s GSoC project, &amp;quot;Turtle Blocks Python export.&amp;quot; An abstract and a motivational statement can be found on the [[Summer of Code/2013/Turtle Blocks Python export|project proposal]] page, along with other details.&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013&amp;diff=88484</id>
		<title>Summer of Code/2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013&amp;diff=88484"/>
		<updated>2013-06-13T16:05:28Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: add link to the project progress page of Turtle Blocks Python export&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Summer of Code/2013/Application|A draft copy of our application]]&lt;br /&gt;
&lt;br /&gt;
The proposals were moved to http://wiki.sugarlabs.org/go/GSoC/2013/Proposals&lt;br /&gt;
&lt;br /&gt;
= Approved Projects=&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Sugar Core ==&lt;br /&gt;
&lt;br /&gt;
=== Sugar Framework for writing activity in full HTML5 ===&lt;br /&gt;
&lt;br /&gt;
[[File:Sugarhtml5.png|300px]]&lt;br /&gt;
&lt;br /&gt;
The objective is to develop a JavaScript framework allowing to write Sugar activities in full HTML5/JavaScript. The framework will expose to JavaScript an API to call Sugar features:&lt;br /&gt;
* Journal/Datastore,&lt;br /&gt;
* Collaboration/Telepathy,&lt;br /&gt;
* Toolbar handling,&lt;br /&gt;
* Sugar look&amp;amp;feel - for example via a CSS style sheet usable on HTML controls&lt;br /&gt;
* Access to Sugar settings (buddy name, colors, current language, ...),&lt;br /&gt;
* View source.&lt;br /&gt;
Like PhoneGap/Cordova, the framework will come with a template to develop and package easily a new HTML5 activity. A basic tutorial will be include too.&lt;br /&gt;
The work could be inspired by the work done with Enyo Framework in [http://booki.flossmanuals.net/make-your-own-sugar-activities/_draft/_v/1.0/developing-sugar-activities-using-html5/ 1]. By the way, the resulting framework should be JavaScript framework agnostic (no need for jQuery, Enyo, ...). More on this works [[HTML5 activities|here]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Mentor&#039;&#039;: [mailto:lionel@olpc-france.org Lionel Laské]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Co-Mentor&#039;&#039;: Daniel Narvaez&lt;br /&gt;
&lt;br /&gt;
Level: Advanced&lt;br /&gt;
&lt;br /&gt;
Benefits to the Student: A chance to learn from touching almost every corner of an advanced system.&lt;br /&gt;
&lt;br /&gt;
Benefits to the Community: We&#039;ll greatly expand the reach of the project by opening the door to JavaScript programmers. Plus it will force us to clean up our APIs.&lt;br /&gt;
&lt;br /&gt;
Student: Suraj&lt;br /&gt;
&lt;br /&gt;
Wiki:&lt;br /&gt;
&lt;br /&gt;
=== Project sharing website ===&lt;br /&gt;
&lt;br /&gt;
Create a Project Hosting Site similar to the Scratch website where kids can share the projects they have created using various Sugar Activities.  The site should foster collaboration and sharing of projects.  The Web Site should be built using a free web framework so that it can be installed at deployment sites. Some features include:&lt;br /&gt;
&lt;br /&gt;
* Ability to engage and connect with friends and classmates using various  Social Networking sites/techniques.&lt;br /&gt;
* Ability to post projects from various Sugar Activities (ex: Turtle Blocks, Etoys, Memorize, Physics, etc.)&lt;br /&gt;
* Separate landing pages for different audiences (kids, teachers, parents, etc.)&lt;br /&gt;
* Section to share kid created art from projects&lt;br /&gt;
* Ability for users to create galleries (of their own projects, favorite projects, subject specific topics, etc.)&lt;br /&gt;
* Ability to have “private classroom spaces”&lt;br /&gt;
* Tools to support community management of the site&lt;br /&gt;
* Multi-language support&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Contact&#039;&#039;: [[User:MrSteve]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Co-mentor&#039;&#039;: [[User:dogi]]&lt;br /&gt;
&lt;br /&gt;
Level: Advanced&lt;br /&gt;
&lt;br /&gt;
Benefits to the Student: Learn more about web services&lt;br /&gt;
&lt;br /&gt;
Benefits to the Community: We need more mechanisms for sharing ideas and work. This is low-hanging fruit.&lt;br /&gt;
&lt;br /&gt;
Student: Rahul Gaur&lt;br /&gt;
&lt;br /&gt;
Wiki:&lt;br /&gt;
&lt;br /&gt;
=== Implement help mechanism for activities using Mallard ===&lt;br /&gt;
&lt;br /&gt;
[http://projectmallard.org/ Mallard] is a mark-up language that makes it easy to provide user help. It would be a nice feature to add Mallard-like help to activities, accessed through a mechanism similar to the view source mechanism. We need to sort through two issues: integration into Sugar and integration into our i18n / L10n system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Contact&#039;&#039;: [[User:Walter]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Co-mentor&#039;&#039;: [[User:Aneesh Dogra]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Co-mentor&#039;&#039;: [[User:Francis]]&lt;br /&gt;
&lt;br /&gt;
Student: Kalpa Welivitigoda&lt;br /&gt;
&lt;br /&gt;
Wiki page: http://wiki.sugarlabs.org/go/GSoC/2013/MallardHelp&lt;br /&gt;
&lt;br /&gt;
Level: Advanced&lt;br /&gt;
&lt;br /&gt;
Benefits to the Student: Learn about lots of cool tools.&lt;br /&gt;
&lt;br /&gt;
Benefits to the Community: Most of our help is in the wiki and in English. This will enable us to reach our users more directly and in their first language.&lt;br /&gt;
&lt;br /&gt;
=== Social Sugar ===&lt;br /&gt;
&lt;br /&gt;
Design and Develop GUI components that can help Sugar to reflect user&#039;s social interactions from external platforms. A perfect target can be the Group-View that shows user&#039;s friends and their shared activities [http://wiki.sugarlabs.org/go/Human_Interface_Guidelines/The_Laptop_Experience/Zoom_Metaphor#Groups], but it _could_ also show social information about these friends, IE social networks or sharing platforms publications. This would also give this zoom-level added value.&lt;br /&gt;
&lt;br /&gt;
Community members are already working on the backend component to support this feature [http://lists.sugarlabs.org/archive/sugar-devel/2013-March/042055.html]. This is also a great opportunity to complement other GSoC-2013 proposals.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Contact&#039;&#039;: [[User:tch]]&lt;br /&gt;
&lt;br /&gt;
Level: Intermediate&lt;br /&gt;
&lt;br /&gt;
Benefits to the Student: (a) Learn about Sugar&#039;s core, UI Design and web services and (b) interact with community members and other GSoC participants.&lt;br /&gt;
&lt;br /&gt;
Benefits to the Community: Social interaction is a key element in the learning process, therefore we should promote this.&lt;br /&gt;
&lt;br /&gt;
Student: Akshit Khurana&lt;br /&gt;
&lt;br /&gt;
Wiki:&lt;br /&gt;
&lt;br /&gt;
== Sugar Activities ==&lt;br /&gt;
&lt;br /&gt;
=== Python export functionality for Turtle Blocks ===&lt;br /&gt;
&lt;br /&gt;
[[File:TurtleArt.svg]] [[File:Pippy.svg]]&lt;br /&gt;
&lt;br /&gt;
A goal of Turtle Blocks is not just to get children programming, but to launch them out of block world into text-based languages where they can develop more sophisticated programs. While Turtle Blocks is written in Python and can be extended by importing Python modules, it currently exports only in its native block language and in Logo. For this project, we&#039;d want to enable a Python export option so that programmers can take their Turtle projects and extend them into full-fledged Python projects. The hypothesis is that this would lead more children to grow their programming skills beyond simple block programs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Contact&#039;&#039;: [[User:Walter]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Co-mentor&#039;&#039;: Tony Forster&lt;br /&gt;
&lt;br /&gt;
Level: Advanced&lt;br /&gt;
&lt;br /&gt;
Benefits to the Student: Lots of good Python hacking involved&lt;br /&gt;
&lt;br /&gt;
Benefits to the Community: We&#039;ll have a vehicle for studying whether or not we can bring students of programming from block worlds to text-based programming and debugging.&lt;br /&gt;
&lt;br /&gt;
Student: Marion Zepf&lt;br /&gt;
&lt;br /&gt;
Wiki: [[Summer of Code/2013/Turtle Blocks Python export project]]&lt;br /&gt;
&lt;br /&gt;
=== Add recording to Music Keyboard activity ===&lt;br /&gt;
&lt;br /&gt;
[[File:Music keyboard screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
Music Keyboard activity uses part of TamTamMini code to play sounds. Should be good add the capability of record the played sound.&lt;br /&gt;
&lt;br /&gt;
Requires familiarity with Python.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Contact&#039;&#039;: [[User:Godiard]]&lt;br /&gt;
&lt;br /&gt;
Level: Beginner&lt;br /&gt;
&lt;br /&gt;
Benefits to the Student: Learn about python and music libraries (csound)&lt;br /&gt;
&lt;br /&gt;
Benefits to the Community: More shared spaces for expression is aligned with our pedagogical goals.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;More information &#039;&#039;&#039; http://wiki.sugarlabs.org/go/Activities/MusicKeyboard&lt;br /&gt;
&lt;br /&gt;
Student: Anna Rudkovskaya&lt;br /&gt;
&lt;br /&gt;
Wiki:&lt;br /&gt;
&lt;br /&gt;
=== ASL Open Video Chat ===&lt;br /&gt;
&lt;br /&gt;
Open Video Chat is an Free/Open Source video conferencing activity for the XO laptop. This project was originally started in March 2010 with funding from the National Technical Institute for the Deaf in Rochester NY.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Focus&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The primary focus of Open Video Chat is to provide streaming video at frame rates that are suitable for communicating with sign language. This ends up being somewhere between 20 and 30 frames per second.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Current Features&#039;&#039;&#039;&lt;br /&gt;
* 20 FPS video&lt;br /&gt;
* preview window&lt;br /&gt;
* text chat&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Desired Features&#039;&#039;&#039;&lt;br /&gt;
*RTP protocol implementation&lt;br /&gt;
*faster frame rate (30+ FPS)&lt;br /&gt;
*audio&lt;br /&gt;
*higher resolution video&lt;br /&gt;
&lt;br /&gt;
IRC&lt;br /&gt;
* The contributors of Open Video Chat frequent #rit-foss on freenode&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Contact&#039;&#039;: [[User:decause]]&lt;br /&gt;
&lt;br /&gt;
Level: Intermediate/Advanced&lt;br /&gt;
&lt;br /&gt;
Benefits to the Student: Learn about gstreamer video pipelines. Learn about sugar networking stack and services (Telepathy). Learn about Python and Sugar UI.&lt;br /&gt;
&lt;br /&gt;
Benefits to the Community: The Video/Text chat software is nearly complete (90%), it just needs to be ported to latest version of sugar and include new telepathy bindings.&lt;br /&gt;
&lt;br /&gt;
Source Code: [https://github.com/FOSSRIT/Open-Video-chat Github Repository]&lt;br /&gt;
Activity Page: [http://activities.sugarlabs.org/en-US/sugar/addon/4305 A.SL.O]&lt;br /&gt;
&lt;br /&gt;
Student: Casey DeLorme&lt;br /&gt;
&lt;br /&gt;
Wiki:&lt;br /&gt;
&lt;br /&gt;
== Infrastructure ==&lt;br /&gt;
&lt;br /&gt;
=== Translation Server ===&lt;br /&gt;
&lt;br /&gt;
Student: Erik Price&lt;br /&gt;
&lt;br /&gt;
Wiki:&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87887</id>
		<title>Summer of Code/2013/Turtle Blocks Python export</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87887"/>
		<updated>2013-05-03T11:55:18Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: corrected spelling&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My name is [[User:Marion Zepf|Marion Zepf]] and I would like to work on the project [[Summer_of_Code/2013#Python_export_functionality_for_Turtle_Blocks|Python export funtionality for TurtleBlocks]]. Please find my application below.&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
Turtle Blocks teaches children an important skill in today&#039;s world: programming. Its block-based graphical interface makes abstract concepts like loops easy to understand and fun to play with. But it does not yet support the next step in learning: writing code in a &#039;real&#039; programming language. My project fills this gap by automatically converting block programs to Python code. It enables the children to transfer their knowledge to a text-based language and to focus on acquiring the new syntax.&lt;br /&gt;
&lt;br /&gt;
== About me ==&lt;br /&gt;
&lt;br /&gt;
=== What is your name? ===&lt;br /&gt;
Marion Zepf&lt;br /&gt;
&lt;br /&gt;
=== What is your email address? ===&lt;br /&gt;
[mailto:marion.zepf@gmail.com marion.zepf@gmail.com]&lt;br /&gt;
&lt;br /&gt;
=== What is your Sugar Labs wiki username? ===&lt;br /&gt;
[[User:Marion Zepf|Marion Zepf]]&lt;br /&gt;
&lt;br /&gt;
=== What is your IRC nickname? ===&lt;br /&gt;
I do not have a fixed nickname, but I try to use &amp;quot;mzepf&amp;quot; if it is available.&lt;br /&gt;
&lt;br /&gt;
=== What is your primary language? ===&lt;br /&gt;
&#039;&#039;(We have mentors who speak multiple languages and can match you with one of them if you&#039;d prefer.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My native language is German, but I am more comfortable in English when it comes to computers and programming.&lt;br /&gt;
&lt;br /&gt;
=== Where are you located, and what hours do you tend to work? ===&lt;br /&gt;
&#039;&#039;(We also try to match mentors by general time zone if possible.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am located in Stuttgart and Tübingen, Germany. My time zone is Central European Summer Time (CEST) or UTC+02:00 during summer.&lt;br /&gt;
I plan to work on this project Thu-Sun, approximately from noon until midnight.&lt;br /&gt;
&lt;br /&gt;
=== Have you participated in an open-source project before? ===&lt;br /&gt;
&#039;&#039;If so, please send us URLs to your profile pages for those projects, or some other demonstration of the work that you have done in open-source. If not, why do you want to work on an open-source project this summer?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is my first open-source project. In the past, I have benefited from open-source software countless times. Now I want to give something back to the community.&lt;br /&gt;
&lt;br /&gt;
== About my Project ==&lt;br /&gt;
&lt;br /&gt;
=== Project description  ===&lt;br /&gt;
&#039;&#039;What is the name of your project? Describe your project in 10-20 sentences. What are you making? Who are you making it for, and why do they need it? What technologies (programming languages, etc.) will you be using?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Turtle Blocks Python export&#039;&#039;&#039; lets the user export their programming project from the Turtle Blocks activity to a Python script. The generated Python code can be run outside of Turtle Blocks, for example from the command line or in the Pippy IDE.&lt;br /&gt;
&lt;br /&gt;
This tool is designed for users who are already proficient Turtle Block programmers and want to move on to text-based programming. It helps them transfer their knowledge and skills from block-based to text-based programming, as they can see their own creations in a new programming language. Thus, they can focus on the new language rather than the content of the program.&lt;br /&gt;
&lt;br /&gt;
The Python export functionality will be implemented in pure Python, drawing on the internal block code interpreter of Turtle Blocks to convert the blocks to a representation of the program flow. I will then use the &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://docs.python.org/2.6/library/ast.html&amp;lt;/ref&amp;gt; to build the Python syntax tree from this representation. In order to serialize the syntax tree to a string, which can then be written to a file, I plan to use either the &amp;lt;code&amp;gt;codegen&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://dev.pocoo.org/hg/sandbox/file/b2aea937f5bb/ast/codegen.py&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://gist.github.com/mattbasta/791312&amp;lt;/ref&amp;gt; or the &amp;lt;code&amp;gt;unparse&amp;lt;/code&amp;gt; module.&amp;lt;ref&amp;gt;http://svn.python.org/view/python/trunk/Demo/parser/unparse.py?view=markup&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The exported Python code will need to import a few classes from Turtle Blocks to set up a window etc. I will isolate these classes from the Turtle Blocks code, so it can easily be imported into the generated code.&lt;br /&gt;
&lt;br /&gt;
=== What is the timeline for development of your project? ===&lt;br /&gt;
&#039;&#039;The Summer of Code work period is June 17 - September 23; tell us what you will be working on each week. (As the summer goes on, you and your mentor will adjust your schedule, but it&#039;s good to have a plan at the beginning so you have an idea of where you&#039;re headed.) Note that you should probably plan to have something &amp;quot;working and 90% done&amp;quot; by the midterm evaluation (August 2); the last steps always take longer than you think, and we will consider cancelling projects which are not mostly working by then.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== My Background ===&lt;br /&gt;
&#039;&#039;Convince us, in 5-15 sentences, that you will be able to successfully complete your project in the timeline you have described. This is usually where people describe their past experiences, credentials, prior projects, schoolwork, and that sort of thing, but be creative. Link to prior work or other resources as relevant.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am a student of computational linguistics in my 6th semester.&lt;br /&gt;
I have three years of experience in writing Python programs of various kinds - from simple command line utilities to GUI applications (using pygame and tkinter) and code generators for Java code.&lt;br /&gt;
I also have strong competence in the object oriented programming paradigm.&lt;br /&gt;
Moreover, I am familiar with commonly used frameworks and tools like version control software (svn, git), the Eclipse IDE, and autotools.&lt;br /&gt;
I learn quickly, so I expect to acquire good skills in GTK before the start of the coding phase.&lt;br /&gt;
&lt;br /&gt;
Through my linguistic education, I can draw on substantial experience with grammars, parsers, and syntax trees.&lt;br /&gt;
This experience will help me with analyzing the block code and transforming it into Python code.&lt;br /&gt;
&lt;br /&gt;
My interest in educational software was sparked during my work on [http://purl.org/icall/view VIEW] (Visual Input Enhancement of the Web), an online language tutoring system.&lt;br /&gt;
During the past two years, I have made many contributions to VIEW, including, for example, the automatic recognition of main content, headlines, and boilerplate on web pages.&lt;br /&gt;
I also improved the user interface of its browser toolbar, and decreased the server&#039;s response time by enabling multi-threading.&lt;br /&gt;
&lt;br /&gt;
My working style is characterized by a high level of documentation, be it inline comments or commit messages.&lt;br /&gt;
I also keep my code modular, which makes it easy for others to build on my work.&lt;br /&gt;
Thus, the Sugar Labs community can profit ideally from my contribution, even after the end of the GSoC.&lt;br /&gt;
&lt;br /&gt;
== Me and the Community ==&lt;br /&gt;
&lt;br /&gt;
=== Impact on the Sugar Labs community ===&lt;br /&gt;
&#039;&#039;If your project is successfully completed, what will its impact be on the Sugar Labs community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Sugar Labs community, at least one of whom should be a Sugar Labs GSoC mentor. Provide email contact information for non-GSoC mentors.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Many Sugar activities allow exporting the user&#039;s creations as a sound file, a picture, a video, or a simple text file, which can then be imported into other activities. In the case of this project, the user can export their block program to Python code and view, edit, and run it in the Pippy and Terminal activities. Combining several activities to create a single piece of work inspires users&#039; creativity. Moreover, it makes Sugar a coherent system, rather than just an arbitrary collection of activities. Users will view it as a tool kit that helps them realize their ideas, no matter which forms they take. This unlimitedness is an important aspect of Sugar&#039;s quality, and thus it ensures continued interest in Sugar in the future.&lt;br /&gt;
&lt;br /&gt;
[[User:Walter|Walter Bender]], mentor of this project:&amp;lt;br/&amp;gt;&lt;br /&gt;
The primary goal of Turtle Blocks is to engage children in programming, specifically the joy of debugging. But also to give them a sense of empowerment over the tools that they use. Hence Turtle Blocks (as opposed to its sister project Turtle Art) exposes the learner to as much of the system as possible, through sensor blocks, Python blocks, etc. At the same time, Turtle Blocks is not an end in of itself. The further goal is to encourage the learners to move beyond block-based projects and get acquainted with the more expressive text-based languages. This project is an experiment to determine if providing a Python version of the block-based programming environment might provide a stepping stone to making this transition. Until we implement Sugar itself as a Turtle Blocks project, this experiment is a worthwhile bet at turning Sugar users into Sugar developers.&lt;br /&gt;
&lt;br /&gt;
[[User:Rgs|Raúl Gutiérrez Segalés]], Turtle Art contributor:&amp;lt;br/&amp;gt;&lt;br /&gt;
In my mind, the big take away here is that we&#039;ll enable portability of&lt;br /&gt;
Turtle Art projects. Being able to translate TA internal&lt;br /&gt;
code into external languages (initially Python, eventually Javascript&lt;br /&gt;
perhaps, or others) will allow this fundamental learning activity to&lt;br /&gt;
reach other platforms and a much broader audience. The question we&#039;ve&lt;br /&gt;
got in front of us is not if Sugar or Turtle Art belong in the Cloud;&lt;br /&gt;
it&#039;s just how fast can we get there.&amp;lt;br/&amp;gt;&lt;br /&gt;
This project is a key step towards our goal of getting Sugar/Turtle&lt;br /&gt;
Art onto more hands.&lt;br /&gt;
&lt;br /&gt;
=== Sugar pilot deployment ===&lt;br /&gt;
&#039;&#039;Sugar Labs will be working to set up a small (5-30 unit) Sugar pilot near each student project that is accepted to GSoC so that you can immediately see how your work affects children in a deployment. We will make arrangements to either supply or find all the equipment needed. Do you have any ideas on where you would like your deployment to be, who you would like to be involved, and how we can help you and the community in your area begin it?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My old primary school has an immigrant rate of about 80%, and many kids are socially disadvantaged. This results in a big difference in learning speed between individual children in one class, which is problematic for traditional &amp;quot;chalk and talk&amp;quot; teaching methods. I think that Sugar would enable each child to learn at its own pace without feeling left out if they are slower than their classmates. Faster learners can easily move on to other activities when they are done and no longer disturb the lesson because they are bored.&lt;br /&gt;
&lt;br /&gt;
In the first year, the school often faces the difficulty of teaching children who do not speak the class language (German). With its clean graphical interface and recognizable icons, Sugar could help these children understand the material without the need to translate everything into their mother language.&lt;br /&gt;
&lt;br /&gt;
I can set up contact to the school and act as an interpreter if necessary.&lt;br /&gt;
&lt;br /&gt;
=== What will you do if you get stuck on your project and your mentor isn&#039;t around? ===&lt;br /&gt;
&lt;br /&gt;
From experience I know that physical activity often helps me with getting rid of a thinking blockade. So, I will first take a short walk or do some household work to get fresh ideas into my head. If that does not help, I will suspend work on the feature that is causing the problem and work on a different feature in the meantime, until my mentor becomes available again.&lt;br /&gt;
&lt;br /&gt;
=== Keeping the community informed about problems and questions ===&lt;br /&gt;
&#039;&#039;How do you propose you will be keeping the community informed of your progress and any problems or questions you might have over the course of the project?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I plan to document the progress of my work through commit messages in an online repository. When I am faced with an important design decision, I will discuss it with other developers on the mailing list or on IRC. In addition, I will set up a Wiki page to announce the outcomes of such decisions and to keep track of my timeline.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== Screenshot of my Sugar development environment ===&lt;br /&gt;
&#039;&#039;We want to make sure that you can set up a development environment before the summer starts. Please send us a link to a screenshot of your Sugar development environment with the following modification: when you hover over the XO-person icon in the middle of Home view, the drop-down text should have your email in place of &amp;quot;Restart.&amp;quot; See the image on the right for an example. It&#039;s normal to need assistance with this, so please visit our IRC channel, #sugar on irc.freenode.net, and ask for help.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Marion-Zepf_devel-env-screenshot.png|400px|Screenshot of Marion Zepf&#039;s development environment of Sugar with the &#039;restart&#039; label replaced with her email address.]]&lt;br /&gt;
&lt;br /&gt;
=== What is your t-shirt size? ===&lt;br /&gt;
&#039;&#039;(Yes, we know Google asks for this already; humor us.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
S (female)&lt;br /&gt;
&lt;br /&gt;
=== Describe a great learning experience you had as a child. ===&lt;br /&gt;
&lt;br /&gt;
When I looked out of my window, I could see a hill with houses on the top. I would often move my head around, especially up and down, to see how the position of the houses would change with respect to the window frame. It took me a long time, but I eventually figured out that I had to imagine a straight line going out from my eyes to the house I wanted to see. If that line was interrupted by the window frame, I could not see the house. By moving my head around, I would change the angle of the line and some previously hidden houses would become visible. From this experience I learned that I can figure out how things work just by taking a closer look at them and playing around with them.&lt;br /&gt;
&lt;br /&gt;
=== Additional information ===&lt;br /&gt;
&#039;&#039;Is there anything else we should have asked you or anything else that we should know that might make us like you or your project more?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My project will also make Turtle Blocks more attractive for older learners (youths or adults). It allows them to learn the basic concepts of programming first, without having to hassle with the syntax of a text-based programming language. Once they have understood the basics, they can move on to learning the syntax of Python. This way, my project can help increase &#039;programming literacy&#039; all over the world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87886</id>
		<title>Summer of Code/2013/Turtle Blocks Python export</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87886"/>
		<updated>2013-05-03T11:50:48Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: +additional information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My name is [[User:Marion Zepf|Marion Zepf]] and I would like to work on the project [[Summer_of_Code/2013#Python_export_functionality_for_Turtle_Blocks|Python export funtionality for TurtleBlocks]]. Please find my application below.&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
Turtle Blocks teaches children an important skill in today&#039;s world: programming. Its block-based graphical interface makes abstract concepts like loops easy to understand and fun to play with. But it does not yet support the next step in learning: writing code in a &#039;real&#039; programming language. My project fills this gap by automatically converting block programs to Python code. It enables the children to transfer their knowledge to a text-based language and to focus on acquiring the new syntax.&lt;br /&gt;
&lt;br /&gt;
== About me ==&lt;br /&gt;
&lt;br /&gt;
=== What is your name? ===&lt;br /&gt;
Marion Zepf&lt;br /&gt;
&lt;br /&gt;
=== What is your email address? ===&lt;br /&gt;
[mailto:marion.zepf@gmail.com marion.zepf@gmail.com]&lt;br /&gt;
&lt;br /&gt;
=== What is your Sugar Labs wiki username? ===&lt;br /&gt;
[[User:Marion Zepf|Marion Zepf]]&lt;br /&gt;
&lt;br /&gt;
=== What is your IRC nickname? ===&lt;br /&gt;
I do not have a fixed nickname, but I try to use &amp;quot;mzepf&amp;quot; if it is available.&lt;br /&gt;
&lt;br /&gt;
=== What is your primary language? ===&lt;br /&gt;
&#039;&#039;(We have mentors who speak multiple languages and can match you with one of them if you&#039;d prefer.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My native language is German, but I am more comfortable in English when it comes to computers and programming.&lt;br /&gt;
&lt;br /&gt;
=== Where are you located, and what hours do you tend to work? ===&lt;br /&gt;
&#039;&#039;(We also try to match mentors by general time zone if possible.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am located in Stuttgart and Tübingen, Germany. My time zone is Central European Summer Time (CEST) or UTC+02:00 during summer.&lt;br /&gt;
I plan to work on this project Thu-Sun, approximately from noon until midnight.&lt;br /&gt;
&lt;br /&gt;
=== Have you participated in an open-source project before? ===&lt;br /&gt;
&#039;&#039;If so, please send us URLs to your profile pages for those projects, or some other demonstration of the work that you have done in open-source. If not, why do you want to work on an open-source project this summer?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is my first open-source project. In the past, I have benefitted from open-source software countless times. Now I want to give something back to the community.&lt;br /&gt;
&lt;br /&gt;
== About my Project ==&lt;br /&gt;
&lt;br /&gt;
=== Project description  ===&lt;br /&gt;
&#039;&#039;What is the name of your project? Describe your project in 10-20 sentences. What are you making? Who are you making it for, and why do they need it? What technologies (programming languages, etc.) will you be using?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Turtle Blocks Python export&#039;&#039;&#039; lets the user export their programming project from the Turtle Blocks activity to a Python script. The generated Python code can be run outside of Turtle Blocks, for example from the command line or in the Pippy IDE.&lt;br /&gt;
&lt;br /&gt;
This tool is designed for users who are already proficient Turtle Block programmers and want to move on to text-based programming. It helps them transfer their knowledge and skills from block-based to text-based programming, as they can see their own creations in a new programming language. Thus, they can focus on the new language rather than the content of the program.&lt;br /&gt;
&lt;br /&gt;
The Python export functionality will be implemented in pure Python, drawing on the internal block code interpreter of Turtle Blocks to convert the blocks to a representation of the program flow. I will then use the &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://docs.python.org/2.6/library/ast.html&amp;lt;/ref&amp;gt; to build the Python syntax tree from this representation. In order to serialize the syntax tree to a string, which can then be written to a file, I plan to use either the &amp;lt;code&amp;gt;codegen&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://dev.pocoo.org/hg/sandbox/file/b2aea937f5bb/ast/codegen.py&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://gist.github.com/mattbasta/791312&amp;lt;/ref&amp;gt; or the &amp;lt;code&amp;gt;unparse&amp;lt;/code&amp;gt; module.&amp;lt;ref&amp;gt;http://svn.python.org/view/python/trunk/Demo/parser/unparse.py?view=markup&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The exported Python code will need to import a few classes from Turtle Blocks to set up a window etc. I will isolate these classes from the Turtle Blocks code, so it can easily be imported into the generated code.&lt;br /&gt;
&lt;br /&gt;
=== What is the timeline for development of your project? ===&lt;br /&gt;
&#039;&#039;The Summer of Code work period is June 17 - September 23; tell us what you will be working on each week. (As the summer goes on, you and your mentor will adjust your schedule, but it&#039;s good to have a plan at the beginning so you have an idea of where you&#039;re headed.) Note that you should probably plan to have something &amp;quot;working and 90% done&amp;quot; by the midterm evaluation (August 2); the last steps always take longer than you think, and we will consider cancelling projects which are not mostly working by then.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== My Backround ===&lt;br /&gt;
&#039;&#039;Convince us, in 5-15 sentences, that you will be able to successfully complete your project in the timeline you have described. This is usually where people describe their past experiences, credentials, prior projects, schoolwork, and that sort of thing, but be creative. Link to prior work or other resources as relevant.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am a student of computational linguistics in my 6th semester.&lt;br /&gt;
I have three years of experience in writing Python programs of various kinds - from simple command line utilities to GUI applications (using pygame and tkinter) and code generators for Java code.&lt;br /&gt;
I also have strong competence in the object oriented programming paradigm.&lt;br /&gt;
Moreover, I am familiar with commonly used frameworks and tools like version control software (svn, git), the Eclipse IDE, and autotools.&lt;br /&gt;
I learn quickly, so I expect to acquire good skills in GTK before the start of the coding phase.&lt;br /&gt;
&lt;br /&gt;
Through my linguistic education, I can draw on substantial experience with grammars, parsers, and syntax trees.&lt;br /&gt;
This experience will help me with anaylzing the block code and transforming it into Python code.&lt;br /&gt;
&lt;br /&gt;
My interest in educational software was sparked during my work on [http://purl.org/icall/view VIEW] (Visual Input Enhancement of the Web), an online language tutoring system.&lt;br /&gt;
During the past two years, I have made many contributions to VIEW, including, for example, the automatic recognition of main content, headlines, and boilerplate on web pages.&lt;br /&gt;
I also improved the user interface of its browser toolbar, and decreased the server&#039;s response time by enabling multi-threading.&lt;br /&gt;
&lt;br /&gt;
My working style is characterized by a high level of documentation, be it inline comments or commit messages.&lt;br /&gt;
I also keep my code modular, which makes it easy for others to build on my work.&lt;br /&gt;
Thus, the Sugar Labs community can profit ideally from my contribution, even after the end of the GSoC.&lt;br /&gt;
&lt;br /&gt;
== Me and the Community ==&lt;br /&gt;
&lt;br /&gt;
=== Impact on the Sugar Labs community ===&lt;br /&gt;
&#039;&#039;If your project is successfully completed, what will its impact be on the Sugar Labs community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Sugar Labs community, at least one of whom should be a Sugar Labs GSoC mentor. Provide email contact information for non-GSoC mentors.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Many Sugar activities allow exporting the user&#039;s creations as a sound file, a picture, a video, or a simple text file, which can then be imported into other activities. In the case of this project, the user can export their block program to Python code and view, edit, and run it in the Pippy and Terminal activities. Combining several activities to create a single piece of work inspires users&#039; creativity. Moreover, it makes Sugar a coherent system, rather than just an arbitrary collection of activities. Users will view it as a tool kit that helps them realize their ideas, no matter which forms they take. This unlimitedness is an important aspect of Sugar&#039;s quality, and thus it ensures continued interest in Sugar in the future.&lt;br /&gt;
&lt;br /&gt;
[[User:Walter|Walter Bender]], mentor of this project:&amp;lt;br/&amp;gt;&lt;br /&gt;
The primary goal of Turtle Blocks is to engage children in programming, specifically the joy of debugging. But also to give them a sense of empowerment over the tools that they use. Hence Turtle Blocks (as opposed to its sister project Turtle Art) exposes the learner to as much of the system as possible, through sensor blocks, Python blocks, etc. At the same time, Turtle Blocks is not an end in of itself. The further goal is to encourage the learners to move beyond block-based projects and get acquainted with the more expressive text-based languages. This project is an experiment to determine if providing a Python version of the block-based programming environment might provide a stepping stone to making this transition. Until we implement Sugar itself as a Turtle Blocks project, this experiment is a worthwhile bet at turning Sugar users into Sugar developers.&lt;br /&gt;
&lt;br /&gt;
[[User:Rgs|Raúl Gutiérrez Segalés]], Turtle Art contributor:&amp;lt;br/&amp;gt;&lt;br /&gt;
In my mind, the big take away here is that we&#039;ll enable portability of&lt;br /&gt;
Turtle Art projects. Being able to translate TA internal&lt;br /&gt;
code into external languages (initially Python, eventually Javascript&lt;br /&gt;
perhaps, or others) will allow this fundamental learning activity to&lt;br /&gt;
reach other platforms and a much broader audience. The question we&#039;ve&lt;br /&gt;
got in front of us is not if Sugar or Turtle Art belong in the Cloud;&lt;br /&gt;
it&#039;s just how fast can we get there.&amp;lt;br/&amp;gt;&lt;br /&gt;
This project is a key step towards our goal of getting Sugar/Turtle&lt;br /&gt;
Art onto more hands.&lt;br /&gt;
&lt;br /&gt;
=== Sugar pilot deployment ===&lt;br /&gt;
&#039;&#039;Sugar Labs will be working to set up a small (5-30 unit) Sugar pilot near each student project that is accepted to GSoC so that you can immediately see how your work affects children in a deployment. We will make arrangements to either supply or find all the equipment needed. Do you have any ideas on where you would like your deployment to be, who you would like to be involved, and how we can help you and the community in your area begin it?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My old primary school has an immigrant rate of about 80%, and many kids are socially disadvantaged. This results in a big difference in learning speed between individual children in one class, which is problematic for traditional &amp;quot;chalk and talk&amp;quot; teaching methods. I think that Sugar would enable each child to learn at its own pace without feeling left out if they are slower than their classmates. Faster learners can easily move on to other activities when they are done and no longer disturb the lesson because they are bored.&lt;br /&gt;
&lt;br /&gt;
In the first year, the school often faces the difficulty of teaching children who do not speak the class language (German). With its clean graphical interface and recognizable icons, Sugar could help these children understand the material without the need to translate everyhing into their mother language.&lt;br /&gt;
&lt;br /&gt;
I can set up contact to the school and act as an interpreter if necessary.&lt;br /&gt;
&lt;br /&gt;
=== What will you do if you get stuck on your project and your mentor isn&#039;t around? ===&lt;br /&gt;
&lt;br /&gt;
From experience I know that physical activity often helps me with getting rid of a thinking blockade. So, I will first take a short walk or do some household work to get fresh ideas into my head. If that does not help, I will suspend work on the feature that is causing the problem and work on a different feature in the meantime, until my mentor becomes available again.&lt;br /&gt;
&lt;br /&gt;
=== Keeping the community informed about problems and questions ===&lt;br /&gt;
&#039;&#039;How do you propose you will be keeping the community informed of your progress and any problems or questions you might have over the course of the project?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I plan to document the progress of my work through commit messages in an online repository. When I am faced with an important design decision, I will discuss it with other developers on the mailing list or on IRC. In addition, I will set up a Wiki page to announce the outcomes of such decisions and to keep track of my timeline.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== Screenshot of my Sugar development environment ===&lt;br /&gt;
&#039;&#039;We want to make sure that you can set up a development environment before the summer starts. Please send us a link to a screenshot of your Sugar development environment with the following modification: when you hover over the XO-person icon in the middle of Home view, the drop-down text should have your email in place of &amp;quot;Restart.&amp;quot; See the image on the right for an example. It&#039;s normal to need assistance with this, so please visit our IRC channel, #sugar on irc.freenode.net, and ask for help.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Marion-Zepf_devel-env-screenshot.png|400px|Screenshot of Marion Zepf&#039;s development environment of Sugar with the &#039;restart&#039; label replaced with her email address.]]&lt;br /&gt;
&lt;br /&gt;
=== What is your t-shirt size? ===&lt;br /&gt;
&#039;&#039;(Yes, we know Google asks for this already; humor us.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
S (female)&lt;br /&gt;
&lt;br /&gt;
=== Describe a great learning experience you had as a child. ===&lt;br /&gt;
&lt;br /&gt;
When I looked out of my window, I could see a hill with houses on the top. I would often move my head around, especially up and down, to see how the position of the houses would change with respect to the window frame. It took me a long time, but I eventually figured out that I had to imagine a straight line going out from my eyes to the house I wanted to see. If that line was interrupted by the window frame, I could not see the house. By moving my head around, I would change the angle of the line and some previously hidden houses would become visible. From this experience I learned that I can figure out how things work just by taking a closer look at them and playing around with them.&lt;br /&gt;
&lt;br /&gt;
=== Additional information ===&lt;br /&gt;
&#039;&#039;Is there anything else we should have asked you or anything else that we should know that might make us like you or your project more?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My project will also make Turtle Blocks more attractive for older learners (youths or adults). It allows them to learn the basic concepts of programming first, without having to hassle with the syntax of a text-based programming language. Once they have understood the basics, they can move on to learning the syntax of Python. This way, my project can help increase &#039;programming literacy&#039; all over the world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87884</id>
		<title>Summer of Code/2013/Turtle Blocks Python export</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87884"/>
		<updated>2013-05-03T10:45:04Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: timeline: removing my notes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My name is [[User:Marion Zepf|Marion Zepf]] and I would like to work on the project [[Summer_of_Code/2013#Python_export_functionality_for_Turtle_Blocks|Python export funtionality for TurtleBlocks]]. Please find my application below.&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
Turtle Blocks teaches children an important skill in today&#039;s world: programming. Its block-based graphical interface makes abstract concepts like loops easy to understand and fun to play with. But it does not yet support the next step in learning: writing code in a &#039;real&#039; programming language. My project fills this gap by automatically converting block programs to Python code. It enables the children to transfer their knowledge to a text-based language and to focus on acquiring the new syntax.&lt;br /&gt;
&lt;br /&gt;
== About me ==&lt;br /&gt;
&lt;br /&gt;
=== What is your name? ===&lt;br /&gt;
Marion Zepf&lt;br /&gt;
&lt;br /&gt;
=== What is your email address? ===&lt;br /&gt;
[mailto:marion.zepf@gmail.com marion.zepf@gmail.com]&lt;br /&gt;
&lt;br /&gt;
=== What is your Sugar Labs wiki username? ===&lt;br /&gt;
[[User:Marion Zepf|Marion Zepf]]&lt;br /&gt;
&lt;br /&gt;
=== What is your IRC nickname? ===&lt;br /&gt;
I do not have a fixed nickname, but I try to use &amp;quot;mzepf&amp;quot; if it is available.&lt;br /&gt;
&lt;br /&gt;
=== What is your primary language? ===&lt;br /&gt;
&#039;&#039;(We have mentors who speak multiple languages and can match you with one of them if you&#039;d prefer.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My native language is German, but I am more comfortable in English when it comes to computers and programming.&lt;br /&gt;
&lt;br /&gt;
=== Where are you located, and what hours do you tend to work? ===&lt;br /&gt;
&#039;&#039;(We also try to match mentors by general time zone if possible.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am located in Stuttgart and Tübingen, Germany. My time zone is Central European Summer Time (CEST) or UTC+02:00 during summer.&lt;br /&gt;
I plan to work on this project Thu-Sun, approximately from noon until midnight.&lt;br /&gt;
&lt;br /&gt;
=== Have you participated in an open-source project before? ===&lt;br /&gt;
&#039;&#039;If so, please send us URLs to your profile pages for those projects, or some other demonstration of the work that you have done in open-source. If not, why do you want to work on an open-source project this summer?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is my first open-source project. In the past, I have benefitted from open-source software countless times. Now I want to give something back to the community.&lt;br /&gt;
&lt;br /&gt;
== About my Project ==&lt;br /&gt;
&lt;br /&gt;
=== Project description  ===&lt;br /&gt;
&#039;&#039;What is the name of your project? Describe your project in 10-20 sentences. What are you making? Who are you making it for, and why do they need it? What technologies (programming languages, etc.) will you be using?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Turtle Blocks Python export&#039;&#039;&#039; lets the user export their programming project from the Turtle Blocks activity to a Python script. The generated Python code can be run outside of Turtle Blocks, for example from the command line or in the Pippy IDE.&lt;br /&gt;
&lt;br /&gt;
This tool is designed for users who are already proficient Turtle Block programmers and want to move on to text-based programming. It helps them transfer their knowledge and skills from block-based to text-based programming, as they can see their own creations in a new programming language. Thus, they can focus on the new language rather than the content of the program.&lt;br /&gt;
&lt;br /&gt;
The Python export functionality will be implemented in pure Python, drawing on the internal block code interpreter of Turtle Blocks to convert the blocks to a representation of the program flow. I will then use the &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://docs.python.org/2.6/library/ast.html&amp;lt;/ref&amp;gt; to build the Python syntax tree from this representation. In order to serialize the syntax tree to a string, which can then be written to a file, I plan to use either the &amp;lt;code&amp;gt;codegen&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://dev.pocoo.org/hg/sandbox/file/b2aea937f5bb/ast/codegen.py&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://gist.github.com/mattbasta/791312&amp;lt;/ref&amp;gt; or the &amp;lt;code&amp;gt;unparse&amp;lt;/code&amp;gt; module.&amp;lt;ref&amp;gt;http://svn.python.org/view/python/trunk/Demo/parser/unparse.py?view=markup&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The exported Python code will need to import a few classes from Turtle Blocks to set up a window etc. I will isolate these classes from the Turtle Blocks code, so it can easily be imported into the generated code.&lt;br /&gt;
&lt;br /&gt;
=== What is the timeline for development of your project? ===&lt;br /&gt;
&#039;&#039;The Summer of Code work period is June 17 - September 23; tell us what you will be working on each week. (As the summer goes on, you and your mentor will adjust your schedule, but it&#039;s good to have a plan at the beginning so you have an idea of where you&#039;re headed.) Note that you should probably plan to have something &amp;quot;working and 90% done&amp;quot; by the midterm evaluation (August 2); the last steps always take longer than you think, and we will consider cancelling projects which are not mostly working by then.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&amp;lt;!-- These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code. --&amp;gt;&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== My Backround ===&lt;br /&gt;
&#039;&#039;Convince us, in 5-15 sentences, that you will be able to successfully complete your project in the timeline you have described. This is usually where people describe their past experiences, credentials, prior projects, schoolwork, and that sort of thing, but be creative. Link to prior work or other resources as relevant.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am a student of computational linguistics in my 6th semester.&lt;br /&gt;
I have three years of experience in writing Python programs of various kinds - from simple command line utilities to GUI applications (using pygame and tkinter) and code generators for Java code.&lt;br /&gt;
I also have strong competence in the object oriented programming paradigm.&lt;br /&gt;
Moreover, I am familiar with commonly used frameworks and tools like version control software (svn, git), the Eclipse IDE, and autotools.&lt;br /&gt;
I learn quickly, so I expect to acquire good skills in GTK before the start of the coding phase.&lt;br /&gt;
&lt;br /&gt;
Through my linguistic education, I can draw on substantial experience with grammars, parsers, and syntax trees.&lt;br /&gt;
This experience will help me with anaylzing the block code and transforming it into Python code.&lt;br /&gt;
&lt;br /&gt;
My interest in educational software was sparked during my work on [http://purl.org/icall/view VIEW] (Visual Input Enhancement of the Web), an online language tutoring system.&lt;br /&gt;
During the past two years, I have made many contributions to VIEW, including, for example, the automatic recognition of main content, headlines, and boilerplate on web pages.&lt;br /&gt;
I also improved the user interface of its browser toolbar, and decreased the server&#039;s response time by enabling multi-threading.&lt;br /&gt;
&lt;br /&gt;
My working style is characterized by a high level of documentation, be it inline comments or commit messages.&lt;br /&gt;
I also keep my code modular, which makes it easy for others to build on my work.&lt;br /&gt;
Thus, the Sugar Labs community can profit ideally from my contribution, even after the end of the GSoC.&lt;br /&gt;
&lt;br /&gt;
== Me and the Community ==&lt;br /&gt;
&lt;br /&gt;
=== Impact on the Sugar Labs community ===&lt;br /&gt;
&#039;&#039;If your project is successfully completed, what will its impact be on the Sugar Labs community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Sugar Labs community, at least one of whom should be a Sugar Labs GSoC mentor. Provide email contact information for non-GSoC mentors.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Many Sugar activities allow exporting the user&#039;s creations as a sound file, a picture, a video, or a simple text file, which can then be imported into other activities. In the case of this project, the user can export their block program to Python code and view, edit, and run it in the Pippy and Terminal activities. Combining several activities to create a single piece of work inspires users&#039; creativity. Moreover, it makes Sugar a coherent system, rather than just an arbitrary collection of activities. Users will view it as a tool kit that helps them realize their ideas, no matter which forms they take. This unlimitedness is an important aspect of Sugar&#039;s quality, and thus it ensures continued interest in Sugar in the future.&lt;br /&gt;
&lt;br /&gt;
[[User:Walter|Walter Bender]], mentor of this project:&amp;lt;br/&amp;gt;&lt;br /&gt;
The primary goal of Turtle Blocks is to engage children in programming, specifically the joy of debugging. But also to give them a sense of empowerment over the tools that they use. Hence Turtle Blocks (as opposed to its sister project Turtle Art) exposes the learner to as much of the system as possible, through sensor blocks, Python blocks, etc. At the same time, Turtle Blocks is not an end in of itself. The further goal is to encourage the learners to move beyond block-based projects and get acquainted with the more expressive text-based languages. This project is an experiment to determine if providing a Python version of the block-based programming environment might provide a stepping stone to making this transition. Until we implement Sugar itself as a Turtle Blocks project, this experiment is a worthwhile bet at turning Sugar users into Sugar developers.&lt;br /&gt;
&lt;br /&gt;
[[User:Rgs|Raúl Gutiérrez Segalés]], Turtle Art contributor:&amp;lt;br/&amp;gt;&lt;br /&gt;
In my mind, the big take away here is that we&#039;ll enable portability of&lt;br /&gt;
Turtle Art projects. Being able to translate TA internal&lt;br /&gt;
code into external languages (initially Python, eventually Javascript&lt;br /&gt;
perhaps, or others) will allow this fundamental learning activity to&lt;br /&gt;
reach other platforms and a much broader audience. The question we&#039;ve&lt;br /&gt;
got in front of us is not if Sugar or Turtle Art belong in the Cloud;&lt;br /&gt;
it&#039;s just how fast can we get there.&amp;lt;br/&amp;gt;&lt;br /&gt;
This project is a key step towards our goal of getting Sugar/Turtle&lt;br /&gt;
Art onto more hands.&lt;br /&gt;
&lt;br /&gt;
=== Sugar pilot deployment ===&lt;br /&gt;
&#039;&#039;Sugar Labs will be working to set up a small (5-30 unit) Sugar pilot near each student project that is accepted to GSoC so that you can immediately see how your work affects children in a deployment. We will make arrangements to either supply or find all the equipment needed. Do you have any ideas on where you would like your deployment to be, who you would like to be involved, and how we can help you and the community in your area begin it?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My old primary school has an immigrant rate of about 80%, and many kids are socially disadvantaged. This results in a big difference in learning speed between individual children in one class, which is problematic for traditional &amp;quot;chalk and talk&amp;quot; teaching methods. I think that Sugar would enable each child to learn at its own pace without feeling left out if they are slower than their classmates. Faster learners can easily move on to other activities when they are done and no longer disturb the lesson because they are bored.&lt;br /&gt;
&lt;br /&gt;
In the first year, the school often faces the difficulty of teaching children who do not speak the class language (German). With its clean graphical interface and recognizable icons, Sugar could help these children understand the material without the need to translate everyhing into their mother language.&lt;br /&gt;
&lt;br /&gt;
I can set up contact to the school and act as an interpreter if necessary.&lt;br /&gt;
&lt;br /&gt;
=== What will you do if you get stuck on your project and your mentor isn&#039;t around? ===&lt;br /&gt;
&lt;br /&gt;
From experience I know that physical activity often helps me with getting rid of a thinking blockade. So, I will first take a short walk or do some household work to get fresh ideas into my head. If that does not help, I will suspend work on the feature that is causing the problem and work on a different feature in the meantime, until my mentor becomes available again.&lt;br /&gt;
&lt;br /&gt;
=== Keeping the community informed about problems and questions ===&lt;br /&gt;
&#039;&#039;How do you propose you will be keeping the community informed of your progress and any problems or questions you might have over the course of the project?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I plan to document the progress of my work through commit messages in an online repository. When I am faced with an important design decision, I will discuss it with other developers on the mailing list or on IRC. In addition, I will set up a Wiki page to announce the outcomes of such decisions and to keep track of my timeline.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== Screenshot of my Sugar development environment ===&lt;br /&gt;
&#039;&#039;We want to make sure that you can set up a development environment before the summer starts. Please send us a link to a screenshot of your Sugar development environment with the following modification: when you hover over the XO-person icon in the middle of Home view, the drop-down text should have your email in place of &amp;quot;Restart.&amp;quot; See the image on the right for an example. It&#039;s normal to need assistance with this, so please visit our IRC channel, #sugar on irc.freenode.net, and ask for help.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Marion-Zepf_devel-env-screenshot.png|400px|Screenshot of Marion Zepf&#039;s development environment of Sugar with the &#039;restart&#039; label replaced with her email address.]]&lt;br /&gt;
&lt;br /&gt;
=== What is your t-shirt size? ===&lt;br /&gt;
&#039;&#039;(Yes, we know Google asks for this already; humor us.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
S (female)&lt;br /&gt;
&lt;br /&gt;
=== Describe a great learning experience you had as a child. ===&lt;br /&gt;
&lt;br /&gt;
When I looked out of my window, I could see a hill with houses on the top. I would often move my head around, especially up and down, to see how the position of the houses would change with respect to the window frame. It took me a long time, but I eventually figured out that I had to imagine a straight line going out from my eyes to the house I wanted to see. If that line was interrupted by the window frame, I could not see the house. By moving my head around, I would change the angle of the line and some previously hidden houses would become visible. From this experience I learned that I can figure out how things work just by taking a closer look at them and playing around with them.&lt;br /&gt;
&lt;br /&gt;
=== Additional information ===&lt;br /&gt;
&#039;&#039;Is there anything else we should have asked you or anything else that we should know that might make us like you or your project more?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87883</id>
		<title>Summer of Code/2013/Turtle Blocks Python export</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87883"/>
		<updated>2013-05-03T10:42:42Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: +abstract, +learning experience as a child&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My name is [[User:Marion Zepf|Marion Zepf]] and I would like to work on the project [[Summer_of_Code/2013#Python_export_functionality_for_Turtle_Blocks|Python export funtionality for TurtleBlocks]]. Please find my application below.&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
Turtle Blocks teaches children an important skill in today&#039;s world: programming. Its block-based graphical interface makes abstract concepts like loops easy to understand and fun to play with. But it does not yet support the next step in learning: writing code in a &#039;real&#039; programming language. My project fills this gap by automatically converting block programs to Python code. It enables the children to transfer their knowledge to a text-based language and to focus on acquiring the new syntax.&lt;br /&gt;
&lt;br /&gt;
== About me ==&lt;br /&gt;
&lt;br /&gt;
=== What is your name? ===&lt;br /&gt;
Marion Zepf&lt;br /&gt;
&lt;br /&gt;
=== What is your email address? ===&lt;br /&gt;
[mailto:marion.zepf@gmail.com marion.zepf@gmail.com]&lt;br /&gt;
&lt;br /&gt;
=== What is your Sugar Labs wiki username? ===&lt;br /&gt;
[[User:Marion Zepf|Marion Zepf]]&lt;br /&gt;
&lt;br /&gt;
=== What is your IRC nickname? ===&lt;br /&gt;
I do not have a fixed nickname, but I try to use &amp;quot;mzepf&amp;quot; if it is available.&lt;br /&gt;
&lt;br /&gt;
=== What is your primary language? ===&lt;br /&gt;
&#039;&#039;(We have mentors who speak multiple languages and can match you with one of them if you&#039;d prefer.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My native language is German, but I am more comfortable in English when it comes to computers and programming.&lt;br /&gt;
&lt;br /&gt;
=== Where are you located, and what hours do you tend to work? ===&lt;br /&gt;
&#039;&#039;(We also try to match mentors by general time zone if possible.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am located in Stuttgart and Tübingen, Germany. My time zone is Central European Summer Time (CEST) or UTC+02:00 during summer.&lt;br /&gt;
I plan to work on this project Thu-Sun, approximately from noon until midnight.&lt;br /&gt;
&lt;br /&gt;
=== Have you participated in an open-source project before? ===&lt;br /&gt;
&#039;&#039;If so, please send us URLs to your profile pages for those projects, or some other demonstration of the work that you have done in open-source. If not, why do you want to work on an open-source project this summer?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is my first open-source project. In the past, I have benefitted from open-source software countless times. Now I want to give something back to the community.&lt;br /&gt;
&lt;br /&gt;
== About my Project ==&lt;br /&gt;
&lt;br /&gt;
=== Project description  ===&lt;br /&gt;
&#039;&#039;What is the name of your project? Describe your project in 10-20 sentences. What are you making? Who are you making it for, and why do they need it? What technologies (programming languages, etc.) will you be using?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Turtle Blocks Python export&#039;&#039;&#039; lets the user export their programming project from the Turtle Blocks activity to a Python script. The generated Python code can be run outside of Turtle Blocks, for example from the command line or in the Pippy IDE.&lt;br /&gt;
&lt;br /&gt;
This tool is designed for users who are already proficient Turtle Block programmers and want to move on to text-based programming. It helps them transfer their knowledge and skills from block-based to text-based programming, as they can see their own creations in a new programming language. Thus, they can focus on the new language rather than the content of the program.&lt;br /&gt;
&lt;br /&gt;
The Python export functionality will be implemented in pure Python, drawing on the internal block code interpreter of Turtle Blocks to convert the blocks to a representation of the program flow. I will then use the &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://docs.python.org/2.6/library/ast.html&amp;lt;/ref&amp;gt; to build the Python syntax tree from this representation. In order to serialize the syntax tree to a string, which can then be written to a file, I plan to use either the &amp;lt;code&amp;gt;codegen&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://dev.pocoo.org/hg/sandbox/file/b2aea937f5bb/ast/codegen.py&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://gist.github.com/mattbasta/791312&amp;lt;/ref&amp;gt; or the &amp;lt;code&amp;gt;unparse&amp;lt;/code&amp;gt; module.&amp;lt;ref&amp;gt;http://svn.python.org/view/python/trunk/Demo/parser/unparse.py?view=markup&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;!--TODO: decide for one--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The exported Python code will need to import a few classes from Turtle Blocks to set up a window etc. I will isolate these classes from the Turtle Blocks code, so it can easily be imported into the generated code.&lt;br /&gt;
&lt;br /&gt;
=== What is the timeline for development of your project? ===&lt;br /&gt;
&#039;&#039;The Summer of Code work period is June 17 - September 23; tell us what you will be working on each week. (As the summer goes on, you and your mentor will adjust your schedule, but it&#039;s good to have a plan at the beginning so you have an idea of where you&#039;re headed.) Note that you should probably plan to have something &amp;quot;working and 90% done&amp;quot; by the midterm evaluation (August 2); the last steps always take longer than you think, and we will consider cancelling projects which are not mostly working by then.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt; These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code.&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== My Backround ===&lt;br /&gt;
&#039;&#039;Convince us, in 5-15 sentences, that you will be able to successfully complete your project in the timeline you have described. This is usually where people describe their past experiences, credentials, prior projects, schoolwork, and that sort of thing, but be creative. Link to prior work or other resources as relevant.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am a student of computational linguistics in my 6th semester.&lt;br /&gt;
I have three years of experience in writing Python programs of various kinds - from simple command line utilities to GUI applications (using pygame and tkinter) and code generators for Java code.&lt;br /&gt;
I also have strong competence in the object oriented programming paradigm.&lt;br /&gt;
Moreover, I am familiar with commonly used frameworks and tools like version control software (svn, git), the Eclipse IDE, and autotools.&lt;br /&gt;
I learn quickly, so I expect to acquire good skills in GTK before the start of the coding phase.&lt;br /&gt;
&lt;br /&gt;
Through my linguistic education, I can draw on substantial experience with grammars, parsers, and syntax trees.&lt;br /&gt;
This experience will help me with anaylzing the block code and transforming it into Python code.&lt;br /&gt;
&lt;br /&gt;
My interest in educational software was sparked during my work on [http://purl.org/icall/view VIEW] (Visual Input Enhancement of the Web), an online language tutoring system.&lt;br /&gt;
During the past two years, I have made many contributions to VIEW, including, for example, the automatic recognition of main content, headlines, and boilerplate on web pages.&lt;br /&gt;
I also improved the user interface of its browser toolbar, and decreased the server&#039;s response time by enabling multi-threading.&lt;br /&gt;
&lt;br /&gt;
My working style is characterized by a high level of documentation, be it inline comments or commit messages.&lt;br /&gt;
I also keep my code modular, which makes it easy for others to build on my work.&lt;br /&gt;
Thus, the Sugar Labs community can profit ideally from my contribution, even after the end of the GSoC.&lt;br /&gt;
&lt;br /&gt;
== Me and the Community ==&lt;br /&gt;
&lt;br /&gt;
=== Impact on the Sugar Labs community ===&lt;br /&gt;
&#039;&#039;If your project is successfully completed, what will its impact be on the Sugar Labs community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Sugar Labs community, at least one of whom should be a Sugar Labs GSoC mentor. Provide email contact information for non-GSoC mentors.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Many Sugar activities allow exporting the user&#039;s creations as a sound file, a picture, a video, or a simple text file, which can then be imported into other activities. In the case of this project, the user can export their block program to Python code and view, edit, and run it in the Pippy and Terminal activities. Combining several activities to create a single piece of work inspires users&#039; creativity. Moreover, it makes Sugar a coherent system, rather than just an arbitrary collection of activities. Users will view it as a tool kit that helps them realize their ideas, no matter which forms they take. This unlimitedness is an important aspect of Sugar&#039;s quality, and thus it ensures continued interest in Sugar in the future.&lt;br /&gt;
&lt;br /&gt;
[[User:Walter|Walter Bender]], mentor of this project:&amp;lt;br/&amp;gt;&lt;br /&gt;
The primary goal of Turtle Blocks is to engage children in programming, specifically the joy of debugging. But also to give them a sense of empowerment over the tools that they use. Hence Turtle Blocks (as opposed to its sister project Turtle Art) exposes the learner to as much of the system as possible, through sensor blocks, Python blocks, etc. At the same time, Turtle Blocks is not an end in of itself. The further goal is to encourage the learners to move beyond block-based projects and get acquainted with the more expressive text-based languages. This project is an experiment to determine if providing a Python version of the block-based programming environment might provide a stepping stone to making this transition. Until we implement Sugar itself as a Turtle Blocks project, this experiment is a worthwhile bet at turning Sugar users into Sugar developers.&lt;br /&gt;
&lt;br /&gt;
[[User:Rgs|Raúl Gutiérrez Segalés]], Turtle Art contributor:&amp;lt;br/&amp;gt;&lt;br /&gt;
In my mind, the big take away here is that we&#039;ll enable portability of&lt;br /&gt;
Turtle Art projects. Being able to translate TA internal&lt;br /&gt;
code into external languages (initially Python, eventually Javascript&lt;br /&gt;
perhaps, or others) will allow this fundamental learning activity to&lt;br /&gt;
reach other platforms and a much broader audience. The question we&#039;ve&lt;br /&gt;
got in front of us is not if Sugar or Turtle Art belong in the Cloud;&lt;br /&gt;
it&#039;s just how fast can we get there.&amp;lt;br/&amp;gt;&lt;br /&gt;
This project is a key step towards our goal of getting Sugar/Turtle&lt;br /&gt;
Art onto more hands.&lt;br /&gt;
&lt;br /&gt;
=== Sugar pilot deployment ===&lt;br /&gt;
&#039;&#039;Sugar Labs will be working to set up a small (5-30 unit) Sugar pilot near each student project that is accepted to GSoC so that you can immediately see how your work affects children in a deployment. We will make arrangements to either supply or find all the equipment needed. Do you have any ideas on where you would like your deployment to be, who you would like to be involved, and how we can help you and the community in your area begin it?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My old primary school has an immigrant rate of about 80%, and many kids are socially disadvantaged. This results in a big difference in learning speed between individual children in one class, which is problematic for traditional &amp;quot;chalk and talk&amp;quot; teaching methods. I think that Sugar would enable each child to learn at its own pace without feeling left out if they are slower than their classmates. Faster learners can easily move on to other activities when they are done and no longer disturb the lesson because they are bored.&lt;br /&gt;
&lt;br /&gt;
In the first year, the school often faces the difficulty of teaching children who do not speak the class language (German). With its clean graphical interface and recognizable icons, Sugar could help these children understand the material without the need to translate everyhing into their mother language.&lt;br /&gt;
&lt;br /&gt;
I can set up contact to the school and act as an interpreter if necessary.&lt;br /&gt;
&lt;br /&gt;
=== What will you do if you get stuck on your project and your mentor isn&#039;t around? ===&lt;br /&gt;
&lt;br /&gt;
From experience I know that physical activity often helps me with getting rid of a thinking blockade. So, I will first take a short walk or do some household work to get fresh ideas into my head. If that does not help, I will suspend work on the feature that is causing the problem and work on a different feature in the meantime, until my mentor becomes available again.&lt;br /&gt;
&lt;br /&gt;
=== Keeping the community informed about problems and questions ===&lt;br /&gt;
&#039;&#039;How do you propose you will be keeping the community informed of your progress and any problems or questions you might have over the course of the project?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I plan to document the progress of my work through commit messages in an online repository. When I am faced with an important design decision, I will discuss it with other developers on the mailing list or on IRC. In addition, I will set up a Wiki page to announce the outcomes of such decisions and to keep track of my timeline.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== Screenshot of my Sugar development environment ===&lt;br /&gt;
&#039;&#039;We want to make sure that you can set up a development environment before the summer starts. Please send us a link to a screenshot of your Sugar development environment with the following modification: when you hover over the XO-person icon in the middle of Home view, the drop-down text should have your email in place of &amp;quot;Restart.&amp;quot; See the image on the right for an example. It&#039;s normal to need assistance with this, so please visit our IRC channel, #sugar on irc.freenode.net, and ask for help.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Marion-Zepf_devel-env-screenshot.png|400px|Screenshot of Marion Zepf&#039;s development environment of Sugar with the &#039;restart&#039; label replaced with her email address.]]&lt;br /&gt;
&lt;br /&gt;
=== What is your t-shirt size? ===&lt;br /&gt;
&#039;&#039;(Yes, we know Google asks for this already; humor us.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
S (female)&lt;br /&gt;
&lt;br /&gt;
=== Describe a great learning experience you had as a child. ===&lt;br /&gt;
&lt;br /&gt;
When I looked out of my window, I could see a hill with houses on the top. I would often move my head around, especially up and down, to see how the position of the houses would change with respect to the window frame. It took me a long time, but I eventually figured out that I had to imagine a straight line going out from my eyes to the house I wanted to see. If that line was interrupted by the window frame, I could not see the house. By moving my head around, I would change the angle of the line and some previously hidden houses would become visible. From this experience I learned that I can figure out how things work just by taking a closer look at them and playing around with them.&lt;br /&gt;
&lt;br /&gt;
=== Additional information ===&lt;br /&gt;
&#039;&#039;Is there anything else we should have asked you or anything else that we should know that might make us like you or your project more?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87876</id>
		<title>Summer of Code/2013/Turtle Blocks Python export</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87876"/>
		<updated>2013-05-02T20:55:35Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: grammar correction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My name is [[User:Marion Zepf|Marion Zepf]] and I would like to work on the project [[Summer_of_Code/2013#Python_export_functionality_for_Turtle_Blocks|Python export funtionality for TurtleBlocks]]. Please find my application below.&lt;br /&gt;
&lt;br /&gt;
== About me ==&lt;br /&gt;
&lt;br /&gt;
=== What is your name? ===&lt;br /&gt;
Marion Zepf&lt;br /&gt;
&lt;br /&gt;
=== What is your email address? ===&lt;br /&gt;
[mailto:marion.zepf@gmail.com marion.zepf@gmail.com]&lt;br /&gt;
&lt;br /&gt;
=== What is your Sugar Labs wiki username? ===&lt;br /&gt;
[[User:Marion Zepf|Marion Zepf]]&lt;br /&gt;
&lt;br /&gt;
=== What is your IRC nickname? ===&lt;br /&gt;
I do not have a fixed nickname, but I try to use &amp;quot;mzepf&amp;quot; if it is available.&lt;br /&gt;
&lt;br /&gt;
=== What is your primary language? ===&lt;br /&gt;
&#039;&#039;(We have mentors who speak multiple languages and can match you with one of them if you&#039;d prefer.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My native language is German, but I am more comfortable in English when it comes to computers and programming.&lt;br /&gt;
&lt;br /&gt;
=== Where are you located, and what hours do you tend to work? ===&lt;br /&gt;
&#039;&#039;(We also try to match mentors by general time zone if possible.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am located in Stuttgart and Tübingen, Germany. My time zone is Central European Summer Time (CEST) or UTC+02:00 during summer.&lt;br /&gt;
I plan to work on this project Thu-Sun, approximately from noon until midnight.&lt;br /&gt;
&lt;br /&gt;
=== Have you participated in an open-source project before? ===&lt;br /&gt;
&#039;&#039;If so, please send us URLs to your profile pages for those projects, or some other demonstration of the work that you have done in open-source. If not, why do you want to work on an open-source project this summer?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is my first open-source project. In the past, I have benefitted from open-source software countless times. Now I want to give something back to the community.&lt;br /&gt;
&lt;br /&gt;
== About my Project ==&lt;br /&gt;
&lt;br /&gt;
=== Project description  ===&lt;br /&gt;
&#039;&#039;What is the name of your project? Describe your project in 10-20 sentences. What are you making? Who are you making it for, and why do they need it? What technologies (programming languages, etc.) will you be using?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Turtle Blocks Python export&#039;&#039;&#039; lets the user export their programming project from the Turtle Blocks activity to a Python script. The generated Python code can be run outside of Turtle Blocks, for example from the command line or in the Pippy IDE.&lt;br /&gt;
&lt;br /&gt;
This tool is designed for users who are already proficient Turtle Block programmers and want to move on to text-based programming. It helps them transfer their knowledge and skills from block-based to text-based programming, as they can see their own creations in a new programming language. Thus, they can focus on the new language rather than the content of the program.&lt;br /&gt;
&lt;br /&gt;
The Python export functionality will be implemented in pure Python, drawing on the internal block code interpreter of Turtle Blocks to convert the blocks to a representation of the program flow. I will then use the &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://docs.python.org/2.6/library/ast.html&amp;lt;/ref&amp;gt; to build the Python syntax tree from this representation. In order to serialize the syntax tree to a string, which can then be written to a file, I plan to use either the &amp;lt;code&amp;gt;codegen&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://dev.pocoo.org/hg/sandbox/file/b2aea937f5bb/ast/codegen.py&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://gist.github.com/mattbasta/791312&amp;lt;/ref&amp;gt; or the &amp;lt;code&amp;gt;unparse&amp;lt;/code&amp;gt; module.&amp;lt;ref&amp;gt;http://svn.python.org/view/python/trunk/Demo/parser/unparse.py?view=markup&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;!--TODO: decide for one--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The exported Python code will need to import a few classes from Turtle Blocks to set up a window etc. I will isolate these classes from the Turtle Blocks code, so it can easily be imported into the generated code.&lt;br /&gt;
&lt;br /&gt;
=== What is the timeline for development of your project? ===&lt;br /&gt;
&#039;&#039;The Summer of Code work period is June 17 - September 23; tell us what you will be working on each week. (As the summer goes on, you and your mentor will adjust your schedule, but it&#039;s good to have a plan at the beginning so you have an idea of where you&#039;re headed.) Note that you should probably plan to have something &amp;quot;working and 90% done&amp;quot; by the midterm evaluation (August 2); the last steps always take longer than you think, and we will consider cancelling projects which are not mostly working by then.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt; These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code.&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== My Backround ===&lt;br /&gt;
&#039;&#039;Convince us, in 5-15 sentences, that you will be able to successfully complete your project in the timeline you have described. This is usually where people describe their past experiences, credentials, prior projects, schoolwork, and that sort of thing, but be creative. Link to prior work or other resources as relevant.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am a student of computational linguistics in my 6th semester.&lt;br /&gt;
I have three years of experience in writing Python programs of various kinds - from simple command line utilities to GUI applications (using pygame and tkinter) and code generators for Java code.&lt;br /&gt;
I also have strong competence in the object oriented programming paradigm.&lt;br /&gt;
Moreover, I am familiar with commonly used frameworks and tools like version control software (svn, git), the Eclipse IDE, and autotools.&lt;br /&gt;
I learn quickly, so I expect to acquire good skills in GTK before the start of the coding phase.&lt;br /&gt;
&lt;br /&gt;
Through my linguistic education, I can draw on substantial experience with grammars, parsers, and syntax trees.&lt;br /&gt;
This experience will help me with anaylzing the block code and transforming it into Python code.&lt;br /&gt;
&lt;br /&gt;
My interest in educational software was sparked during my work on [http://purl.org/icall/view VIEW] (Visual Input Enhancement of the Web), an online language tutoring system.&lt;br /&gt;
During the past two years, I have made many contributions to VIEW, including, for example, the automatic recognition of main content, headlines, and boilerplate on web pages.&lt;br /&gt;
I also improved the user interface of its browser toolbar, and decreased the server&#039;s response time by enabling multi-threading.&lt;br /&gt;
&lt;br /&gt;
My working style is characterized by a high level of documentation, be it inline comments or commit messages.&lt;br /&gt;
I also keep my code modular, which makes it easy for others to build on my work.&lt;br /&gt;
Thus, the Sugar Labs community can profit ideally from my contribution, even after the end of the GSoC.&lt;br /&gt;
&lt;br /&gt;
== Me and the Community ==&lt;br /&gt;
&lt;br /&gt;
=== Impact on the Sugar Labs community ===&lt;br /&gt;
&#039;&#039;If your project is successfully completed, what will its impact be on the Sugar Labs community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Sugar Labs community, at least one of whom should be a Sugar Labs GSoC mentor. Provide email contact information for non-GSoC mentors.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Many Sugar activities allow exporting the user&#039;s creations as a sound file, a picture, a video, or a simple text file, which can then be imported into other activities. In the case of this project, the user can export their block program to Python code and view, edit, and run it in the Pippy and Terminal activities. Combining several activities to create a single piece of work inspires users&#039; creativity. Moreover, it makes Sugar a coherent system, rather than just an arbitrary collection of activities. Users will view it as a tool kit that helps them realize their ideas, no matter which forms they take. This unlimitedness is an important aspect of Sugar&#039;s quality, and thus it ensures continued interest in Sugar in the future.&lt;br /&gt;
&lt;br /&gt;
[[User:Walter|Walter Bender]], mentor of this project:&amp;lt;br/&amp;gt;&lt;br /&gt;
The primary goal of Turtle Blocks is to engage children in programming, specifically the joy of debugging. But also to give them a sense of empowerment over the tools that they use. Hence Turtle Blocks (as opposed to its sister project Turtle Art) exposes the learner to as much of the system as possible, through sensor blocks, Python blocks, etc. At the same time, Turtle Blocks is not an end in of itself. The further goal is to encourage the learners to move beyond block-based projects and get acquainted with the more expressive text-based languages. This project is an experiment to determine if providing a Python version of the block-based programming environment might provide a stepping stone to making this transition. Until we implement Sugar itself as a Turtle Blocks project, this experiment is a worthwhile bet at turning Sugar users into Sugar developers.&lt;br /&gt;
&lt;br /&gt;
[[User:Rgs|Raúl Gutiérrez Segalés]], Turtle Art contributor:&amp;lt;br/&amp;gt;&lt;br /&gt;
In my mind, the big take away here is that we&#039;ll enable portability of&lt;br /&gt;
Turtle Art projects. Being able to translate TA internal&lt;br /&gt;
code into external languages (initially Python, eventually Javascript&lt;br /&gt;
perhaps, or others) will allow this fundamental learning activity to&lt;br /&gt;
reach other platforms and a much broader audience. The question we&#039;ve&lt;br /&gt;
got in front of us is not if Sugar or Turtle Art belong in the Cloud;&lt;br /&gt;
it&#039;s just how fast can we get there.&amp;lt;br/&amp;gt;&lt;br /&gt;
This project is a key step towards our goal of getting Sugar/Turtle&lt;br /&gt;
Art onto more hands.&lt;br /&gt;
&lt;br /&gt;
=== Sugar pilot deployment ===&lt;br /&gt;
&#039;&#039;Sugar Labs will be working to set up a small (5-30 unit) Sugar pilot near each student project that is accepted to GSoC so that you can immediately see how your work affects children in a deployment. We will make arrangements to either supply or find all the equipment needed. Do you have any ideas on where you would like your deployment to be, who you would like to be involved, and how we can help you and the community in your area begin it?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My old primary school has an immigrant rate of about 80%, and many kids are socially disadvantaged. This results in a big difference in learning speed between individual children in one class, which is problematic for traditional &amp;quot;chalk and talk&amp;quot; teaching methods. I think that Sugar would enable each child to learn at its own pace without feeling left out if they are slower than their classmates. Faster learners can easily move on to other activities when they are done and no longer disturb the lesson because they are bored.&lt;br /&gt;
&lt;br /&gt;
In the first year, the school often faces the difficulty of teaching children who do not speak the class language (German). With its clean graphical interface and recognizable icons, Sugar could help these children understand the material without the need to translate everyhing into their mother language.&lt;br /&gt;
&lt;br /&gt;
I can set up contact to the school and act as an interpreter if necessary.&lt;br /&gt;
&lt;br /&gt;
=== What will you do if you get stuck on your project and your mentor isn&#039;t around? ===&lt;br /&gt;
&lt;br /&gt;
From experience I know that physical activity often helps me with getting rid of a thinking blockade. So, I will first take a short walk or do some household work to get fresh ideas into my head. If that does not help, I will suspend work on the feature that is causing the problem and work on a different feature in the meantime, until my mentor becomes available again.&lt;br /&gt;
&lt;br /&gt;
=== Keeping the community informed about problems and questions ===&lt;br /&gt;
&#039;&#039;How do you propose you will be keeping the community informed of your progress and any problems or questions you might have over the course of the project?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I plan to document the progress of my work through commit messages in an online repository. When I am faced with an important design decision, I will discuss it with other developers on the mailing list or on IRC. In addition, I will set up a Wiki page to announce the outcomes of such decisions and to keep track of my timeline.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== Screenshot of my Sugar development environment ===&lt;br /&gt;
&#039;&#039;We want to make sure that you can set up a development environment before the summer starts. Please send us a link to a screenshot of your Sugar development environment with the following modification: when you hover over the XO-person icon in the middle of Home view, the drop-down text should have your email in place of &amp;quot;Restart.&amp;quot; See the image on the right for an example. It&#039;s normal to need assistance with this, so please visit our IRC channel, #sugar on irc.freenode.net, and ask for help.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Marion-Zepf_devel-env-screenshot.png|400px|Screenshot of Marion Zepf&#039;s development environment of Sugar with the &#039;restart&#039; label replaced with her email address.]]&lt;br /&gt;
&lt;br /&gt;
=== What is your t-shirt size? ===&lt;br /&gt;
&#039;&#039;(Yes, we know Google asks for this already; humor us.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
S (female)&lt;br /&gt;
&lt;br /&gt;
=== Describe a great learning experience you had as a child. ===&lt;br /&gt;
&lt;br /&gt;
=== Additional information ===&lt;br /&gt;
&#039;&#039;Is there anything else we should have asked you or anything else that we should know that might make us like you or your project more?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87875</id>
		<title>Summer of Code/2013/Turtle Blocks Python export</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87875"/>
		<updated>2013-05-02T20:53:35Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: +my background&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My name is [[User:Marion Zepf|Marion Zepf]] and I would like to work on the project [[Summer_of_Code/2013#Python_export_functionality_for_Turtle_Blocks|Python export funtionality for TurtleBlocks]]. Please find my application below.&lt;br /&gt;
&lt;br /&gt;
== About me ==&lt;br /&gt;
&lt;br /&gt;
=== What is your name? ===&lt;br /&gt;
Marion Zepf&lt;br /&gt;
&lt;br /&gt;
=== What is your email address? ===&lt;br /&gt;
[mailto:marion.zepf@gmail.com marion.zepf@gmail.com]&lt;br /&gt;
&lt;br /&gt;
=== What is your Sugar Labs wiki username? ===&lt;br /&gt;
[[User:Marion Zepf|Marion Zepf]]&lt;br /&gt;
&lt;br /&gt;
=== What is your IRC nickname? ===&lt;br /&gt;
I do not have a fixed nickname, but I try to use &amp;quot;mzepf&amp;quot; if it is available.&lt;br /&gt;
&lt;br /&gt;
=== What is your primary language? ===&lt;br /&gt;
&#039;&#039;(We have mentors who speak multiple languages and can match you with one of them if you&#039;d prefer.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My native language is German, but I am more comfortable in English when it comes to computers and programming.&lt;br /&gt;
&lt;br /&gt;
=== Where are you located, and what hours do you tend to work? ===&lt;br /&gt;
&#039;&#039;(We also try to match mentors by general time zone if possible.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am located in Stuttgart and Tübingen, Germany. My time zone is Central European Summer Time (CEST) or UTC+02:00 during summer.&lt;br /&gt;
I plan to work on this project Thu-Sun, approximately from noon until midnight.&lt;br /&gt;
&lt;br /&gt;
=== Have you participated in an open-source project before? ===&lt;br /&gt;
&#039;&#039;If so, please send us URLs to your profile pages for those projects, or some other demonstration of the work that you have done in open-source. If not, why do you want to work on an open-source project this summer?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is my first open-source project. In the past, I have benefitted from open-source software countless times. Now I want to give something back to the community.&lt;br /&gt;
&lt;br /&gt;
== About my Project ==&lt;br /&gt;
&lt;br /&gt;
=== Project description  ===&lt;br /&gt;
&#039;&#039;What is the name of your project? Describe your project in 10-20 sentences. What are you making? Who are you making it for, and why do they need it? What technologies (programming languages, etc.) will you be using?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Turtle Blocks Python export&#039;&#039;&#039; lets the user export their programming project from the Turtle Blocks activity to a Python script. The generated Python code can be run outside of Turtle Blocks, for example from the command line or in the Pippy IDE.&lt;br /&gt;
&lt;br /&gt;
This tool is designed for users who are already proficient Turtle Block programmers and want to move on to text-based programming. It helps them transfer their knowledge and skills from block-based to text-based programming, as they can see their own creations in a new programming language. Thus, they can focus on the new language rather than the content of the program.&lt;br /&gt;
&lt;br /&gt;
The Python export functionality will be implemented in pure Python, drawing on the internal block code interpreter of Turtle Blocks to convert the blocks to a representation of the program flow. I will then use the &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://docs.python.org/2.6/library/ast.html&amp;lt;/ref&amp;gt; to build the Python syntax tree from this representation. In order to serialize the syntax tree to a string, which can then be written to a file, I plan to use either the &amp;lt;code&amp;gt;codegen&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://dev.pocoo.org/hg/sandbox/file/b2aea937f5bb/ast/codegen.py&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://gist.github.com/mattbasta/791312&amp;lt;/ref&amp;gt; or the &amp;lt;code&amp;gt;unparse&amp;lt;/code&amp;gt; module.&amp;lt;ref&amp;gt;http://svn.python.org/view/python/trunk/Demo/parser/unparse.py?view=markup&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;!--TODO: decide for one--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The exported Python code will need to import a few classes from Turtle Blocks to set up a window etc. I will isolate these classes from the Turtle Blocks code, so it can easily be imported into the generated code.&lt;br /&gt;
&lt;br /&gt;
=== What is the timeline for development of your project? ===&lt;br /&gt;
&#039;&#039;The Summer of Code work period is June 17 - September 23; tell us what you will be working on each week. (As the summer goes on, you and your mentor will adjust your schedule, but it&#039;s good to have a plan at the beginning so you have an idea of where you&#039;re headed.) Note that you should probably plan to have something &amp;quot;working and 90% done&amp;quot; by the midterm evaluation (August 2); the last steps always take longer than you think, and we will consider cancelling projects which are not mostly working by then.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt; These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code.&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== My Backround ===&lt;br /&gt;
&#039;&#039;Convince us, in 5-15 sentences, that you will be able to successfully complete your project in the timeline you have described. This is usually where people describe their past experiences, credentials, prior projects, schoolwork, and that sort of thing, but be creative. Link to prior work or other resources as relevant.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am a student of computational linguistics in my 6th semester.&lt;br /&gt;
I have three years of experience in writing Python programs of various kinds - from simple command line utilities to GUI applications (using pygame and tkinter) and code generators for Java code.&lt;br /&gt;
I also have strong competence in the object oriented programming paradigm.&lt;br /&gt;
Moreover, I am familiar with commonly used frameworks and tools like version control software (svn, git), the Eclipse IDE, and autotools.&lt;br /&gt;
I learn quickly, so I expect to acquire good skills in GTK before the start of the coding phase.&lt;br /&gt;
&lt;br /&gt;
Through my linguistic education, I can draw on substantial experience with grammars, parsers, and syntax trees.&lt;br /&gt;
This experience will help me with anaylzing the block code and transforming it into Python code.&lt;br /&gt;
&lt;br /&gt;
My interest in educational software was sparked during my work on [http://purl.org/icall/view VIEW] (Visual Input Enhancement of the Web), an online language tutoring system.&lt;br /&gt;
During the past two years, I have made many contributions to VIEW, including, for example, the automatic recognition of main content, headlines, and boilerplate on web pages.&lt;br /&gt;
I also improved the user interface of its browser toolbar, and decreased the server&#039;s response time by enabling multi-threading.&lt;br /&gt;
&lt;br /&gt;
My working style is characterized by a high level of documentation, be it inline comments or commit messages.&lt;br /&gt;
I also keep my code modular, which makes it easy for others to build on my work.&lt;br /&gt;
This way, Sugar labs can profit ideally from my contribution, even after the end of the GSoC.&lt;br /&gt;
&lt;br /&gt;
== Me and the Community ==&lt;br /&gt;
&lt;br /&gt;
=== Impact on the Sugar Labs community ===&lt;br /&gt;
&#039;&#039;If your project is successfully completed, what will its impact be on the Sugar Labs community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Sugar Labs community, at least one of whom should be a Sugar Labs GSoC mentor. Provide email contact information for non-GSoC mentors.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Many Sugar activities allow exporting the user&#039;s creations as a sound file, a picture, a video, or a simple text file, which can then be imported into other activities. In the case of this project, the user can export their block program to Python code and view, edit, and run it in the Pippy and Terminal activities. Combining several activities to create a single piece of work inspires users&#039; creativity. Moreover, it makes Sugar a coherent system, rather than just an arbitrary collection of activities. Users will view it as a tool kit that helps them realize their ideas, no matter which forms they take. This unlimitedness is an important aspect of Sugar&#039;s quality, and thus it ensures continued interest in Sugar in the future.&lt;br /&gt;
&lt;br /&gt;
[[User:Walter|Walter Bender]], mentor of this project:&amp;lt;br/&amp;gt;&lt;br /&gt;
The primary goal of Turtle Blocks is to engage children in programming, specifically the joy of debugging. But also to give them a sense of empowerment over the tools that they use. Hence Turtle Blocks (as opposed to its sister project Turtle Art) exposes the learner to as much of the system as possible, through sensor blocks, Python blocks, etc. At the same time, Turtle Blocks is not an end in of itself. The further goal is to encourage the learners to move beyond block-based projects and get acquainted with the more expressive text-based languages. This project is an experiment to determine if providing a Python version of the block-based programming environment might provide a stepping stone to making this transition. Until we implement Sugar itself as a Turtle Blocks project, this experiment is a worthwhile bet at turning Sugar users into Sugar developers.&lt;br /&gt;
&lt;br /&gt;
[[User:Rgs|Raúl Gutiérrez Segalés]], Turtle Art contributor:&amp;lt;br/&amp;gt;&lt;br /&gt;
In my mind, the big take away here is that we&#039;ll enable portability of&lt;br /&gt;
Turtle Art projects. Being able to translate TA internal&lt;br /&gt;
code into external languages (initially Python, eventually Javascript&lt;br /&gt;
perhaps, or others) will allow this fundamental learning activity to&lt;br /&gt;
reach other platforms and a much broader audience. The question we&#039;ve&lt;br /&gt;
got in front of us is not if Sugar or Turtle Art belong in the Cloud;&lt;br /&gt;
it&#039;s just how fast can we get there.&amp;lt;br/&amp;gt;&lt;br /&gt;
This project is a key step towards our goal of getting Sugar/Turtle&lt;br /&gt;
Art onto more hands.&lt;br /&gt;
&lt;br /&gt;
=== Sugar pilot deployment ===&lt;br /&gt;
&#039;&#039;Sugar Labs will be working to set up a small (5-30 unit) Sugar pilot near each student project that is accepted to GSoC so that you can immediately see how your work affects children in a deployment. We will make arrangements to either supply or find all the equipment needed. Do you have any ideas on where you would like your deployment to be, who you would like to be involved, and how we can help you and the community in your area begin it?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My old primary school has an immigrant rate of about 80%, and many kids are socially disadvantaged. This results in a big difference in learning speed between individual children in one class, which is problematic for traditional &amp;quot;chalk and talk&amp;quot; teaching methods. I think that Sugar would enable each child to learn at its own pace without feeling left out if they are slower than their classmates. Faster learners can easily move on to other activities when they are done and no longer disturb the lesson because they are bored.&lt;br /&gt;
&lt;br /&gt;
In the first year, the school often faces the difficulty of teaching children who do not speak the class language (German). With its clean graphical interface and recognizable icons, Sugar could help these children understand the material without the need to translate everyhing into their mother language.&lt;br /&gt;
&lt;br /&gt;
I can set up contact to the school and act as an interpreter if necessary.&lt;br /&gt;
&lt;br /&gt;
=== What will you do if you get stuck on your project and your mentor isn&#039;t around? ===&lt;br /&gt;
&lt;br /&gt;
From experience I know that physical activity often helps me with getting rid of a thinking blockade. So, I will first take a short walk or do some household work to get fresh ideas into my head. If that does not help, I will suspend work on the feature that is causing the problem and work on a different feature in the meantime, until my mentor becomes available again.&lt;br /&gt;
&lt;br /&gt;
=== Keeping the community informed about problems and questions ===&lt;br /&gt;
&#039;&#039;How do you propose you will be keeping the community informed of your progress and any problems or questions you might have over the course of the project?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I plan to document the progress of my work through commit messages in an online repository. When I am faced with an important design decision, I will discuss it with other developers on the mailing list or on IRC. In addition, I will set up a Wiki page to announce the outcomes of such decisions and to keep track of my timeline.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== Screenshot of my Sugar development environment ===&lt;br /&gt;
&#039;&#039;We want to make sure that you can set up a development environment before the summer starts. Please send us a link to a screenshot of your Sugar development environment with the following modification: when you hover over the XO-person icon in the middle of Home view, the drop-down text should have your email in place of &amp;quot;Restart.&amp;quot; See the image on the right for an example. It&#039;s normal to need assistance with this, so please visit our IRC channel, #sugar on irc.freenode.net, and ask for help.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Marion-Zepf_devel-env-screenshot.png|400px|Screenshot of Marion Zepf&#039;s development environment of Sugar with the &#039;restart&#039; label replaced with her email address.]]&lt;br /&gt;
&lt;br /&gt;
=== What is your t-shirt size? ===&lt;br /&gt;
&#039;&#039;(Yes, we know Google asks for this already; humor us.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
S (female)&lt;br /&gt;
&lt;br /&gt;
=== Describe a great learning experience you had as a child. ===&lt;br /&gt;
&lt;br /&gt;
=== Additional information ===&lt;br /&gt;
&#039;&#039;Is there anything else we should have asked you or anything else that we should know that might make us like you or your project more?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87870</id>
		<title>Summer of Code/2013/Turtle Blocks Python export</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87870"/>
		<updated>2013-05-02T15:59:02Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: +what if I get stuck, +keeping the community informed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My name is [[User:Marion Zepf|Marion Zepf]] and I would like to work on the project [[Summer_of_Code/2013#Python_export_functionality_for_Turtle_Blocks|Python export funtionality for TurtleBlocks]]. Please find my application below.&lt;br /&gt;
&lt;br /&gt;
== About me ==&lt;br /&gt;
&lt;br /&gt;
=== What is your name? ===&lt;br /&gt;
Marion Zepf&lt;br /&gt;
&lt;br /&gt;
=== What is your email address? ===&lt;br /&gt;
[mailto:marion.zepf@gmail.com marion.zepf@gmail.com]&lt;br /&gt;
&lt;br /&gt;
=== What is your Sugar Labs wiki username? ===&lt;br /&gt;
[[User:Marion Zepf|Marion Zepf]]&lt;br /&gt;
&lt;br /&gt;
=== What is your IRC nickname? ===&lt;br /&gt;
I do not have a fixed nickname, but I try to use &amp;quot;mzepf&amp;quot; if it is available.&lt;br /&gt;
&lt;br /&gt;
=== What is your primary language? ===&lt;br /&gt;
&#039;&#039;(We have mentors who speak multiple languages and can match you with one of them if you&#039;d prefer.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My native language is German, but I am more comfortable in English when it comes to computers and programming.&lt;br /&gt;
&lt;br /&gt;
=== Where are you located, and what hours do you tend to work? ===&lt;br /&gt;
&#039;&#039;(We also try to match mentors by general time zone if possible.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am located in Stuttgart and Tübingen, Germany. My time zone is Central European Summer Time (CEST) or UTC+02:00 during summer.&lt;br /&gt;
I plan to work on this project Thu-Sun, approximately from noon until midnight.&lt;br /&gt;
&lt;br /&gt;
=== Have you participated in an open-source project before? ===&lt;br /&gt;
&#039;&#039;If so, please send us URLs to your profile pages for those projects, or some other demonstration of the work that you have done in open-source. If not, why do you want to work on an open-source project this summer?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is my first open-source project. In the past, I have benefitted from open-source software countless times. Now I want to give something back to the community.&lt;br /&gt;
&lt;br /&gt;
== About my Project ==&lt;br /&gt;
&lt;br /&gt;
=== Project description  ===&lt;br /&gt;
&#039;&#039;What is the name of your project? Describe your project in 10-20 sentences. What are you making? Who are you making it for, and why do they need it? What technologies (programming languages, etc.) will you be using?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Turtle Blocks Python export&#039;&#039;&#039; lets the user export their programming project from the Turtle Blocks activity to a Python script. The generated Python code can be run outside of Turtle Blocks, for example from the command line or in the Pippy IDE.&lt;br /&gt;
&lt;br /&gt;
This tool is designed for users who are already proficient Turtle Block programmers and want to move on to text-based programming. It helps them transfer their knowledge and skills from block-based to text-based programming, as they can see their own creations in a new programming language. Thus, they can focus on the new language rather than the content of the program.&lt;br /&gt;
&lt;br /&gt;
The Python export functionality will be implemented in pure Python, drawing on the internal block code interpreter of Turtle Blocks to convert the blocks to a representation of the program flow. I will then use the &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://docs.python.org/2.6/library/ast.html&amp;lt;/ref&amp;gt; to build the Python syntax tree from this representation. In order to serialize the syntax tree to a string, which can then be written to a file, I plan to use either the &amp;lt;code&amp;gt;codegen&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://dev.pocoo.org/hg/sandbox/file/b2aea937f5bb/ast/codegen.py&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://gist.github.com/mattbasta/791312&amp;lt;/ref&amp;gt; or the &amp;lt;code&amp;gt;unparse&amp;lt;/code&amp;gt; module.&amp;lt;ref&amp;gt;http://svn.python.org/view/python/trunk/Demo/parser/unparse.py?view=markup&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;!--TODO: decide for one--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The exported Python code will need to import a few classes from Turtle Blocks to set up a window etc. I will isolate these classes from the Turtle Blocks code, so it can easily be imported into the generated code.&lt;br /&gt;
&lt;br /&gt;
=== What is the timeline for development of your project? ===&lt;br /&gt;
&#039;&#039;The Summer of Code work period is June 17 - September 23; tell us what you will be working on each week. (As the summer goes on, you and your mentor will adjust your schedule, but it&#039;s good to have a plan at the beginning so you have an idea of where you&#039;re headed.) Note that you should probably plan to have something &amp;quot;working and 90% done&amp;quot; by the midterm evaluation (August 2); the last steps always take longer than you think, and we will consider cancelling projects which are not mostly working by then.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt; These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code.&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== My Backround ===&lt;br /&gt;
&#039;&#039;Convince us, in 5-15 sentences, that you will be able to successfully complete your project in the timeline you have described. This is usually where people describe their past experiences, credentials, prior projects, schoolwork, and that sort of thing, but be creative. Link to prior work or other resources as relevant.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Me and the Community ==&lt;br /&gt;
&lt;br /&gt;
=== Impact on the Sugar Labs community ===&lt;br /&gt;
&#039;&#039;If your project is successfully completed, what will its impact be on the Sugar Labs community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Sugar Labs community, at least one of whom should be a Sugar Labs GSoC mentor. Provide email contact information for non-GSoC mentors.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Many Sugar activities allow exporting the user&#039;s creations as a sound file, a picture, a video, or a simple text file, which can then be imported into other activities. In the case of this project, the user can export their block program to Python code and view, edit, and run it in the Pippy and Terminal activities. Combining several activities to create a single piece of work inspires users&#039; creativity. Moreover, it makes Sugar a coherent system, rather than just an arbitrary collection of activities. Users will view it as a tool kit that helps them realize their ideas, no matter which forms they take. This unlimitedness is an important aspect of Sugar&#039;s quality, and thus it ensures continued interest in Sugar in the future.&lt;br /&gt;
&lt;br /&gt;
[[User:Walter|Walter Bender]], mentor of this project:&amp;lt;br/&amp;gt;&lt;br /&gt;
The primary goal of Turtle Blocks is to engage children in programming, specifically the joy of debugging. But also to give them a sense of empowerment over the tools that they use. Hence Turtle Blocks (as opposed to its sister project Turtle Art) exposes the learner to as much of the system as possible, through sensor blocks, Python blocks, etc. At the same time, Turtle Blocks is not an end in of itself. The further goal is to encourage the learners to move beyond block-based projects and get acquainted with the more expressive text-based languages. This project is an experiment to determine if providing a Python version of the block-based programming environment might provide a stepping stone to making this transition. Until we implement Sugar itself as a Turtle Blocks project, this experiment is a worthwhile bet at turning Sugar users into Sugar developers.&lt;br /&gt;
&lt;br /&gt;
[[User:Rgs|Raúl Gutiérrez Segalés]], Turtle Art contributor:&amp;lt;br/&amp;gt;&lt;br /&gt;
In my mind, the big take away here is that we&#039;ll enable portability of&lt;br /&gt;
Turtle Art projects. Being able to translate TA internal&lt;br /&gt;
code into external languages (initially Python, eventually Javascript&lt;br /&gt;
perhaps, or others) will allow this fundamental learning activity to&lt;br /&gt;
reach other platforms and a much broader audience. The question we&#039;ve&lt;br /&gt;
got in front of us is not if Sugar or Turtle Art belong in the Cloud;&lt;br /&gt;
it&#039;s just how fast can we get there.&amp;lt;br/&amp;gt;&lt;br /&gt;
This project is a key step towards our goal of getting Sugar/Turtle&lt;br /&gt;
Art onto more hands.&lt;br /&gt;
&lt;br /&gt;
=== Sugar pilot deployment ===&lt;br /&gt;
&#039;&#039;Sugar Labs will be working to set up a small (5-30 unit) Sugar pilot near each student project that is accepted to GSoC so that you can immediately see how your work affects children in a deployment. We will make arrangements to either supply or find all the equipment needed. Do you have any ideas on where you would like your deployment to be, who you would like to be involved, and how we can help you and the community in your area begin it?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My old primary school has an immigrant rate of about 80%, and many kids are socially disadvantaged. This results in a big difference in learning speed between individual children in one class, which is problematic for traditional &amp;quot;chalk and talk&amp;quot; teaching methods. I think that Sugar would enable each child to learn at its own pace without feeling left out if they are slower than their classmates. Faster learners can easily move on to other activities when they are done and no longer disturb the lesson because they are bored.&lt;br /&gt;
&lt;br /&gt;
In the first year, the school often faces the difficulty of teaching children who do not speak the class language (German). With its clean graphical interface and recognizable icons, Sugar could help these children understand the material without the need to translate everyhing into their mother language.&lt;br /&gt;
&lt;br /&gt;
I can set up contact to the school and act as an interpreter if necessary.&lt;br /&gt;
&lt;br /&gt;
=== What will you do if you get stuck on your project and your mentor isn&#039;t around? ===&lt;br /&gt;
&lt;br /&gt;
From experience I know that physical activity often helps me with getting rid of a thinking blockade. So, I will first take a short walk or do some household work to get fresh ideas into my head. If that does not help, I will suspend work on the feature that is causing the problem and work on a different feature in the meantime, until my mentor becomes available again.&lt;br /&gt;
&lt;br /&gt;
=== Keeping the community informed about problems and questions ===&lt;br /&gt;
&#039;&#039;How do you propose you will be keeping the community informed of your progress and any problems or questions you might have over the course of the project?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I plan to document the progress of my work through commit messages in an online repository. When I am faced with an important design decision, I will discuss it with other developers on the mailing list or on IRC. In addition, I will set up a Wiki page to announce the outcomes of such decisions and to keep track of my timeline.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== Screenshot of my Sugar development environment ===&lt;br /&gt;
&#039;&#039;We want to make sure that you can set up a development environment before the summer starts. Please send us a link to a screenshot of your Sugar development environment with the following modification: when you hover over the XO-person icon in the middle of Home view, the drop-down text should have your email in place of &amp;quot;Restart.&amp;quot; See the image on the right for an example. It&#039;s normal to need assistance with this, so please visit our IRC channel, #sugar on irc.freenode.net, and ask for help.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Marion-Zepf_devel-env-screenshot.png|400px|Screenshot of Marion Zepf&#039;s development environment of Sugar with the &#039;restart&#039; label replaced with her email address.]]&lt;br /&gt;
&lt;br /&gt;
=== What is your t-shirt size? ===&lt;br /&gt;
&#039;&#039;(Yes, we know Google asks for this already; humor us.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
S (female)&lt;br /&gt;
&lt;br /&gt;
=== Describe a great learning experience you had as a child. ===&lt;br /&gt;
&lt;br /&gt;
=== Additional information ===&lt;br /&gt;
&#039;&#039;Is there anything else we should have asked you or anything else that we should know that might make us like you or your project more?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87860</id>
		<title>Summer of Code/2013/Turtle Blocks Python export</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87860"/>
		<updated>2013-05-02T15:34:01Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: +Sugar pilot deployment&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My name is [[User:Marion Zepf|Marion Zepf]] and I would like to work on the project [[Summer_of_Code/2013#Python_export_functionality_for_Turtle_Blocks|Python export funtionality for TurtleBlocks]]. Please find my application below.&lt;br /&gt;
&lt;br /&gt;
== About me ==&lt;br /&gt;
&lt;br /&gt;
=== What is your name? ===&lt;br /&gt;
Marion Zepf&lt;br /&gt;
&lt;br /&gt;
=== What is your email address? ===&lt;br /&gt;
[mailto:marion.zepf@gmail.com marion.zepf@gmail.com]&lt;br /&gt;
&lt;br /&gt;
=== What is your Sugar Labs wiki username? ===&lt;br /&gt;
[[User:Marion Zepf|Marion Zepf]]&lt;br /&gt;
&lt;br /&gt;
=== What is your IRC nickname? ===&lt;br /&gt;
I do not have a fixed nickname, but I try to use &amp;quot;mzepf&amp;quot; if it is available.&lt;br /&gt;
&lt;br /&gt;
=== What is your primary language? ===&lt;br /&gt;
&#039;&#039;(We have mentors who speak multiple languages and can match you with one of them if you&#039;d prefer.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My native language is German, but I am more comfortable in English when it comes to computers and programming.&lt;br /&gt;
&lt;br /&gt;
=== Where are you located, and what hours do you tend to work? ===&lt;br /&gt;
&#039;&#039;(We also try to match mentors by general time zone if possible.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am located in Stuttgart and Tübingen, Germany. My time zone is Central European Summer Time (CEST) or UTC+02:00 during summer.&lt;br /&gt;
I plan to work on this project Thu-Sun, approximately from noon until midnight.&lt;br /&gt;
&lt;br /&gt;
=== Have you participated in an open-source project before? ===&lt;br /&gt;
&#039;&#039;If so, please send us URLs to your profile pages for those projects, or some other demonstration of the work that you have done in open-source. If not, why do you want to work on an open-source project this summer?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is my first open-source project. In the past, I have benefitted from open-source software countless times. Now I want to give something back to the community.&lt;br /&gt;
&lt;br /&gt;
== About my Project ==&lt;br /&gt;
&lt;br /&gt;
=== Project description  ===&lt;br /&gt;
&#039;&#039;What is the name of your project? Describe your project in 10-20 sentences. What are you making? Who are you making it for, and why do they need it? What technologies (programming languages, etc.) will you be using?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Turtle Blocks Python export&#039;&#039;&#039; lets the user export their programming project from the Turtle Blocks activity to a Python script. The generated Python code can be run outside of Turtle Blocks, for example from the command line or in the Pippy IDE.&lt;br /&gt;
&lt;br /&gt;
This tool is designed for users who are already proficient Turtle Block programmers and want to move on to text-based programming. It helps them transfer their knowledge and skills from block-based to text-based programming, as they can see their own creations in a new programming language. Thus, they can focus on the new language rather than the content of the program.&lt;br /&gt;
&lt;br /&gt;
The Python export functionality will be implemented in pure Python, drawing on the internal block code interpreter of Turtle Blocks to convert the blocks to a representation of the program flow. I will then use the &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://docs.python.org/2.6/library/ast.html&amp;lt;/ref&amp;gt; to build the Python syntax tree from this representation. In order to serialize the syntax tree to a string, which can then be written to a file, I plan to use either the &amp;lt;code&amp;gt;codegen&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://dev.pocoo.org/hg/sandbox/file/b2aea937f5bb/ast/codegen.py&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://gist.github.com/mattbasta/791312&amp;lt;/ref&amp;gt; or the &amp;lt;code&amp;gt;unparse&amp;lt;/code&amp;gt; module.&amp;lt;ref&amp;gt;http://svn.python.org/view/python/trunk/Demo/parser/unparse.py?view=markup&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;!--TODO: decide for one--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The exported Python code will need to import a few classes from Turtle Blocks to set up a window etc. I will isolate these classes from the Turtle Blocks code, so it can easily be imported into the generated code.&lt;br /&gt;
&lt;br /&gt;
=== What is the timeline for development of your project? ===&lt;br /&gt;
&#039;&#039;The Summer of Code work period is June 17 - September 23; tell us what you will be working on each week. (As the summer goes on, you and your mentor will adjust your schedule, but it&#039;s good to have a plan at the beginning so you have an idea of where you&#039;re headed.) Note that you should probably plan to have something &amp;quot;working and 90% done&amp;quot; by the midterm evaluation (August 2); the last steps always take longer than you think, and we will consider cancelling projects which are not mostly working by then.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt; These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code.&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== My Backround ===&lt;br /&gt;
&#039;&#039;Convince us, in 5-15 sentences, that you will be able to successfully complete your project in the timeline you have described. This is usually where people describe their past experiences, credentials, prior projects, schoolwork, and that sort of thing, but be creative. Link to prior work or other resources as relevant.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Me and the Community ==&lt;br /&gt;
&lt;br /&gt;
=== Impact on the Sugar Labs community ===&lt;br /&gt;
&#039;&#039;If your project is successfully completed, what will its impact be on the Sugar Labs community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Sugar Labs community, at least one of whom should be a Sugar Labs GSoC mentor. Provide email contact information for non-GSoC mentors.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Many Sugar activities allow exporting the user&#039;s creations as a sound file, a picture, a video, or a simple text file, which can then be imported into other activities. In the case of this project, the user can export their block program to Python code and view, edit, and run it in the Pippy and Terminal activities. Combining several activities to create a single piece of work inspires users&#039; creativity. Moreover, it makes Sugar a coherent system, rather than just an arbitrary collection of activities. Users will view it as a tool kit that helps them realize their ideas, no matter which forms they take. This unlimitedness is an important aspect of Sugar&#039;s quality, and thus it ensures continued interest in Sugar in the future.&lt;br /&gt;
&lt;br /&gt;
[[User:Walter|Walter Bender]], mentor of this project:&amp;lt;br/&amp;gt;&lt;br /&gt;
The primary goal of Turtle Blocks is to engage children in programming, specifically the joy of debugging. But also to give them a sense of empowerment over the tools that they use. Hence Turtle Blocks (as opposed to its sister project Turtle Art) exposes the learner to as much of the system as possible, through sensor blocks, Python blocks, etc. At the same time, Turtle Blocks is not an end in of itself. The further goal is to encourage the learners to move beyond block-based projects and get acquainted with the more expressive text-based languages. This project is an experiment to determine if providing a Python version of the block-based programming environment might provide a stepping stone to making this transition. Until we implement Sugar itself as a Turtle Blocks project, this experiment is a worthwhile bet at turning Sugar users into Sugar developers.&lt;br /&gt;
&lt;br /&gt;
[[User:Rgs|Raúl Gutiérrez Segalés]], Turtle Art contributor:&amp;lt;br/&amp;gt;&lt;br /&gt;
In my mind, the big take away here is that we&#039;ll enable portability of&lt;br /&gt;
Turtle Art projects. Being able to translate TA internal&lt;br /&gt;
code into external languages (initially Python, eventually Javascript&lt;br /&gt;
perhaps, or others) will allow this fundamental learning activity to&lt;br /&gt;
reach other platforms and a much broader audience. The question we&#039;ve&lt;br /&gt;
got in front of us is not if Sugar or Turtle Art belong in the Cloud;&lt;br /&gt;
it&#039;s just how fast can we get there.&amp;lt;br/&amp;gt;&lt;br /&gt;
This project is a key step towards our goal of getting Sugar/Turtle&lt;br /&gt;
Art onto more hands.&lt;br /&gt;
&lt;br /&gt;
=== Sugar pilot deployment ===&lt;br /&gt;
&#039;&#039;Sugar Labs will be working to set up a small (5-30 unit) Sugar pilot near each student project that is accepted to GSoC so that you can immediately see how your work affects children in a deployment. We will make arrangements to either supply or find all the equipment needed. Do you have any ideas on where you would like your deployment to be, who you would like to be involved, and how we can help you and the community in your area begin it?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My old primary school has an immigrant rate of about 80%, and many kids are socially disadvantaged. This results in a big difference in learning speed between individual children in one class, which is problematic for traditional &amp;quot;chalk and talk&amp;quot; teaching methods. I think that Sugar would enable each child to learn at its own pace without feeling left out if they are slower than their classmates. Faster learners can easily move on to other activities when they are done and no longer disturb the lesson because they are bored.&lt;br /&gt;
&lt;br /&gt;
In the first year, the school often faces the difficulty of teaching children who do not speak the class language (German). With its clean graphical interface and recognizable icons, Sugar could help these children understand the material without the need to translate everyhing into their mother language.&lt;br /&gt;
&lt;br /&gt;
I can set up contact to the school and act as an interpreter if necessary.&lt;br /&gt;
&lt;br /&gt;
=== What will you do if you get stuck on your project and your mentor isn&#039;t around? ===&lt;br /&gt;
&lt;br /&gt;
=== Keeping the community informed about problems and questions ===&lt;br /&gt;
&#039;&#039;How do you propose you will be keeping the community informed of your progress and any problems or questions you might have over the course of the project?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== Screenshot of my Sugar development environment ===&lt;br /&gt;
&#039;&#039;We want to make sure that you can set up a development environment before the summer starts. Please send us a link to a screenshot of your Sugar development environment with the following modification: when you hover over the XO-person icon in the middle of Home view, the drop-down text should have your email in place of &amp;quot;Restart.&amp;quot; See the image on the right for an example. It&#039;s normal to need assistance with this, so please visit our IRC channel, #sugar on irc.freenode.net, and ask for help.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Marion-Zepf_devel-env-screenshot.png|400px|Screenshot of Marion Zepf&#039;s development environment of Sugar with the &#039;restart&#039; label replaced with her email address.]]&lt;br /&gt;
&lt;br /&gt;
=== What is your t-shirt size? ===&lt;br /&gt;
&#039;&#039;(Yes, we know Google asks for this already; humor us.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
S (female)&lt;br /&gt;
&lt;br /&gt;
=== Describe a great learning experience you had as a child. ===&lt;br /&gt;
&lt;br /&gt;
=== Additional information ===&lt;br /&gt;
&#039;&#039;Is there anything else we should have asked you or anything else that we should know that might make us like you or your project more?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87859</id>
		<title>Summer of Code/2013/Turtle Blocks Python export</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87859"/>
		<updated>2013-05-02T15:05:16Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: +impact on the Sugar labs community&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My name is [[User:Marion Zepf|Marion Zepf]] and I would like to work on the project [[Summer_of_Code/2013#Python_export_functionality_for_Turtle_Blocks|Python export funtionality for TurtleBlocks]]. Please find my application below.&lt;br /&gt;
&lt;br /&gt;
== About me ==&lt;br /&gt;
&lt;br /&gt;
=== What is your name? ===&lt;br /&gt;
Marion Zepf&lt;br /&gt;
&lt;br /&gt;
=== What is your email address? ===&lt;br /&gt;
[mailto:marion.zepf@gmail.com marion.zepf@gmail.com]&lt;br /&gt;
&lt;br /&gt;
=== What is your Sugar Labs wiki username? ===&lt;br /&gt;
[[User:Marion Zepf|Marion Zepf]]&lt;br /&gt;
&lt;br /&gt;
=== What is your IRC nickname? ===&lt;br /&gt;
I do not have a fixed nickname, but I try to use &amp;quot;mzepf&amp;quot; if it is available.&lt;br /&gt;
&lt;br /&gt;
=== What is your primary language? ===&lt;br /&gt;
&#039;&#039;(We have mentors who speak multiple languages and can match you with one of them if you&#039;d prefer.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My native language is German, but I am more comfortable in English when it comes to computers and programming.&lt;br /&gt;
&lt;br /&gt;
=== Where are you located, and what hours do you tend to work? ===&lt;br /&gt;
&#039;&#039;(We also try to match mentors by general time zone if possible.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am located in Stuttgart and Tübingen, Germany. My time zone is Central European Summer Time (CEST) or UTC+02:00 during summer.&lt;br /&gt;
I plan to work on this project Thu-Sun, approximately from noon until midnight.&lt;br /&gt;
&lt;br /&gt;
=== Have you participated in an open-source project before? ===&lt;br /&gt;
&#039;&#039;If so, please send us URLs to your profile pages for those projects, or some other demonstration of the work that you have done in open-source. If not, why do you want to work on an open-source project this summer?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is my first open-source project. In the past, I have benefitted from open-source software countless times. Now I want to give something back to the community.&lt;br /&gt;
&lt;br /&gt;
== About my Project ==&lt;br /&gt;
&lt;br /&gt;
=== Project description  ===&lt;br /&gt;
&#039;&#039;What is the name of your project? Describe your project in 10-20 sentences. What are you making? Who are you making it for, and why do they need it? What technologies (programming languages, etc.) will you be using?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Turtle Blocks Python export&#039;&#039;&#039; lets the user export their programming project from the Turtle Blocks activity to a Python script. The generated Python code can be run outside of Turtle Blocks, for example from the command line or in the Pippy IDE.&lt;br /&gt;
&lt;br /&gt;
This tool is designed for users who are already proficient Turtle Block programmers and want to move on to text-based programming. It helps them transfer their knowledge and skills from block-based to text-based programming, as they can see their own creations in a new programming language. Thus, they can focus on the new language rather than the content of the program.&lt;br /&gt;
&lt;br /&gt;
The Python export functionality will be implemented in pure Python, drawing on the internal block code interpreter of Turtle Blocks to convert the blocks to a representation of the program flow. I will then use the &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://docs.python.org/2.6/library/ast.html&amp;lt;/ref&amp;gt; to build the Python syntax tree from this representation. In order to serialize the syntax tree to a string, which can then be written to a file, I plan to use either the &amp;lt;code&amp;gt;codegen&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://dev.pocoo.org/hg/sandbox/file/b2aea937f5bb/ast/codegen.py&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://gist.github.com/mattbasta/791312&amp;lt;/ref&amp;gt; or the &amp;lt;code&amp;gt;unparse&amp;lt;/code&amp;gt; module.&amp;lt;ref&amp;gt;http://svn.python.org/view/python/trunk/Demo/parser/unparse.py?view=markup&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;!--TODO: decide for one--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The exported Python code will need to import a few classes from Turtle Blocks to set up a window etc. I will isolate these classes from the Turtle Blocks code, so it can easily be imported into the generated code.&lt;br /&gt;
&lt;br /&gt;
=== What is the timeline for development of your project? ===&lt;br /&gt;
&#039;&#039;The Summer of Code work period is June 17 - September 23; tell us what you will be working on each week. (As the summer goes on, you and your mentor will adjust your schedule, but it&#039;s good to have a plan at the beginning so you have an idea of where you&#039;re headed.) Note that you should probably plan to have something &amp;quot;working and 90% done&amp;quot; by the midterm evaluation (August 2); the last steps always take longer than you think, and we will consider cancelling projects which are not mostly working by then.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt; These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code.&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== My Backround ===&lt;br /&gt;
&#039;&#039;Convince us, in 5-15 sentences, that you will be able to successfully complete your project in the timeline you have described. This is usually where people describe their past experiences, credentials, prior projects, schoolwork, and that sort of thing, but be creative. Link to prior work or other resources as relevant.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Me and the Community ==&lt;br /&gt;
&lt;br /&gt;
=== Impact on the Sugar Labs community ===&lt;br /&gt;
&#039;&#039;If your project is successfully completed, what will its impact be on the Sugar Labs community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Sugar Labs community, at least one of whom should be a Sugar Labs GSoC mentor. Provide email contact information for non-GSoC mentors.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Many Sugar activities allow exporting the user&#039;s creations as a sound file, a picture, a video, or a simple text file, which can then be imported into other activities. In the case of this project, the user can export their block program to Python code and view, edit, and run it in the Pippy and Terminal activities. Combining several activities to create a single piece of work inspires users&#039; creativity. Moreover, it makes Sugar a coherent system, rather than just an arbitrary collection of activities. Users will view it as a tool kit that helps them realize their ideas, no matter which forms they take. This unlimitedness is an important aspect of Sugar&#039;s quality, and thus it ensures continued interest in Sugar in the future.&lt;br /&gt;
&lt;br /&gt;
[[User:Walter|Walter Bender]], mentor of this project:&amp;lt;br/&amp;gt;&lt;br /&gt;
The primary goal of Turtle Blocks is to engage children in programming, specifically the joy of debugging. But also to give them a sense of empowerment over the tools that they use. Hence Turtle Blocks (as opposed to its sister project Turtle Art) exposes the learner to as much of the system as possible, through sensor blocks, Python blocks, etc. At the same time, Turtle Blocks is not an end in of itself. The further goal is to encourage the learners to move beyond block-based projects and get acquainted with the more expressive text-based languages. This project is an experiment to determine if providing a Python version of the block-based programming environment might provide a stepping stone to making this transition. Until we implement Sugar itself as a Turtle Blocks project, this experiment is a worthwhile bet at turning Sugar users into Sugar developers.&lt;br /&gt;
&lt;br /&gt;
[[User:Rgs|Raúl Gutiérrez Segalés]], Turtle Art contributor:&amp;lt;br/&amp;gt;&lt;br /&gt;
In my mind, the big take away here is that we&#039;ll enable portability of&lt;br /&gt;
Turtle Art projects. Being able to translate TA internal&lt;br /&gt;
code into external languages (initially Python, eventually Javascript&lt;br /&gt;
perhaps, or others) will allow this fundamental learning activity to&lt;br /&gt;
reach other platforms and a much broader audience. The question we&#039;ve&lt;br /&gt;
got in front of us is not if Sugar or Turtle Art belong in the Cloud;&lt;br /&gt;
it&#039;s just how fast can we get there.&amp;lt;br/&amp;gt;&lt;br /&gt;
This project is a key step towards our goal of getting Sugar/Turtle&lt;br /&gt;
Art onto more hands.&lt;br /&gt;
&lt;br /&gt;
=== Sugar pilot deployment ===&lt;br /&gt;
&#039;&#039;Sugar Labs will be working to set up a small (5-30 unit) Sugar pilot near each student project that is accepted to GSoC so that you can immediately see how your work affects children in a deployment. We will make arrangements to either supply or find all the equipment needed. Do you have any ideas on where you would like your deployment to be, who you would like to be involved, and how we can help you and the community in your area begin it?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== What will you do if you get stuck on your project and your mentor isn&#039;t around? ===&lt;br /&gt;
&lt;br /&gt;
=== Keeping the community informed about problems and questions ===&lt;br /&gt;
&#039;&#039;How do you propose you will be keeping the community informed of your progress and any problems or questions you might have over the course of the project?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== Screenshot of my Sugar development environment ===&lt;br /&gt;
&#039;&#039;We want to make sure that you can set up a development environment before the summer starts. Please send us a link to a screenshot of your Sugar development environment with the following modification: when you hover over the XO-person icon in the middle of Home view, the drop-down text should have your email in place of &amp;quot;Restart.&amp;quot; See the image on the right for an example. It&#039;s normal to need assistance with this, so please visit our IRC channel, #sugar on irc.freenode.net, and ask for help.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Marion-Zepf_devel-env-screenshot.png|400px|Screenshot of Marion Zepf&#039;s development environment of Sugar with the &#039;restart&#039; label replaced with her email address.]]&lt;br /&gt;
&lt;br /&gt;
=== What is your t-shirt size? ===&lt;br /&gt;
&#039;&#039;(Yes, we know Google asks for this already; humor us.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
S (female)&lt;br /&gt;
&lt;br /&gt;
=== Describe a great learning experience you had as a child. ===&lt;br /&gt;
&lt;br /&gt;
=== Additional information ===&lt;br /&gt;
&#039;&#039;Is there anything else we should have asked you or anything else that we should know that might make us like you or your project more?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87837</id>
		<title>Summer of Code/2013/Turtle Blocks Python export</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87837"/>
		<updated>2013-05-02T14:07:50Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: added concrete dates to the timeline&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My name is [[User:Marion Zepf|Marion Zepf]] and I would like to work on the project [[Summer_of_Code/2013#Python_export_functionality_for_Turtle_Blocks|Python export funtionality for TurtleBlocks]]. Please find my application below.&lt;br /&gt;
&lt;br /&gt;
== About me ==&lt;br /&gt;
&lt;br /&gt;
=== What is your name? ===&lt;br /&gt;
Marion Zepf&lt;br /&gt;
&lt;br /&gt;
=== What is your email address? ===&lt;br /&gt;
[mailto:marion.zepf@gmail.com marion.zepf@gmail.com]&lt;br /&gt;
&lt;br /&gt;
=== What is your Sugar Labs wiki username? ===&lt;br /&gt;
[[User:Marion Zepf|Marion Zepf]]&lt;br /&gt;
&lt;br /&gt;
=== What is your IRC nickname? ===&lt;br /&gt;
I do not have a fixed nickname, but I try to use &amp;quot;mzepf&amp;quot; if it is available.&lt;br /&gt;
&lt;br /&gt;
=== What is your primary language? ===&lt;br /&gt;
&#039;&#039;(We have mentors who speak multiple languages and can match you with one of them if you&#039;d prefer.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My native language is German, but I am more comfortable in English when it comes to computers and programming.&lt;br /&gt;
&lt;br /&gt;
=== Where are you located, and what hours do you tend to work? ===&lt;br /&gt;
&#039;&#039;(We also try to match mentors by general time zone if possible.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am located in Stuttgart and Tübingen, Germany. My time zone is Central European Summer Time (CEST) or UTC+02:00 during summer.&lt;br /&gt;
I plan to work on this project Thu-Sun, approximately from noon until midnight.&lt;br /&gt;
&lt;br /&gt;
=== Have you participated in an open-source project before? ===&lt;br /&gt;
&#039;&#039;If so, please send us URLs to your profile pages for those projects, or some other demonstration of the work that you have done in open-source. If not, why do you want to work on an open-source project this summer?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is my first open-source project. In the past, I have benefitted from open-source software countless times. Now I want to give something back to the community.&lt;br /&gt;
&lt;br /&gt;
== About my Project ==&lt;br /&gt;
&lt;br /&gt;
=== Project description  ===&lt;br /&gt;
&#039;&#039;What is the name of your project? Describe your project in 10-20 sentences. What are you making? Who are you making it for, and why do they need it? What technologies (programming languages, etc.) will you be using?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Turtle Blocks Python export&#039;&#039;&#039; lets the user export their programming project from the Turtle Blocks activity to a Python script. The generated Python code can be run outside of Turtle Blocks, for example from the command line or in the Pippy IDE.&lt;br /&gt;
&lt;br /&gt;
This tool is designed for users who are already proficient Turtle Block programmers and want to move on to text-based programming. It helps them transfer their knowledge and skills from block-based to text-based programming, as they can see their own creations in a new programming language. Thus, they can focus on the new language rather than the content of the program.&lt;br /&gt;
&lt;br /&gt;
The Python export functionality will be implemented in pure Python, drawing on the internal block code interpreter of Turtle Blocks to convert the blocks to a representation of the program flow. I will then use the &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://docs.python.org/2.6/library/ast.html&amp;lt;/ref&amp;gt; to build the Python syntax tree from this representation. In order to serialize the syntax tree to a string, which can then be written to a file, I plan to use either the &amp;lt;code&amp;gt;codegen&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://dev.pocoo.org/hg/sandbox/file/b2aea937f5bb/ast/codegen.py&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://gist.github.com/mattbasta/791312&amp;lt;/ref&amp;gt; or the &amp;lt;code&amp;gt;unparse&amp;lt;/code&amp;gt; module.&amp;lt;ref&amp;gt;http://svn.python.org/view/python/trunk/Demo/parser/unparse.py?view=markup&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;!--TODO: decide for one--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The exported Python code will need to import a few classes from Turtle Blocks to set up a window etc. I will isolate these classes from the Turtle Blocks code, so it can easily be imported into the generated code.&lt;br /&gt;
&lt;br /&gt;
=== What is the timeline for development of your project? ===&lt;br /&gt;
&#039;&#039;The Summer of Code work period is June 17 - September 23; tell us what you will be working on each week. (As the summer goes on, you and your mentor will adjust your schedule, but it&#039;s good to have a plan at the beginning so you have an idea of where you&#039;re headed.) Note that you should probably plan to have something &amp;quot;working and 90% done&amp;quot; by the midterm evaluation (August 2); the last steps always take longer than you think, and we will consider cancelling projects which are not mostly working by then.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. Only cover the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. Deal with the other modules when implementing the corresponding blocks.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Implement transformations of the rest of the &#039;Turtle&#039; palette, and the complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.)&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** August 3 – August 11 (1 week)&lt;br /&gt;
*** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** August 12 – August 18 (1 week)&lt;br /&gt;
*** Variables from the &#039;Action stacks&#039; palette and heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
*** Loops from the &#039;Flow operators&#039; palette and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** August 19 – August 25 (1 week)&lt;br /&gt;
*** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
*** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** August 26 – September 1 (1 week)&lt;br /&gt;
*** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** September 2 – September 8 (1 week)&lt;br /&gt;
*** Events and user input from the &#039;Sensors&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
** September 9 – September 15 (1 week)&lt;br /&gt;
*** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;&lt;br /&gt;
*** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette:&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt; These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code.&amp;lt;!-- TODO report results of discussion --&amp;gt;&lt;br /&gt;
* September 16 – September 23 (1 week): Test exporting different kinds of blocks in combination. Fix the last bugs. Clean up.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;references group=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;requires-add-imports&amp;quot;&amp;gt;This may require importing additional modules from Turtle Blocks.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== My Backround ===&lt;br /&gt;
&#039;&#039;Convince us, in 5-15 sentences, that you will be able to successfully complete your project in the timeline you have described. This is usually where people describe their past experiences, credentials, prior projects, schoolwork, and that sort of thing, but be creative. Link to prior work or other resources as relevant.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Me and the Community ==&lt;br /&gt;
&lt;br /&gt;
=== Impact on the Sugar Labs community ===&lt;br /&gt;
&#039;&#039;If your project is successfully completed, what will its impact be on the Sugar Labs community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Sugar Labs community, at least one of whom should be a Sugar Labs GSoC mentor. Provide email contact information for non-GSoC mentors.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Sugar pilot deployment ===&lt;br /&gt;
&#039;&#039;Sugar Labs will be working to set up a small (5-30 unit) Sugar pilot near each student project that is accepted to GSoC so that you can immediately see how your work affects children in a deployment. We will make arrangements to either supply or find all the equipment needed. Do you have any ideas on where you would like your deployment to be, who you would like to be involved, and how we can help you and the community in your area begin it?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== What will you do if you get stuck on your project and your mentor isn&#039;t around? ===&lt;br /&gt;
&lt;br /&gt;
=== Keeping the community informed about problems and questions ===&lt;br /&gt;
&#039;&#039;How do you propose you will be keeping the community informed of your progress and any problems or questions you might have over the course of the project?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== Screenshot of my Sugar development environment ===&lt;br /&gt;
&#039;&#039;We want to make sure that you can set up a development environment before the summer starts. Please send us a link to a screenshot of your Sugar development environment with the following modification: when you hover over the XO-person icon in the middle of Home view, the drop-down text should have your email in place of &amp;quot;Restart.&amp;quot; See the image on the right for an example. It&#039;s normal to need assistance with this, so please visit our IRC channel, #sugar on irc.freenode.net, and ask for help.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Marion-Zepf_devel-env-screenshot.png|400px|Screenshot of Marion Zepf&#039;s development environment of Sugar with the &#039;restart&#039; label replaced with her email address.]]&lt;br /&gt;
&lt;br /&gt;
=== What is your t-shirt size? ===&lt;br /&gt;
&#039;&#039;(Yes, we know Google asks for this already; humor us.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
S (female)&lt;br /&gt;
&lt;br /&gt;
=== Describe a great learning experience you had as a child. ===&lt;br /&gt;
&lt;br /&gt;
=== Additional information ===&lt;br /&gt;
&#039;&#039;Is there anything else we should have asked you or anything else that we should know that might make us like you or your project more?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87831</id>
		<title>Summer of Code/2013/Turtle Blocks Python export</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87831"/>
		<updated>2013-05-02T13:17:30Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: +timeline (preliminary)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My name is [[User:Marion Zepf|Marion Zepf]] and I would like to work on the project [[Summer_of_Code/2013#Python_export_functionality_for_Turtle_Blocks|Python export funtionality for TurtleBlocks]]. Please find my application below.&lt;br /&gt;
&lt;br /&gt;
== About me ==&lt;br /&gt;
&lt;br /&gt;
=== What is your name? ===&lt;br /&gt;
Marion Zepf&lt;br /&gt;
&lt;br /&gt;
=== What is your email address? ===&lt;br /&gt;
[mailto:marion.zepf@gmail.com marion.zepf@gmail.com]&lt;br /&gt;
&lt;br /&gt;
=== What is your Sugar Labs wiki username? ===&lt;br /&gt;
[[User:Marion Zepf|Marion Zepf]]&lt;br /&gt;
&lt;br /&gt;
=== What is your IRC nickname? ===&lt;br /&gt;
I do not have a fixed nickname, but I try to use &amp;quot;mzepf&amp;quot; if it is available.&lt;br /&gt;
&lt;br /&gt;
=== What is your primary language? ===&lt;br /&gt;
&#039;&#039;(We have mentors who speak multiple languages and can match you with one of them if you&#039;d prefer.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My native language is German, but I am more comfortable in English when it comes to computers and programming.&lt;br /&gt;
&lt;br /&gt;
=== Where are you located, and what hours do you tend to work? ===&lt;br /&gt;
&#039;&#039;(We also try to match mentors by general time zone if possible.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am located in Stuttgart and Tübingen, Germany. My time zone is Central European Summer Time (CEST) or UTC+02:00 during summer.&lt;br /&gt;
I plan to work on this project Thu-Sun, approximately from noon until midnight.&lt;br /&gt;
&lt;br /&gt;
=== Have you participated in an open-source project before? ===&lt;br /&gt;
&#039;&#039;If so, please send us URLs to your profile pages for those projects, or some other demonstration of the work that you have done in open-source. If not, why do you want to work on an open-source project this summer?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is my first open-source project. In the past, I have benefitted from open-source software countless times. Now I want to give something back to the community.&lt;br /&gt;
&lt;br /&gt;
== About my Project ==&lt;br /&gt;
&lt;br /&gt;
=== Project description  ===&lt;br /&gt;
&#039;&#039;What is the name of your project? Describe your project in 10-20 sentences. What are you making? Who are you making it for, and why do they need it? What technologies (programming languages, etc.) will you be using?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Turtle Blocks Python export&#039;&#039;&#039; lets the user export their programming project from the Turtle Blocks activity to a Python script. The generated Python code can be run outside of Turtle Blocks, for example from the command line or in the Pippy IDE.&lt;br /&gt;
&lt;br /&gt;
This tool is designed for users who are already proficient Turtle Block programmers and want to move on to text-based programming. It helps them transfer their knowledge and skills from block-based to text-based programming, as they can see their own creations in a new programming language. Thus, they can focus on the new language rather than the content of the program.&lt;br /&gt;
&lt;br /&gt;
The Python export functionality will be implemented in pure Python, drawing on the internal block code interpreter of Turtle Blocks to convert the blocks to a representation of the program flow. I will then use the &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://docs.python.org/2.6/library/ast.html&amp;lt;/ref&amp;gt; to build the Python syntax tree from this representation. In order to serialize the syntax tree to a string, which can then be written to a file, I plan to use either the &amp;lt;code&amp;gt;codegen&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://dev.pocoo.org/hg/sandbox/file/b2aea937f5bb/ast/codegen.py&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://gist.github.com/mattbasta/791312&amp;lt;/ref&amp;gt; or the &amp;lt;code&amp;gt;unparse&amp;lt;/code&amp;gt; module.&amp;lt;ref&amp;gt;http://svn.python.org/view/python/trunk/Demo/parser/unparse.py?view=markup&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;!--TODO: decide for one--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The exported Python code will need to import a few classes from Turtle Blocks to set up a window etc. I will isolate these classes from the Turtle Blocks code, so it can easily be imported into the generated code.&lt;br /&gt;
&lt;br /&gt;
=== What is the timeline for development of your project? ===&lt;br /&gt;
&#039;&#039;The Summer of Code work period is June 17 - September 23; tell us what you will be working on each week. (As the summer goes on, you and your mentor will adjust your schedule, but it&#039;s good to have a plan at the beginning so you have an idea of where you&#039;re headed.) Note that you should probably plan to have something &amp;quot;working and 90% done&amp;quot; by the midterm evaluation (August 2); the last steps always take longer than you think, and we will consider cancelling projects which are not mostly working by then.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* June 17 – June 30 (2 weeks): Determine what code needs to be shared by Turtle Blocks and the exported code. Restructure the modules to isolate this part, so it can easily be imported. This only covers the modules that are necessary to run blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palettes. The other modules will be dealt with when the corresponding blocks are implemented.&lt;br /&gt;
* July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. This will only cover the following blocks from the &#039;Turtle&#039; palette: &#039;forward&#039;, &#039;back&#039;, &#039;left&#039;, and &#039;right&#039;. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily.&lt;br /&gt;
* July 22 – July 28 (1 week): Rest of the &#039;Turtle&#039; palette, and complete &#039;Pen&#039; and &#039;Pen colors&#039; palettes. These should be similar enough to the first four blocks that they can be implemented quickly.&lt;br /&gt;
* July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the &#039;Turtle&#039;, &#039;Pen&#039;, and &#039;Pen colors&#039; palette, but it can easily be extended to cover the other blocks.&lt;br /&gt;
* August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code:&lt;br /&gt;
** Numeric operations from the &#039;Numeric operators&#039; palette and screen dimensions from the &#039;Presentation templates&#039; palette&lt;br /&gt;
** Boolean operations from the &#039;Numeric operators&#039; palette and conditionals from the &#039;Flow operators&#039; palette&lt;br /&gt;
** Variables and functions from the &#039;Action stacks&#039; palette&lt;br /&gt;
** Loops from the &#039;Flow operators&#039; palette&lt;br /&gt;
** Heaps from the &#039;Extra options&#039; palette&lt;br /&gt;
** Runtime control (e.g., exit, suspension) from the &#039;Flow operators&#039; palette&lt;br /&gt;
** External functions (chr, int, mathematical function, tamyblock.py) from the &#039;Extra options&#039; palette&lt;br /&gt;
** Comments from the &#039;Extra options&#039; palette: This is especially difficult because Python&#039;s &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module does not support comments natively.&lt;br /&gt;
** Events and user input from the &#039;Sensors&#039; palette&lt;br /&gt;
** Sounds and sprites from the &#039;Media&#039; palette and presentation templates from the &#039;Presentation templates&#039; palette&lt;br /&gt;
** Multiple turtles and custom turtle shells from the &#039;Extra options&#039; palette&lt;br /&gt;
** Display management (hide/ show blocks, toggle full screen) from the &#039;Presentation templates&#039; palette, and printing and loading blocks and palettes from the &#039;Extra options&#039; palette: These are very specific to Turtle Blocks. We need further discussion how this should look in the output of the exported Python code.&lt;br /&gt;
&lt;br /&gt;
=== My Backround ===&lt;br /&gt;
&#039;&#039;Convince us, in 5-15 sentences, that you will be able to successfully complete your project in the timeline you have described. This is usually where people describe their past experiences, credentials, prior projects, schoolwork, and that sort of thing, but be creative. Link to prior work or other resources as relevant.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Me and the Community ==&lt;br /&gt;
&lt;br /&gt;
=== Impact on the Sugar Labs community ===&lt;br /&gt;
&#039;&#039;If your project is successfully completed, what will its impact be on the Sugar Labs community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Sugar Labs community, at least one of whom should be a Sugar Labs GSoC mentor. Provide email contact information for non-GSoC mentors.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Sugar pilot deployment ===&lt;br /&gt;
&#039;&#039;Sugar Labs will be working to set up a small (5-30 unit) Sugar pilot near each student project that is accepted to GSoC so that you can immediately see how your work affects children in a deployment. We will make arrangements to either supply or find all the equipment needed. Do you have any ideas on where you would like your deployment to be, who you would like to be involved, and how we can help you and the community in your area begin it?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== What will you do if you get stuck on your project and your mentor isn&#039;t around? ===&lt;br /&gt;
&lt;br /&gt;
=== Keeping the community informed about problems and questions ===&lt;br /&gt;
&#039;&#039;How do you propose you will be keeping the community informed of your progress and any problems or questions you might have over the course of the project?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== Screenshot of my Sugar development environment ===&lt;br /&gt;
&#039;&#039;We want to make sure that you can set up a development environment before the summer starts. Please send us a link to a screenshot of your Sugar development environment with the following modification: when you hover over the XO-person icon in the middle of Home view, the drop-down text should have your email in place of &amp;quot;Restart.&amp;quot; See the image on the right for an example. It&#039;s normal to need assistance with this, so please visit our IRC channel, #sugar on irc.freenode.net, and ask for help.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Marion-Zepf_devel-env-screenshot.png|400px|Screenshot of Marion Zepf&#039;s development environment of Sugar with the &#039;restart&#039; label replaced with her email address.]]&lt;br /&gt;
&lt;br /&gt;
=== What is your t-shirt size? ===&lt;br /&gt;
&#039;&#039;(Yes, we know Google asks for this already; humor us.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
S (female)&lt;br /&gt;
&lt;br /&gt;
=== Describe a great learning experience you had as a child. ===&lt;br /&gt;
&lt;br /&gt;
=== Additional information ===&lt;br /&gt;
&#039;&#039;Is there anything else we should have asked you or anything else that we should know that might make us like you or your project more?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87814</id>
		<title>Summer of Code/2013/Turtle Blocks Python export</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87814"/>
		<updated>2013-04-30T23:22:19Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: +screenshot of my Sugar devel env&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My name is [[User:Marion Zepf|Marion Zepf]] and I would like to work on the project [[Summer_of_Code/2013#Python_export_functionality_for_Turtle_Blocks|Python export funtionality for TurtleBlocks]]. Please find my application below.&lt;br /&gt;
&lt;br /&gt;
== About me ==&lt;br /&gt;
&lt;br /&gt;
=== What is your name? ===&lt;br /&gt;
Marion Zepf&lt;br /&gt;
&lt;br /&gt;
=== What is your email address? ===&lt;br /&gt;
[mailto:marion.zepf@gmail.com marion.zepf@gmail.com]&lt;br /&gt;
&lt;br /&gt;
=== What is your Sugar Labs wiki username? ===&lt;br /&gt;
[[User:Marion Zepf|Marion Zepf]]&lt;br /&gt;
&lt;br /&gt;
=== What is your IRC nickname? ===&lt;br /&gt;
I do not have a fixed nickname, but I try to use &amp;quot;mzepf&amp;quot; if it is available.&lt;br /&gt;
&lt;br /&gt;
=== What is your primary language? ===&lt;br /&gt;
&#039;&#039;(We have mentors who speak multiple languages and can match you with one of them if you&#039;d prefer.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My native language is German, but I am more comfortable in English when it comes to computers and programming.&lt;br /&gt;
&lt;br /&gt;
=== Where are you located, and what hours do you tend to work? ===&lt;br /&gt;
&#039;&#039;(We also try to match mentors by general time zone if possible.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am located in Stuttgart and Tübingen, Germany. My time zone is Central European Summer Time (CEST) or UTC+02:00 during summer.&lt;br /&gt;
&amp;lt;!--TODO: usual work hours--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Have you participated in an open-source project before? ===&lt;br /&gt;
&#039;&#039;If so, please send us URLs to your profile pages for those projects, or some other demonstration of the work that you have done in open-source. If not, why do you want to work on an open-source project this summer?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is my first open-source project. In the past, I have benefitted from open-source software countless times. Now I want to give something back to the community.&lt;br /&gt;
&lt;br /&gt;
== About my Project ==&lt;br /&gt;
&lt;br /&gt;
=== Project description  ===&lt;br /&gt;
&#039;&#039;What is the name of your project? Describe your project in 10-20 sentences. What are you making? Who are you making it for, and why do they need it? What technologies (programming languages, etc.) will you be using?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Turtle Blocks Python export&#039;&#039;&#039; lets the user export their programming project from the Turtle Blocks activity to a Python script. The generated Python code can be run outside of Turtle Blocks, for example from the command line or in the Pippy IDE.&lt;br /&gt;
&lt;br /&gt;
This tool is designed for users who are already proficient Turtle Block programmers and want to move on to text-based programming. It helps them transfer their knowledge and skills from block-based to text-based programming, as they can see their own creations in a new programming language. Thus, they can focus on the new language rather than the content of the program.&lt;br /&gt;
&lt;br /&gt;
The Python export functionality will be implemented in pure Python, drawing on the internal block code interpreter of Turtle Blocks to convert the blocks to a representation of the program flow. I will then use the &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://docs.python.org/2.6/library/ast.html&amp;lt;/ref&amp;gt; to build the Python syntax tree from this representation. In order to serialize the syntax tree to a string, which can then be written to a file, I plan to use either the &amp;lt;code&amp;gt;codegen&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://dev.pocoo.org/hg/sandbox/file/b2aea937f5bb/ast/codegen.py&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://gist.github.com/mattbasta/791312&amp;lt;/ref&amp;gt; or the &amp;lt;code&amp;gt;unparse&amp;lt;/code&amp;gt; module.&amp;lt;ref&amp;gt;http://svn.python.org/view/python/trunk/Demo/parser/unparse.py?view=markup&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;!--TODO: decide for one--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The exported Python code will need to import a few classes from Turtle Blocks to set up a window etc. I will isolate these classes from the Turtle Blocks code, so it can easily be imported into the generated code.&lt;br /&gt;
&lt;br /&gt;
=== What is the timeline for development of your project? ===&lt;br /&gt;
&#039;&#039;The Summer of Code work period is June 17 - September 23; tell us what you will be working on each week. (As the summer goes on, you and your mentor will adjust your schedule, but it&#039;s good to have a plan at the beginning so you have an idea of where you&#039;re headed.) Note that you should probably plan to have something &amp;quot;working and 90% done&amp;quot; by the midterm evaluation (August 2); the last steps always take longer than you think, and we will consider cancelling projects which are not mostly working by then.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== My Backround ===&lt;br /&gt;
&#039;&#039;Convince us, in 5-15 sentences, that you will be able to successfully complete your project in the timeline you have described. This is usually where people describe their past experiences, credentials, prior projects, schoolwork, and that sort of thing, but be creative. Link to prior work or other resources as relevant.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Me and the Community ==&lt;br /&gt;
&lt;br /&gt;
=== Impact on the Sugar Labs community ===&lt;br /&gt;
&#039;&#039;If your project is successfully completed, what will its impact be on the Sugar Labs community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Sugar Labs community, at least one of whom should be a Sugar Labs GSoC mentor. Provide email contact information for non-GSoC mentors.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Sugar pilot deployment ===&lt;br /&gt;
&#039;&#039;Sugar Labs will be working to set up a small (5-30 unit) Sugar pilot near each student project that is accepted to GSoC so that you can immediately see how your work affects children in a deployment. We will make arrangements to either supply or find all the equipment needed. Do you have any ideas on where you would like your deployment to be, who you would like to be involved, and how we can help you and the community in your area begin it?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== What will you do if you get stuck on your project and your mentor isn&#039;t around? ===&lt;br /&gt;
&lt;br /&gt;
=== Keeping the community informed about problems and questions ===&lt;br /&gt;
&#039;&#039;How do you propose you will be keeping the community informed of your progress and any problems or questions you might have over the course of the project?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== Screenshot of my Sugar development environment ===&lt;br /&gt;
&#039;&#039;We want to make sure that you can set up a development environment before the summer starts. Please send us a link to a screenshot of your Sugar development environment with the following modification: when you hover over the XO-person icon in the middle of Home view, the drop-down text should have your email in place of &amp;quot;Restart.&amp;quot; See the image on the right for an example. It&#039;s normal to need assistance with this, so please visit our IRC channel, #sugar on irc.freenode.net, and ask for help.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Marion-Zepf_devel-env-screenshot.png|400px|Screenshot of Marion Zepf&#039;s development environment of Sugar with the &#039;restart&#039; label replaced with her email address.]]&lt;br /&gt;
&lt;br /&gt;
=== What is your t-shirt size? ===&lt;br /&gt;
&#039;&#039;(Yes, we know Google asks for this already; humor us.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
S (female)&lt;br /&gt;
&lt;br /&gt;
=== Describe a great learning experience you had as a child. ===&lt;br /&gt;
&lt;br /&gt;
=== Additional information ===&lt;br /&gt;
&#039;&#039;Is there anything else we should have asked you or anything else that we should know that might make us like you or your project more?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=File:Marion-Zepf_devel-env-screenshot.png&amp;diff=87813</id>
		<title>File:Marion-Zepf devel-env-screenshot.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=File:Marion-Zepf_devel-env-screenshot.png&amp;diff=87813"/>
		<updated>2013-04-30T23:16:36Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: Screenshot of Marion Zepf&amp;#039;s development environment of Sugar with the &amp;#039;restart&amp;#039; label replaced with her email address, as required for the Google Summer of Code 2013.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Screenshot of Marion Zepf&#039;s development environment of Sugar with the &#039;restart&#039; label replaced with her email address, as required for the Google Summer of Code 2013.&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87790</id>
		<title>Summer of Code/2013/Turtle Blocks Python export</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87790"/>
		<updated>2013-04-30T08:37:42Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: t-shirt size, formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My name is [[User:Marion Zepf|Marion Zepf]] and I would like to work on the project [[Summer_of_Code/2013#Python_export_functionality_for_Turtle_Blocks|Python export funtionality for TurtleBlocks]]. Please find my application below.&lt;br /&gt;
&lt;br /&gt;
== About me ==&lt;br /&gt;
&lt;br /&gt;
=== What is your name? ===&lt;br /&gt;
Marion Zepf&lt;br /&gt;
&lt;br /&gt;
=== What is your email address? ===&lt;br /&gt;
[mailto:marion.zepf@gmail.com marion.zepf@gmail.com]&lt;br /&gt;
&lt;br /&gt;
=== What is your Sugar Labs wiki username? ===&lt;br /&gt;
[[User:Marion Zepf|Marion Zepf]]&lt;br /&gt;
&lt;br /&gt;
=== What is your IRC nickname? ===&lt;br /&gt;
I do not have a fixed nickname, but I try to use &amp;quot;mzepf&amp;quot; if it is available.&lt;br /&gt;
&lt;br /&gt;
=== What is your primary language? ===&lt;br /&gt;
&#039;&#039;(We have mentors who speak multiple languages and can match you with one of them if you&#039;d prefer.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My native language is German, but I am more comfortable in English when it comes to computers and programming.&lt;br /&gt;
&lt;br /&gt;
=== Where are you located, and what hours do you tend to work? ===&lt;br /&gt;
&#039;&#039;(We also try to match mentors by general time zone if possible.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am located in Stuttgart and Tübingen, Germany. My time zone is Central European Summer Time (CEST) or UTC+02:00 during summer.&lt;br /&gt;
&amp;lt;!--TODO: usual work hours--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Have you participated in an open-source project before? ===&lt;br /&gt;
&#039;&#039;If so, please send us URLs to your profile pages for those projects, or some other demonstration of the work that you have done in open-source. If not, why do you want to work on an open-source project this summer?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is my first open-source project. In the past, I have benefitted from open-source software countless times. Now I want to give something back to the community.&lt;br /&gt;
&lt;br /&gt;
== About my Project ==&lt;br /&gt;
&lt;br /&gt;
=== Project description  ===&lt;br /&gt;
&#039;&#039;What is the name of your project? Describe your project in 10-20 sentences. What are you making? Who are you making it for, and why do they need it? What technologies (programming languages, etc.) will you be using?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Turtle Blocks Python export&#039;&#039;&#039; lets the user export their programming project from the Turtle Blocks activity to a Python script. The generated Python code can be run outside of Turtle Blocks, for example from the command line or in the Pippy IDE.&lt;br /&gt;
&lt;br /&gt;
This tool is designed for users who are already proficient Turtle Block programmers and want to move on to text-based programming. It helps them transfer their knowledge and skills from block-based to text-based programming, as they can see their own creations in a new programming language. Thus, they can focus on the new language rather than the content of the program.&lt;br /&gt;
&lt;br /&gt;
The Python export functionality will be implemented in pure Python, drawing on the internal block code interpreter of Turtle Blocks to convert the blocks to a representation of the program flow. I will then use the &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://docs.python.org/2.6/library/ast.html&amp;lt;/ref&amp;gt; to build the Python syntax tree from this representation. In order to serialize the syntax tree to a string, which can then be written to a file, I plan to use either the &amp;lt;code&amp;gt;codegen&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://dev.pocoo.org/hg/sandbox/file/b2aea937f5bb/ast/codegen.py&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://gist.github.com/mattbasta/791312&amp;lt;/ref&amp;gt; or the &amp;lt;code&amp;gt;unparse&amp;lt;/code&amp;gt; module.&amp;lt;ref&amp;gt;http://svn.python.org/view/python/trunk/Demo/parser/unparse.py?view=markup&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;!--TODO: decide for one--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The exported Python code will need to import a few classes from Turtle Blocks to set up a window etc. I will isolate these classes from the Turtle Blocks code, so it can easily be imported into the generated code.&lt;br /&gt;
&lt;br /&gt;
=== What is the timeline for development of your project? ===&lt;br /&gt;
&#039;&#039;The Summer of Code work period is June 17 - September 23; tell us what you will be working on each week. (As the summer goes on, you and your mentor will adjust your schedule, but it&#039;s good to have a plan at the beginning so you have an idea of where you&#039;re headed.) Note that you should probably plan to have something &amp;quot;working and 90% done&amp;quot; by the midterm evaluation (August 2); the last steps always take longer than you think, and we will consider cancelling projects which are not mostly working by then.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== My Backround ===&lt;br /&gt;
&#039;&#039;Convince us, in 5-15 sentences, that you will be able to successfully complete your project in the timeline you have described. This is usually where people describe their past experiences, credentials, prior projects, schoolwork, and that sort of thing, but be creative. Link to prior work or other resources as relevant.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Me and the Community ==&lt;br /&gt;
&lt;br /&gt;
=== Impact on the Sugar Labs community ===&lt;br /&gt;
&#039;&#039;If your project is successfully completed, what will its impact be on the Sugar Labs community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Sugar Labs community, at least one of whom should be a Sugar Labs GSoC mentor. Provide email contact information for non-GSoC mentors.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Sugar pilot deployment ===&lt;br /&gt;
&#039;&#039;Sugar Labs will be working to set up a small (5-30 unit) Sugar pilot near each student project that is accepted to GSoC so that you can immediately see how your work affects children in a deployment. We will make arrangements to either supply or find all the equipment needed. Do you have any ideas on where you would like your deployment to be, who you would like to be involved, and how we can help you and the community in your area begin it?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== What will you do if you get stuck on your project and your mentor isn&#039;t around? ===&lt;br /&gt;
&lt;br /&gt;
=== Keeping the community informed about problems and questions ===&lt;br /&gt;
&#039;&#039;How do you propose you will be keeping the community informed of your progress and any problems or questions you might have over the course of the project?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== Screenshot of my Sugar development environment ===&lt;br /&gt;
&#039;&#039;We want to make sure that you can set up a development environment before the summer starts. Please send us a link to a screenshot of your Sugar development environment with the following modification: when you hover over the XO-person icon in the middle of Home view, the drop-down text should have your email in place of &amp;quot;Restart.&amp;quot; See the image on the right for an example. It&#039;s normal to need assistance with this, so please visit our IRC channel, #sugar on irc.freenode.net, and ask for help.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== What is your t-shirt size? ===&lt;br /&gt;
&#039;&#039;(Yes, we know Google asks for this already; humor us.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
S (female)&lt;br /&gt;
&lt;br /&gt;
=== Describe a great learning experience you had as a child. ===&lt;br /&gt;
&lt;br /&gt;
=== Additional information ===&lt;br /&gt;
&#039;&#039;Is there anything else we should have asked you or anything else that we should know that might make us like you or your project more?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87700</id>
		<title>Summer of Code/2013/Turtle Blocks Python export</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87700"/>
		<updated>2013-04-29T14:42:13Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: +project description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My name is [[User:Marion Zepf|Marion Zepf]] and I would like to work on the project [[Summer_of_Code/2013#Python_export_functionality_for_Turtle_Blocks|Python export funtionality for TurtleBlocks]]. Please find my application below.&lt;br /&gt;
&lt;br /&gt;
== About me ==&lt;br /&gt;
&lt;br /&gt;
=== What is your name? ===&lt;br /&gt;
Marion Zepf&lt;br /&gt;
&lt;br /&gt;
=== What is your email address? ===&lt;br /&gt;
[mailto:marion.zepf@gmail.com marion.zepf@gmail.com]&lt;br /&gt;
&lt;br /&gt;
=== What is your Sugar Labs wiki username? ===&lt;br /&gt;
[[User:Marion Zepf|Marion Zepf]]&lt;br /&gt;
&lt;br /&gt;
=== What is your IRC nickname? ===&lt;br /&gt;
I do not have a fixed nickname, but I try to use &amp;quot;mzepf&amp;quot; if it is available.&lt;br /&gt;
&lt;br /&gt;
=== What is your primary language? ===&lt;br /&gt;
&#039;&#039;(We have mentors who speak multiple languages and can match you with one of them if you&#039;d prefer.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My native language is German, but I am more comfortable in English when it comes to computers and programming.&lt;br /&gt;
&lt;br /&gt;
=== Where are you located, and what hours do you tend to work? ===&lt;br /&gt;
&#039;&#039;(We also try to match mentors by general time zone if possible.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am located in Stuttgart and Tübingen, Germany. My time zone is Central European Summer Time (CEST) or UTC+02:00 during summer.&lt;br /&gt;
&amp;lt;!--TODO: usual work hours--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Have you participated in an open-source project before? ===&lt;br /&gt;
&#039;&#039;If so, please send us URLs to your profile pages for those projects, or some other demonstration of the work that you have done in open-source. If not, why do you want to work on an open-source project this summer?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is my first open-source project. In the past, I have benefitted from open-source software countless times. Now I want to give something back to the community.&lt;br /&gt;
&lt;br /&gt;
== About my Project ==&lt;br /&gt;
&lt;br /&gt;
=== Project description  ===&lt;br /&gt;
&#039;&#039;What is the name of your project? Describe your project in 10-20 sentences. What are you making? Who are you making it for, and why do they need it? What technologies (programming languages, etc.) will you be using?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Turtle Blocks Python export&#039;&#039;&#039; lets the user export their programming project from the Turtle Blocks activity to a Python script. The generated Python code can be run outside of Turtle Blocks, for example from the command line or in the Pippy IDE.&lt;br /&gt;
&lt;br /&gt;
This tool is designed for users who are already proficient Turtle Block programmers and want to move on to text-based programming. It helps them transfer their knowledge and skills from block-based to text-based programming, as they can see their own creations in a new programming language. Thus, they can focus on the new language rather than the content of the program.&lt;br /&gt;
&lt;br /&gt;
The Python export functionality will be implemented in pure Python, drawing on the internal block code interpreter of Turtle Blocks to convert the blocks to a representation of the program flow. I will then use the &amp;lt;code&amp;gt;ast&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://docs.python.org/2.6/library/ast.html&amp;lt;/ref&amp;gt; to build the Python syntax tree from this representation. In order to serialize the syntax tree to a string, which can then be written to a file, I plan to use either the &amp;lt;code&amp;gt;codegen&amp;lt;/code&amp;gt; module&amp;lt;ref&amp;gt;http://dev.pocoo.org/hg/sandbox/file/b2aea937f5bb/ast/codegen.py&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://gist.github.com/mattbasta/791312&amp;lt;/ref&amp;gt; or the &amp;lt;code&amp;gt;unparse&amp;lt;/code&amp;gt; module.&amp;lt;ref&amp;gt;http://svn.python.org/view/python/trunk/Demo/parser/unparse.py?view=markup&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;!--TODO: decide for one--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The exported Python code will need to import a few classes from Turtle Blocks to set up a window etc. I will isolate these classes from the Turtle Blocks code, so it can easily be imported into the generated code.&lt;br /&gt;
&lt;br /&gt;
=== What is the timeline for development of your project? ===&lt;br /&gt;
&#039;&#039;The Summer of Code work period is June 17 - September 23; tell us what you will be working on each week. (As the summer goes on, you and your mentor will adjust your schedule, but it&#039;s good to have a plan at the beginning so you have an idea of where you&#039;re headed.) Note that you should probably plan to have something &amp;quot;working and 90% done&amp;quot; by the midterm evaluation (August 2); the last steps always take longer than you think, and we will consider cancelling projects which are not mostly working by then.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== My Backround ===&lt;br /&gt;
&#039;&#039;Convince us, in 5-15 sentences, that you will be able to successfully complete your project in the timeline you have described. This is usually where people describe their past experiences, credentials, prior projects, schoolwork, and that sort of thing, but be creative. Link to prior work or other resources as relevant.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Me and the Community ==&lt;br /&gt;
&lt;br /&gt;
=== Impact on the Sugar Labs community ===&lt;br /&gt;
&#039;&#039;If your project is successfully completed, what will its impact be on the Sugar Labs community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Sugar Labs community, at least one of whom should be a Sugar Labs GSoC mentor. Provide email contact information for non-GSoC mentors.&#039;&#039;&lt;br /&gt;
=== Sugar pilot deployment ===&lt;br /&gt;
&#039;&#039;Sugar Labs will be working to set up a small (5-30 unit) Sugar pilot near each student project that is accepted to GSoC so that you can immediately see how your work affects children in a deployment. We will make arrangements to either supply or find all the equipment needed. Do you have any ideas on where you would like your deployment to be, who you would like to be involved, and how we can help you and the community in your area begin it?&#039;&#039;&lt;br /&gt;
=== What will you do if you get stuck on your project and your mentor isn&#039;t around? ===&lt;br /&gt;
=== Keeping the community informed about problems and questions ===&lt;br /&gt;
&#039;&#039;How do you propose you will be keeping the community informed of your progress and any problems or questions you might have over the course of the project?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== Screenshot of my Sugar development environment ===&lt;br /&gt;
&#039;&#039;We want to make sure that you can set up a development environment before the summer starts. Please send us a link to a screenshot of your Sugar development environment with the following modification: when you hover over the XO-person icon in the middle of Home view, the drop-down text should have your email in place of &amp;quot;Restart.&amp;quot; See the image on the right for an example. It&#039;s normal to need assistance with this, so please visit our IRC channel, #sugar on irc.freenode.net, and ask for help.&#039;&#039;&lt;br /&gt;
=== What is your t-shirt size? ===&lt;br /&gt;
&#039;&#039;(Yes, we know Google asks for this already; humor us.)&#039;&#039;&lt;br /&gt;
=== Describe a great learning experience you had as a child. ===&lt;br /&gt;
=== Additional information ===&lt;br /&gt;
&#039;&#039;Is there anything else we should have asked you or anything else that we should know that might make us like you or your project more?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87695</id>
		<title>Summer of Code/2013/Turtle Blocks Python export</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Summer_of_Code/2013/Turtle_Blocks_Python_export&amp;diff=87695"/>
		<updated>2013-04-29T12:41:13Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: created page from application template; filled section About me&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My name is [[User:Marion Zepf|Marion Zepf]] and I would like to work on the project [[Summer_of_Code/2013#Python_export_functionality_for_Turtle_Blocks|Python export funtionality for TurtleBlocks]]. Please find my application below.&lt;br /&gt;
&lt;br /&gt;
== About me ==&lt;br /&gt;
&lt;br /&gt;
=== What is your name? ===&lt;br /&gt;
Marion Zepf&lt;br /&gt;
&lt;br /&gt;
=== What is your email address? ===&lt;br /&gt;
[mailto:marion.zepf@gmail.com marion.zepf@gmail.com]&lt;br /&gt;
&lt;br /&gt;
=== What is your Sugar Labs wiki username? ===&lt;br /&gt;
[[User:Marion Zepf|Marion Zepf]]&lt;br /&gt;
&lt;br /&gt;
=== What is your IRC nickname? ===&lt;br /&gt;
I do not have a fixed nickname, but I try to use &amp;quot;mzepf&amp;quot; if it is available.&lt;br /&gt;
&lt;br /&gt;
=== What is your primary language? ===&lt;br /&gt;
&#039;&#039;(We have mentors who speak multiple languages and can match you with one of them if you&#039;d prefer.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
My native language is German, but I am more comfortable in English when it comes to computers and programming.&lt;br /&gt;
&lt;br /&gt;
=== Where are you located, and what hours do you tend to work? ===&lt;br /&gt;
&#039;&#039;(We also try to match mentors by general time zone if possible.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I am located in Stuttgart and Tübingen, Germany. My time zone is Central European Summer Time (CEST) or UTC+02:00 during summer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--TODO--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Have you participated in an open-source project before? ===&lt;br /&gt;
&#039;&#039;If so, please send us URLs to your profile pages for those projects, or some other demonstration of the work that you have done in open-source. If not, why do you want to work on an open-source project this summer?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is my first open-source project. In the past, I have benefitted from open-source software countless times. Now I want to give something back to the community.&lt;br /&gt;
&lt;br /&gt;
== About my Project ==&lt;br /&gt;
&lt;br /&gt;
=== What is the name of your project? ===&lt;br /&gt;
&#039;&#039;Describe your project in 10-20 sentences. What are you making? Who are you making it for, and why do they need it? What technologies (programming languages, etc.) will you be using?&#039;&#039;&lt;br /&gt;
=== What is the timeline for development of your project? ===&lt;br /&gt;
&#039;&#039;The Summer of Code work period is June 17 - September 23; tell us what you will be working on each week. (As the summer goes on, you and your mentor will adjust your schedule, but it&#039;s good to have a plan at the beginning so you have an idea of where you&#039;re headed.) Note that you should probably plan to have something &amp;quot;working and 90% done&amp;quot; by the midterm evaluation (August 2); the last steps always take longer than you think, and we will consider cancelling projects which are not mostly working by then.&#039;&#039;&lt;br /&gt;
=== My Backround ===&lt;br /&gt;
&#039;&#039;Convince us, in 5-15 sentences, that you will be able to successfully complete your project in the timeline you have described. This is usually where people describe their past experiences, credentials, prior projects, schoolwork, and that sort of thing, but be creative. Link to prior work or other resources as relevant.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Me and the Community ==&lt;br /&gt;
&lt;br /&gt;
=== Impact on the Sugar Labs community ===&lt;br /&gt;
&#039;&#039;If your project is successfully completed, what will its impact be on the Sugar Labs community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Sugar Labs community, at least one of whom should be a Sugar Labs GSoC mentor. Provide email contact information for non-GSoC mentors.&#039;&#039;&lt;br /&gt;
=== Sugar pilot deployment ===&lt;br /&gt;
&#039;&#039;Sugar Labs will be working to set up a small (5-30 unit) Sugar pilot near each student project that is accepted to GSoC so that you can immediately see how your work affects children in a deployment. We will make arrangements to either supply or find all the equipment needed. Do you have any ideas on where you would like your deployment to be, who you would like to be involved, and how we can help you and the community in your area begin it?&#039;&#039;&lt;br /&gt;
=== What will you do if you get stuck on your project and your mentor isn&#039;t around? ===&lt;br /&gt;
=== Keeping the community informed about problems and questions ===&lt;br /&gt;
&#039;&#039;How do you propose you will be keeping the community informed of your progress and any problems or questions you might have over the course of the project?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== Screenshot of my Sugar development environment ===&lt;br /&gt;
&#039;&#039;We want to make sure that you can set up a development environment before the summer starts. Please send us a link to a screenshot of your Sugar development environment with the following modification: when you hover over the XO-person icon in the middle of Home view, the drop-down text should have your email in place of &amp;quot;Restart.&amp;quot; See the image on the right for an example. It&#039;s normal to need assistance with this, so please visit our IRC channel, #sugar on irc.freenode.net, and ask for help.&#039;&#039;&lt;br /&gt;
=== What is your t-shirt size? ===&lt;br /&gt;
&#039;&#039;(Yes, we know Google asks for this already; humor us.)&#039;&#039;&lt;br /&gt;
=== Describe a great learning experience you had as a child. ===&lt;br /&gt;
=== Additional information ===&lt;br /&gt;
&#039;&#039;Is there anything else we should have asked you or anything else that we should know that might make us like you or your project more?&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=User:Marion_Zepf&amp;diff=87693</id>
		<title>User:Marion Zepf</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=User:Marion_Zepf&amp;diff=87693"/>
		<updated>2013-04-29T12:15:22Z</updated>

		<summary type="html">&lt;p&gt;Marion Zepf: linking to my proposal&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am a student applying for the Google Summer of Code 2013. I would like to work on the project [[Summer_of_Code/2013#Python_export_functionality_for_Turtle_Blocks|Python export funtionality for TurtleBlocks]]. Please have a look at the wiki page for my proposal: [[Summer of Code/2013/Turtle Blocks Python export]]&lt;/div&gt;</summary>
		<author><name>Marion Zepf</name></author>
	</entry>
</feed>