Using Python blocks in TurtleArt
There is the facility to insert a block of Python code into TurtleArt in its current experimental fork, TurtleArtPortfolio on the OLPC. (This feature is now in Turtle Art from V44) Thanks Walter for the following help.
As of TurtleArtPortfolio V17 , when TA is first run, it creates a copy of tamyblock.py in the journal.
This code can be opened with Pippy and edited. There are some example blocks of code there which are commented out with #
The Python code can be loaded into TA using the Save/Load menu tab.
Replacing a deleted tamyblock.py
If you delete tamyblock.py from the journal, you need to manually replace it (this may change with later versions). In terminal go to directory
and use the copy-to-journal command, note you need to supply the MIME (see also) type for the file, text/x-python:
copy-to-journal tamyblock.py -m text/x-pythonError messages
Errors executing the code and the output of any print statements are directed to the (TAPortfolioActivity ??) log file The log files are at ~/.sugar/default/logs and can be viewed with the Log activity
Currently having problems with Rainbow security settings, follow this link to Rainbow for how to disable it.
Version 19 update
Rainbow problem circumvented V19. tamyblock not required, cannot do imports