Line 716: |
Line 716: |
| | | |
| ===Version 104 onwards=== | | ===Version 104 onwards=== |
− | A number of different sample programs are provided. Using a provided sample is a 2 step process. First copy the sample to the Journal, then load the Python block. Click the Load Python Block button [[File:Loadpythonsamples.jpg]] and a file selector dialog box appears. | + | There are two ways to create Python blocks: by loading sample code provided with Turtle Art or by loading Python code the your Journal. |
| + | |
| + | ====loading sample code==== |
| + | |
| + | A number of individual sample programs are provided. Clicking on the Load Python Block button on the Load/Save Toolbar [[File:Loadpythonsamples.jpg]] will invoke a file-selector dialog. Select the sample that you want and it will be both copied to the Journal and loaded into a Python block. |
| | | |
| [[File:Pythonsampleselector.jpg]] | | [[File:Pythonsampleselector.jpg]] |
| | | |
− | Select the sample that you want and it will be copied to the journal. Now different Python blocks can have different code loaded in them. Click on a Python block [[image:Pythoncodeblock.jpg |45px]] and an object selector dialog will open.
| + | ====loading code from the Journal==== |
| + | |
| + | Clicking on a Python block [[image:Pythoncodeblock.jpg |45px]] that has been dragged onto the canvas from the Extras palette will invoke an object-selector dialog. |
| | | |
| [[File:Pythonobjectselector.jpg]] | | [[File:Pythonobjectselector.jpg]] |
| | | |
− | Select the Python code that that you want and the code will be loaded into that block. Different blocks can have different code loaded into them. You can't run a Python block by clicking on it, that opens the object selector, instead click on a block above the Python block to run the Python block. | + | Select the Python code that that you want and that code will be loaded into the selected block. |
| + | |
| + | You can't run a Python block by clicking on it, as that opens the object selector; instead attach the block to another one and click elsewhere on the stack you have created. |
| + | |
| + | Which ever way you create them, multiple Python blocks can have different code loaded in them. |
| | | |
| ===Sample code=== | | ===Sample code=== |