Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/plugins/turtle_blocks_extras
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2013-10-31 21:13:12 (GMT)
committer Walter Bender <walter@sugarlabs.org>2013-10-31 21:13:12 (GMT)
commit9350290176a25b2f778469d72f27fc82ff7f8b6a (patch)
tree6a91a76bf29ad266ff3840f50689de852c346e70 /plugins/turtle_blocks_extras
parent7d65b619d02732378e7a275623ed3946a01aa98b (diff)
add Plugins.__init__()
Diffstat (limited to 'plugins/turtle_blocks_extras')
-rw-r--r--plugins/turtle_blocks_extras/turtle_blocks_extras.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/turtle_blocks_extras/turtle_blocks_extras.py b/plugins/turtle_blocks_extras/turtle_blocks_extras.py
index 465e07a..c900a3c 100644
--- a/plugins/turtle_blocks_extras/turtle_blocks_extras.py
+++ b/plugins/turtle_blocks_extras/turtle_blocks_extras.py
@@ -49,6 +49,7 @@ class Turtle_blocks_extras(Plugin):
from Turtle Art """
def __init__(self, turtle_window):
+ Plugin.__init__(self)
self.tw = turtle_window
def setup(self):
@@ -298,7 +299,6 @@ complete'))
help_string=_('resume playing video or audio'))
self.tw.lc.def_prim('mediaplay', 0, self.tw.lc.media_play, True)
- primitive_dictionary['speak'] = self._prim_speak
palette.add_block('speak',
style='basic-style-1arg',
label=_('speak'),
@@ -306,7 +306,8 @@ complete'))
default=_('hello'),
help_string=_('speaks text'))
self.tw.lc.def_prim('speak', 1,
- lambda self, x: primitive_dictionary['speak'](x))
+ Primitive(self.prim_speak,
+ arg_descs=[ArgSlot(TYPE_STRING)]))
primitive_dictionary['sinewave'] = self._prim_sinewave
palette.add_block('sinewave',
@@ -1155,7 +1156,7 @@ Journal objects'))
""" Save SVG to file """
self.tw.save_as_image(name, svg=True)
- def _prim_speak(self, text):
+ def prim_speak(self, text):
""" Speak text """
if type(text) == float and int(text) == text:
text = int(text)