Summary
This example re-uses two existing transformations:
French Python, which uses a non-standard file extension
.pyfr
as an indication that an import hook must be used.repeat as a keyword
French repeat
To produce the above image, you can use the following (files found in usage_demo directory):
from ideas.examples import french_repeat
french_repeat.add_hook()
import tortue # noqa
and
"""tortue.pyfr"""
de turtle importer color, fd, left, pen
pen(pensize=3)
répéter 4: # French ...
repeat 4: # or English ... both work.
repeat 4:
color('blue')
fd(30)
left(-90)
color('green')
fd(60)
left(90)
color('red')
left(90)
fd(90)
input("Press any key to quit.")
Demonstrates how we can simply combine source transformations.