Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt/taconstants.py
diff options
context:
space:
mode:
Diffstat (limited to 'TurtleArt/taconstants.py')
-rw-r--r--TurtleArt/taconstants.py1163
1 files changed, 585 insertions, 578 deletions
diff --git a/TurtleArt/taconstants.py b/TurtleArt/taconstants.py
index dbdc305..2e031a9 100644
--- a/TurtleArt/taconstants.py
+++ b/TurtleArt/taconstants.py
@@ -29,7 +29,7 @@ talogo.py. For example, if we want to add a new turtle command,
(1) We'd add 'uturn' to the PALETTES list of lists:
-PALETTES = [['forward', 'back', 'clean', 'left', 'right', 'uturn', 'show',
+PALETTES = [['forward', 'back', 'clean', 'left', 'right', 'uturn', 'show',
'seth', 'setxy', 'heading', 'xcor', 'ycor', 'setscale',
'arc', 'scale'],
['penup','pendown', 'setpensize', 'fillscreen', 'pensize',...
@@ -119,10 +119,10 @@ PALETTES = [['clean', 'forward', 'back', 'show', 'left', 'right',
'seth', 'setxy2', 'heading', 'xcor', 'ycor', 'setscale',
'arc', 'scale', 'leftpos', 'toppos', 'rightpos',
'bottompos'],
- ['penup','pendown', 'setpensize', 'fillscreen', 'pensize',
+ ['penup', 'pendown', 'setpensize', 'fillscreen', 'pensize',
'setcolor', 'setshade', 'setgray', 'color', 'shade',
- 'gray', 'startfill', 'stopfill' ],
- [ 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple',
+ 'gray', 'startfill', 'stopfill'],
+ ['red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple',
'white', 'black'],
['plus2', 'minus2', 'product2',
'division2', 'identity2', 'remainder2', 'sqrt', 'random',
@@ -133,7 +133,7 @@ PALETTES = [['clean', 'forward', 'back', 'show', 'left', 'right',
'storeinbox1', 'storeinbox2', 'string', 'box1', 'box2', 'box',
'storein', 'start'],
['kbinput', 'push', 'printheap', 'keyboard', 'pop', 'clearheap',
- 'myfunc1arg', 'userdefined', 'addturtle', 'comment', 'print',
+ 'myfunc1arg', 'userdefined', 'addturtle', 'comment', 'print',
'cartesian', 'width', 'height', 'polar', 'sandwichtop_no_label',
'sandwichbottom', 'readpixel', 'see', 'reskin'],
['journal', 'audio', 'description', 'hideblocks', 'showblocks',
@@ -146,15 +146,21 @@ PALETTES = [['clean', 'forward', 'back', 'show', 'left', 'right',
# Block-style attributes
#
-COLORS = [["#00FF00","#00A000"], ["#00FFFF","#00A0A0"], ["#00FFFF","#00A0A0"],
- ["#FF00FF","#A000A0"], ["#FFC000","#A08000"], ["#FFFF00","#A0A000"],
- ["#FF0000","#A00000"], ["#0000FF","#0000A0"], ["#FFFF00","#A0A000"]]
+COLORS = [["#00FF00", "#00A000"], ["#00FFFF", "#00A0A0"],
+ ["#00FFFF", "#00A0A0"], ["#FF00FF", "#A000A0"],
+ ["#FFC000", "#A08000"], ["#FFFF00", "#A0A000"],
+ ["#FF0000", "#A00000"], ["#0000FF", "#0000A0"],
+ ["#FFFF00", "#A0A000"]]
-BOX_COLORS = {'red':["#FF0000","#A00000"],'orange':["#FFD000","#AA8000"],
- 'yellow':["#FFFF00","#A0A000"],'green':["#00FF00","#008000"],
- 'cyan':["#00FFFF","#00A0A0"],'blue':["#0000FF","#000080"],
- 'purple':["#FF00FF","#A000A0"], 'white':["#FFFFFF", "#A0A0A0"],
- 'black':["#000000", "#000000"]}
+BOX_COLORS = {'red': ["#FF0000", "#A00000"],
+ 'orange': ["#FFD000", "#AA8000"],
+ 'yellow': ["#FFFF00", "#A0A000"],
+ 'blue': ["#0000FF", "#000080"],
+ 'cyan': ["#00FFFF", "#00A0A0"],
+ 'green': ["#00FF00", "#008000"],
+ 'purple': ["#FF00FF", "#A000A0"],
+ 'white': ["#FFFFFF", "#A0A0A0"],
+ 'black': ["#000000", "#000000"]}
#
# Misc. parameters
@@ -189,7 +195,7 @@ BASIC_STYLE_HEAD_1ARG = ['hat']
BASIC_STYLE_TAIL = ['stopstack', 'empty']
BASIC_STYLE = []
BASIC_STYLE_EXTENDED_VERTICAL = ['clean', 'penup', 'pendown', 'stack1',
- 'stack2','hideblocks', 'showblocks', 'clearheap', 'printheap', 'kbinput',
+ 'stack2', 'hideblocks', 'showblocks', 'clearheap', 'printheap', 'kbinput',
'fullscreen', 'sandwichcollapsed', 'cartesian', 'polar', 'startfill',
'stopfill', 'readpixel', 'vspace']
BASIC_STYLE_EXTENDED = ['picturelist', 'picture1x1', 'picture2x2',
@@ -208,7 +214,7 @@ BOX_STYLE = ['number', 'xcor', 'ycor', 'heading', 'pensize', 'color', 'shade',
'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'white',
'black', 'titlex', 'titley', 'leftx', 'topy', 'rightx', 'bottomy',
'volume', 'pitch', 'voltage', 'resistance', 'gray', 'see']
-BOX_STYLE_MEDIA = ['description', 'audio', 'journal']
+BOX_STYLE_MEDIA = ['description', 'audio', 'journal']
NUMBER_STYLE = ['plus2', 'product2', 'myfunc']
NUMBER_STYLE_VAR_ARG = ['myfunc1arg', 'myfunc2arg', 'myfunc3arg']
NUMBER_STYLE_BLOCK = ['random']
@@ -241,7 +247,7 @@ PORTFOLIO_STYLE_1x2 = ['template1x2']
#
EXPANDABLE = ['vspace', 'hspace', 'identity2']
-EXPANDABLE_BLOCKS = ['plus2', 'minus2','division2', 'remainder2', 'product2',
+EXPANDABLE_BLOCKS = ['plus2', 'minus2', 'division2', 'remainder2', 'product2',
'random', 'equal2', 'greater2', 'less2', 'and2', 'or2',
'arc', 'setxy', 'setxy2', 'fillscreen', 'storein', 'write']
@@ -275,372 +281,372 @@ PYTHON_SKIN = ['nop', 'userdefined', 'userdefined2args', 'userdefined3args']
# Block-name dictionary used for labels
#
BLOCK_NAMES = {
- 'addturtle':[_('turtle')],
- 'and2':[_('and')],
- 'arc':[_('arc'), _('angle'), _('radius')],
- 'audio':[' '],
- 'back':[_('back')],
- 'black':[_('black')],
- 'blocks':[_('blocks')],
- 'blue':[_('blue')+' = 70'],
- 'bottompos':[_('bottom')],
- 'bottomy':[_('picture bottom')],
- 'box':[_('box')],
- 'box1':[_('box 1')],
- 'box2':[_('box 2')],
- 'cartesian':[_('Cartesian')],
- 'clean':[_(' clean ')],
- 'clearheap':[_('empty heap')],
- 'color':[_('color')],
- 'colors':[_('colors')],
- 'comment':[_('comment')],
- 'cyan':[_('cyan')+' = 50'],
- 'decription':[' '],
- 'division2':['/'],
- 'empty':[_('empty trash')],
- 'equal2':['='],
- 'extras':[_('extras')],
- 'fillscreen':[_('fill screen'), _('color'), _('shade')],
- 'flow':[_('flow')],
- 'forever':[_('forever')],
- 'forward':[_('forward')],
- 'fullscreen':[_('full screen')],
- 'gray':[_('gray')],
- 'greater2':[">"],
- 'green':[_('green')+' = 30'],
- 'hat':[_('action')],
- 'hat1':[_('action 1')],
- 'hat2':[_('action 2')],
- 'heading':[_('heading')],
- 'height':[_('height')],
- 'hideblocks':[_('hide blocks')],
- 'hspace':[' '],
- 'identity2':['←'],
- 'if':[' ', _('if'), _('then')],
- 'ifelse':[' ', _('if'), _('then else')],
- 'image':[_('show')],
- 'journal':[' '],
- 'kbinput':[_('query keyboard')],
- 'keyboard':[_('keyboard')],
- 'left':[_('left')],
- 'leftpos':[_('left')],
- 'leftx':[_('picture left')],
- 'less2':['<'],
- 'list':['list'],
- 'minus2':['–'],
- 'myfunc':[_('Python'), 'f(x)', 'x'],
- 'myfunc1arg':[_('Python'), 'f(x)', 'x'],
- 'myfunc2arg':[_('Python'), 'f(x,y)', ' '],
- 'myfunc3arg':[_('Python'), 'f(x,y,z)', ' '],
- 'nop':[_(' ')],
- 'not':[_('not')],
- 'number':['100'],
- 'numbers':[_('numbers')],
- 'orange':[_('orange')+' = 10'],
- 'or2':[_('or')],
- 'pen':[_('pen')],
- 'pendown':[_('pen down')],
- 'pensize':[_('pen size')],
- 'penup':[_('pen up')],
- 'picturelist':[' '],
- 'picture1x1':[' '],
- 'picture1x1a':[' '],
- 'picture2x2':[' '],
- 'picture2x1':[' '],
- 'picture1x2':[' '],
- 'pitch':[_('pitch')],
- 'plus2':['+'],
- 'polar':[_('polar')],
- 'pop':[_('pop')],
- 'portfolio':[_('portfolio')],
- 'printheap':[_('show heap')],
- 'print':[_('print')],
- 'product2':['×'],
- 'purple':[_('purple')+' = 90'],
- 'push':[_('push')],
- 'random':[_('random'), _('min'), _('max')],
- 'readpixel':[_('read pixel')],
- 'red':[_('red')+' = 0'],
- 'remainder2':[_('mod')],
- 'repeat':[' ',_('repeat')],
- 'reskin':[_('turtle shell')],
- 'resistance':[_('resistance')],
- 'restore':[_('restore last')],
- 'restoreall':[_('restore all')],
- 'right':[_('right')],
- 'rightpos':[_('right')],
- 'rightx':[_('picture right')],
- 'savepix':[_('save picture')],
- 'savesvg':[_('save SVG')],
- 'sandwichbottom':[' ', ' '],
- 'sandwichcollapsed':[' ', _('click to open')],
- 'sandwichtop':[_('top of stack')],
- 'sandwichtop_no_label':[' '],
- 'sandwichtop_no_arm':[_('top of stack')],
- 'sandwichtop_no_arm_no_label':[' '],
- 'scale':[_('scale')],
- 'see':[_('turtle sees')],
- 'setcolor':[_('set color')],
- 'setgray':[_('set gray')],
- 'seth':[_('set heading')],
- 'setpensize':[_('set pen size')],
- 'setscale':[_('set scale')],
- 'setshade':[_('set shade')],
- 'settextcolor':[_('set text color')],
- 'settextsize':[_('set text size')],
- 'setxy':[_('set xy'), _('x'), _('y')],
- 'setxy2':[_('set xy'), _('x'), _('y')],
- 'shade':[_('shade')],
- 'show':[_('show')],
- 'showblocks':[_('show blocks')],
- 'showaligned':[_('show aligned')],
- 'skin':[_('turtle shell')],
- 'sqrt':['√'],
- 'stack':[_('action')],
- 'stack1':[_('action 1')],
- 'stack2':[_('action 2')],
- 'start':[_('start')],
- 'startfill':[_('start fill')],
- 'stopfill':[_('end fill')],
- 'stopstack':[_('stop action')],
- 'storein':[_('store in'), _('box'), _('value')],
- 'storeinbox1':[_('store in box 1')],
- 'storeinbox2':[_('store in box 2')],
- 'string':[_('text')],
- 'template1x1':[' '],
- 'template1x1a':[' '],
- 'template1x2':[' '],
- 'template2x1':[' '],
- 'template2x2':[' '],
- 'templatelist':[' '],
- 'textsize':[_('text size')],
- 'titlex':[_('title x')],
- 'titley':[_('title y')],
- 'toppos':[_('top')],
- 'topy':[_('picture top')],
- 'trash':[_('trash')],
- 'turtle':[_('turtle')],
- 'until':[_('until')],
- 'userdefined':[_(' ')],
- 'userdefined2args':[_(' ')],
- 'userdefined3args':[_(' ')],
- 'voltage':[_('voltage')],
- 'volume':[_('volume')],
- 'vspace':[' '],
- 'wait':[_('wait')],
- 'while':[_('while')],
- 'while2':[_('while')],
- 'white':[_('white')],
- 'width':[_('width')],
- 'write':[_('write')],
- 'xcor':[_('xcor')],
- 'ycor':[_('ycor')],
- 'yellow':[_('yellow')+' = 20']}
+ 'addturtle': [_('turtle')],
+ 'and2': [_('and')],
+ 'arc': [_('arc'), _('angle'), _('radius')],
+ 'audio': [' '],
+ 'back': [_('back')],
+ 'black': [_('black')],
+ 'blocks': [_('blocks')],
+ 'blue': [_('blue') + ' = 70'],
+ 'bottompos': [_('bottom')],
+ 'bottomy': [_('picture bottom')],
+ 'box': [_('box')],
+ 'box1': [_('box 1')],
+ 'box2': [_('box 2')],
+ 'cartesian': [_('Cartesian')],
+ 'clean': [_(' clean ')],
+ 'clearheap': [_('empty heap')],
+ 'color': [_('color')],
+ 'colors': [_('colors')],
+ 'comment': [_('comment')],
+ 'cyan': [_('cyan') + ' = 50'],
+ 'decription': [' '],
+ 'division2': ['/'],
+ 'empty': [_('empty trash')],
+ 'equal2': ['='],
+ 'extras': [_('extras')],
+ 'fillscreen': [_('fill screen'), _('color'), _('shade')],
+ 'flow': [_('flow')],
+ 'forever': [_('forever')],
+ 'forward': [_('forward')],
+ 'fullscreen': [_('full screen')],
+ 'gray': [_('gray')],
+ 'greater2': [">"],
+ 'green': [_('green') + ' = 30'],
+ 'hat': [_('action')],
+ 'hat1': [_('action 1')],
+ 'hat2': [_('action 2')],
+ 'heading': [_('heading')],
+ 'height': [_('height')],
+ 'hideblocks': [_('hide blocks')],
+ 'hspace': [' '],
+ 'identity2': ['←'],
+ 'if': [' ', _('if'), _('then')],
+ 'ifelse': [' ', _('if'), _('then else')],
+ 'image': [_('show')],
+ 'journal': [' '],
+ 'kbinput': [_('query keyboard')],
+ 'keyboard': [_('keyboard')],
+ 'left': [_('left')],
+ 'leftpos': [_('left')],
+ 'leftx': [_('picture left')],
+ 'less2': ['<'],
+ 'list': ['list'],
+ 'minus2': ['–'],
+ 'myfunc': [_('Python'), 'f(x)', 'x'],
+ 'myfunc1arg': [_('Python'), 'f(x)', 'x'],
+ 'myfunc2arg': [_('Python'), 'f(x,y)', ' '],
+ 'myfunc3arg': [_('Python'), 'f(x,y,z)', ' '],
+ 'nop': [_(' ')],
+ 'not': [_('not')],
+ 'number': ['100'],
+ 'numbers': [_('numbers')],
+ 'orange': [_('orange') + ' = 10'],
+ 'or2': [_('or')],
+ 'pen': [_('pen')],
+ 'pendown': [_('pen down')],
+ 'pensize': [_('pen size')],
+ 'penup': [_('pen up')],
+ 'picturelist': [' '],
+ 'picture1x1': [' '],
+ 'picture1x1a': [' '],
+ 'picture2x2': [' '],
+ 'picture2x1': [' '],
+ 'picture1x2': [' '],
+ 'pitch': [_('pitch')],
+ 'plus2': [' + '],
+ 'polar': [_('polar')],
+ 'pop': [_('pop')],
+ 'portfolio': [_('portfolio')],
+ 'printheap': [_('show heap')],
+ 'print': [_('print')],
+ 'product2': ['×'],
+ 'purple': [_('purple') + ' = 90'],
+ 'push': [_('push')],
+ 'random': [_('random'), _('min'), _('max')],
+ 'readpixel': [_('read pixel')],
+ 'red': [_('red') + ' = 0'],
+ 'remainder2': [_('mod')],
+ 'repeat': [' ', _('repeat')],
+ 'reskin': [_('turtle shell')],
+ 'resistance': [_('resistance')],
+ 'restore': [_('restore last')],
+ 'restoreall': [_('restore all')],
+ 'right': [_('right')],
+ 'rightpos': [_('right')],
+ 'rightx': [_('picture right')],
+ 'savepix': [_('save picture')],
+ 'savesvg': [_('save SVG')],
+ 'sandwichbottom': [' ', ' '],
+ 'sandwichcollapsed': [' ', _('click to open')],
+ 'sandwichtop': [_('top of stack')],
+ 'sandwichtop_no_label': [' '],
+ 'sandwichtop_no_arm': [_('top of stack')],
+ 'sandwichtop_no_arm_no_label': [' '],
+ 'scale': [_('scale')],
+ 'see': [_('turtle sees')],
+ 'setcolor': [_('set color')],
+ 'setgray': [_('set gray')],
+ 'seth': [_('set heading')],
+ 'setpensize': [_('set pen size')],
+ 'setscale': [_('set scale')],
+ 'setshade': [_('set shade')],
+ 'settextcolor': [_('set text color')],
+ 'settextsize': [_('set text size')],
+ 'setxy': [_('set xy'), _('x'), _('y')],
+ 'setxy2': [_('set xy'), _('x'), _('y')],
+ 'shade': [_('shade')],
+ 'show': [_('show')],
+ 'showblocks': [_('show blocks')],
+ 'showaligned': [_('show aligned')],
+ 'skin': [_('turtle shell')],
+ 'sqrt': ['√'],
+ 'stack': [_('action')],
+ 'stack1': [_('action 1')],
+ 'stack2': [_('action 2')],
+ 'start': [_('start')],
+ 'startfill': [_('start fill')],
+ 'stopfill': [_('end fill')],
+ 'stopstack': [_('stop action')],
+ 'storein': [_('store in'), _('box'), _('value')],
+ 'storeinbox1': [_('store in box 1')],
+ 'storeinbox2': [_('store in box 2')],
+ 'string': [_('text')],
+ 'template1x1': [' '],
+ 'template1x1a': [' '],
+ 'template1x2': [' '],
+ 'template2x1': [' '],
+ 'template2x2': [' '],
+ 'templatelist': [' '],
+ 'textsize': [_('text size')],
+ 'titlex': [_('title x')],
+ 'titley': [_('title y')],
+ 'toppos': [_('top')],
+ 'topy': [_('picture top')],
+ 'trash': [_('trash')],
+ 'turtle': [_('turtle')],
+ 'until': [_('until')],
+ 'userdefined': [_(' ')],
+ 'userdefined2args': [_(' ')],
+ 'userdefined3args': [_(' ')],
+ 'voltage': [_('voltage')],
+ 'volume': [_('volume')],
+ 'vspace': [' '],
+ 'wait': [_('wait')],
+ 'while': [_('while')],
+ 'while2': [_('while')],
+ 'white': [_('white')],
+ 'width': [_('width')],
+ 'write': [_('write')],
+ 'xcor': [_('xcor')],
+ 'ycor': [_('ycor')],
+ 'yellow': [_('yellow') + ' = 20']}
#
# Logo primitives
#
PRIMITIVES = {
- 'addturtle':'turtle',
- 'and2':'and',
- 'arc':'arc',
- 'back':'back',
- 'black':'black',
- 'blue':'blue',
- 'bottompos':'bpos',
- 'bottomy':'boty',
- 'box1':'box1',
- 'box2':'box2',
- 'box':'box',
- 'cartesian':'cartesian',
- 'clean':'clean',
- 'clearheap':'clearheap',
- 'color':'color',
- 'comment':'comment',
- 'cyan':'cyan',
- 'division2':'division',
- 'equal2':'equal?',
- 'fillscreen':'fillscreen',
- 'forever':'forever',
- 'forward':'forward',
- 'fullscreen':'fullscreen',
- 'gray':'gray',
- 'greater2':'greater?',
- 'green':'green',
- 'hat':'nop3',
- 'hat1':'nop1',
- 'hat2':'nop2',
- 'heading':'heading',
- 'height':'vres',
- 'hideblocks':'hideblocks',
- 'hspace':'nop',
- 'identity2':'id',
- 'if':'if',
- 'ifelse':'ifelse',
- 'image':'show',
- 'kbinput':'kbinput',
- 'keyboard':'keyboard',
- 'left':'left',
- 'leftpos':'lpos',
- 'leftx':'leftx',
- 'less2':'less?',
- 'list':'bulletlist',
- 'minus2':'minus',
- 'myfunc':'myfunction',
- 'myfunc1arg':'myfunction',
- 'myfunc2arg':'myfunction2',
- 'myfunc3arg':'myfunction3',
- 'nop':'userdefined',
- 'not':'not',
- 'orange':'orange',
- 'or2':'or',
- 'pendown':'pendown',
- 'pensize':'pensize',
- 'penup':'penup',
- 'pitch':'pitch',
- 'plus2':'plus',
- 'polar':'polar',
- 'pop':'pop',
- 'printheap':'printheap',
- 'print':'print',
- 'product2':'product',
- 'purple':'purple',
- 'push':'push',
- 'random':'random',
- 'red':'red',
- 'readpixel':'readpixel',
- 'remainder2':'mod',
- 'repeat':'repeat',
- 'resistance':'resistance',
- 'right':'right',
- 'rightpos':'rpos',
- 'rightx':'rightx',
- 'sandwichtop':'comment',
- 'sandwichtop_no_arm':'comment',
- 'sandwichtop_no_label':'nop',
- 'sandwichtop_no_arm_no_label':'nop',
- 'sandwichbottom':'nop',
- 'sandwichcollapsed':'nop',
- 'savepix':'savepix',
- 'savesvg':'savesvg',
- 'see':'see',
- 'scale':'scale',
- 'setcolor':'setcolor',
- 'setgray':'setgray',
- 'seth':'seth',
- 'setpensize':'setpensize',
- 'setscale':'setscale',
- 'setshade':'setshade',
- 'settextsize':'settextsize',
- 'settextcolor':'settextcolor',
- 'setxy':'setxy',
- 'setxy2':'setxy2',
- 'shade':'shade',
- 'show':'show',
- 'showblocks':'showblocks',
- 'showaligned':'showaligned',
- 'skin':'skin',
- 'sqrt':'sqrt',
- 'stack':'stack',
- 'stack1':'stack1',
- 'stack2':'stack2',
- 'start':'start',
- 'startfill':'startfill',
- 'stopfill':'stopfill',
- 'stopstack':'stopstack',
- 'storein':'storeinbox',
- 'storeinbox1':'storeinbox1',
- 'storeinbox2':'storeinbox2',
- 'template1x1':'t1x1',
- 'template1x1a':'t1x1a',
- 'template1x2':'t1x2',
- 'template2x1':'t2x1',
- 'template2x2':'t2x2',
- 'templatelist':'bullet',
- 'textsize':'textsize',
- 'titlex':'titlex',
- 'titley':'titley',
- 'toppos':'tpos',
- 'topy':'topy',
- 'userdefined':'userdefined',
- 'userdefined2args':'userdefined2',
- 'userdefined3args':'userdefined3',
- 'voltage':'voltage',
- 'volume':'volume',
- 'vspace':'nop',
- 'wait':'wait',
- 'while2':'while',
- 'white':'white',
- 'width':'hres',
- 'write':'write',
- 'xcor':'xcor',
- 'ycor':'ycor',
- 'yellow':'yellow'}
+ 'addturtle': 'turtle',
+ 'and2': 'and',
+ 'arc': 'arc',
+ 'back': 'back',
+ 'black': 'black',
+ 'blue': 'blue',
+ 'bottompos': 'bpos',
+ 'bottomy': 'boty',
+ 'box1': 'box1',
+ 'box2': 'box2',
+ 'box': 'box',
+ 'cartesian': 'cartesian',
+ 'clean': 'clean',
+ 'clearheap': 'clearheap',
+ 'color': 'color',
+ 'comment': 'comment',
+ 'cyan': 'cyan',
+ 'division2': 'division',
+ 'equal2': 'equal?',
+ 'fillscreen': 'fillscreen',
+ 'forever': 'forever',
+ 'forward': 'forward',
+ 'fullscreen': 'fullscreen',
+ 'gray': 'gray',
+ 'greater2': 'greater?',
+ 'green': 'green',
+ 'hat': 'nop3',
+ 'hat1': 'nop1',
+ 'hat2': 'nop2',
+ 'heading': 'heading',
+ 'height': 'vres',
+ 'hideblocks': 'hideblocks',
+ 'hspace': 'nop',
+ 'identity2': 'id',
+ 'if': 'if',
+ 'ifelse': 'ifelse',
+ 'image': 'show',
+ 'kbinput': 'kbinput',
+ 'keyboard': 'keyboard',
+ 'left': 'left',
+ 'leftpos': 'lpos',
+ 'leftx': 'leftx',
+ 'less2': 'less?',
+ 'list': 'bulletlist',
+ 'minus2': 'minus',
+ 'myfunc': 'myfunction',
+ 'myfunc1arg': 'myfunction',
+ 'myfunc2arg': 'myfunction2',
+ 'myfunc3arg': 'myfunction3',
+ 'nop': 'userdefined',
+ 'not': 'not',
+ 'orange': 'orange',
+ 'or2': 'or',
+ 'pendown': 'pendown',
+ 'pensize': 'pensize',
+ 'penup': 'penup',
+ 'pitch': 'pitch',
+ 'plus2': 'plus',
+ 'polar': 'polar',
+ 'pop': 'pop',
+ 'printheap': 'printheap',
+ 'print': 'print',
+ 'product2': 'product',
+ 'purple': 'purple',
+ 'push': 'push',
+ 'random': 'random',
+ 'red': 'red',
+ 'readpixel': 'readpixel',
+ 'remainder2': 'mod',
+ 'repeat': 'repeat',
+ 'resistance': 'resistance',
+ 'right': 'right',
+ 'rightpos': 'rpos',
+ 'rightx': 'rightx',
+ 'sandwichtop': 'comment',
+ 'sandwichtop_no_arm': 'comment',
+ 'sandwichtop_no_label': 'nop',
+ 'sandwichtop_no_arm_no_label': 'nop',
+ 'sandwichbottom': 'nop',
+ 'sandwichcollapsed': 'nop',
+ 'savepix': 'savepix',
+ 'savesvg': 'savesvg',
+ 'see': 'see',
+ 'scale': 'scale',
+ 'setcolor': 'setcolor',
+ 'setgray': 'setgray',
+ 'seth': 'seth',
+ 'setpensize': 'setpensize',
+ 'setscale': 'setscale',
+ 'setshade': 'setshade',
+ 'settextsize': 'settextsize',
+ 'settextcolor': 'settextcolor',
+ 'setxy': 'setxy',
+ 'setxy2': 'setxy2',
+ 'shade': 'shade',
+ 'show': 'show',
+ 'showblocks': 'showblocks',
+ 'showaligned': 'showaligned',
+ 'skin': 'skin',
+ 'sqrt': 'sqrt',
+ 'stack': 'stack',
+ 'stack1': 'stack1',
+ 'stack2': 'stack2',
+ 'start': 'start',
+ 'startfill': 'startfill',
+ 'stopfill': 'stopfill',
+ 'stopstack': 'stopstack',
+ 'storein': 'storeinbox',
+ 'storeinbox1': 'storeinbox1',
+ 'storeinbox2': 'storeinbox2',
+ 'template1x1': 't1x1',
+ 'template1x1a': 't1x1a',
+ 'template1x2': 't1x2',
+ 'template2x1': 't2x1',
+ 'template2x2': 't2x2',
+ 'templatelist': 'bullet',
+ 'textsize': 'textsize',
+ 'titlex': 'titlex',
+ 'titley': 'titley',
+ 'toppos': 'tpos',
+ 'topy': 'topy',
+ 'userdefined': 'userdefined',
+ 'userdefined2args': 'userdefined2',
+ 'userdefined3args': 'userdefined3',
+ 'voltage': 'voltage',
+ 'volume': 'volume',
+ 'vspace': 'nop',
+ 'wait': 'wait',
+ 'while2': 'while',
+ 'white': 'white',
+ 'width': 'hres',
+ 'write': 'write',
+ 'xcor': 'xcor',
+ 'ycor': 'ycor',
+ 'yellow': 'yellow'}
#
# block default values
#
DEFAULTS = {
- 'addturtle':[1],
- 'arc':[90, 100],
- 'audio':[None],
- 'back':[100],
- 'box':[_('my box')],
- 'comment':[_('comment')],
- 'description':[None],
- 'fillscreen':[60, 80],
- 'forever':[None, 'vspace'],
- 'forward':[100],
- 'hat':[_('action')],
- 'if':[None, None, 'vspace'],
- 'ifelse':[None, 'vspace', None, 'vspace'],
- 'journal':[None],
- 'left':[90],
- 'list':['∙ ', '∙ '],
- 'media':[None],
- 'myfunc':['x', 100],
- 'myfunc1arg':['x', 100],
- 'myfunc2arg':['x+y', 100, 100],
- 'myfunc3arg':['x+y+z', 100, 100, 100],
- 'nop':[100],
- 'number':[100],
- 'random':[0, 100],
- 'repeat':[4, None, 'vspace'],
- 'right':[90],
- 'sandwichtop':[_('label')],
- 'sandwichtop_no_arm':[_('label')],
- 'savepix':[_('picture name')],
- 'savesvg':[_('picture name')],
- 'setcolor':[0],
- 'setgray':[100],
- 'seth':[0],
- 'setpensize':[5],
- 'setscale':[33],
- 'setshade':[50],
- 'settextsize':[48],
- 'settextcolor':[0],
- 'setxy':[0, 0],
- 'setxy2':[0, 0],
- 'show':[_('text')],
- 'showaligned':[_('text')],
- 'stack':[_('action')],
- 'storeinbox1':[100],
- 'storeinbox2':[100],
- 'storein':[_('my box'), 100],
- 'string':[_('text')],
- 'template1x1':[_('Title'), 'None'],
- 'template1x1a':[_('Title'), 'None'],
- 'template1x2':[_('Title'), 'None', 'None'],
- 'template2x1':[_('Title'), 'None', 'None'],
- 'template2x2':[_('Title'), 'None', 'None', 'None', 'None'],
- 'templatelist':[_('Title'), '∙ '],
- 'userdefined':[100],
- 'userdefined2args':[100,100],
- 'userdefined3args':[100,100,100],
- 'wait':[1],
- 'write':[_('text'), 32]}
+ 'addturtle': [1],
+ 'arc': [90, 100],
+ 'audio': [None],
+ 'back': [100],
+ 'box': [_('my box')],
+ 'comment': [_('comment')],
+ 'description': [None],
+ 'fillscreen': [60, 80],
+ 'forever': [None, 'vspace'],
+ 'forward': [100],
+ 'hat': [_('action')],
+ 'if': [None, None, 'vspace'],
+ 'ifelse': [None, 'vspace', None, 'vspace'],
+ 'journal': [None],
+ 'left': [90],
+ 'list': ['∙ ', '∙ '],
+ 'media': [None],
+ 'myfunc': ['x', 100],
+ 'myfunc1arg': ['x', 100],
+ 'myfunc2arg': ['x+y', 100, 100],
+ 'myfunc3arg': ['x+y+z', 100, 100, 100],
+ 'nop': [100],
+ 'number': [100],
+ 'random': [0, 100],
+ 'repeat': [4, None, 'vspace'],
+ 'right': [90],
+ 'sandwichtop': [_('label')],
+ 'sandwichtop_no_arm': [_('label')],
+ 'savepix': [_('picture name')],
+ 'savesvg': [_('picture name')],
+ 'setcolor': [0],
+ 'setgray': [100],
+ 'seth': [0],
+ 'setpensize': [5],
+ 'setscale': [33],
+ 'setshade': [50],
+ 'settextsize': [48],
+ 'settextcolor': [0],
+ 'setxy': [0, 0],
+ 'setxy2': [0, 0],
+ 'show': [_('text')],
+ 'showaligned': [_('text')],
+ 'stack': [_('action')],
+ 'storeinbox1': [100],
+ 'storeinbox2': [100],
+ 'storein': [_('my box'), 100],
+ 'string': [_('text')],
+ 'template1x1': [_('Title'), 'None'],
+ 'template1x1a': [_('Title'), 'None'],
+ 'template1x2': [_('Title'), 'None', 'None'],
+ 'template2x1': [_('Title'), 'None', 'None'],
+ 'template2x2': [_('Title'), 'None', 'None', 'None', 'None'],
+ 'templatelist': [_('Title'), '∙ '],
+ 'userdefined': [100],
+ 'userdefined2args': [100, 100],
+ 'userdefined3args': [100, 100, 100],
+ 'wait': [1],
+ 'write': [_('text'), 32]}
#
# Blocks that can interchange strings and numbers for their arguments
@@ -673,7 +679,7 @@ STATUS_SHAPES = ['status', 'info', 'nostack', 'noinput', 'emptyheap',
'syntaxerror', 'nofile', 'nojournal', 'zerodivide',
'notanumber']
-#
+#
# Emulate Sugar toolbar when running from outside of Sugar
#
TOOLBAR_SHAPES = ['hideshowoff', 'eraseron', 'run-fastoff',
@@ -682,20 +688,21 @@ TOOLBAR_SHAPES = ['hideshowoff', 'eraseron', 'run-fastoff',
#
# Legacy names
#
-OLD_NAMES = {'product':'product2', 'storeinbox':'storein', 'minus':'minus2',
- 'division':'division2', 'plus':'plus2', 'and':'and2', 'or':'or2',
- 'less':'less2', 'greater':'greater2', 'equal':'equal2',
- 'remainder':'remainder2', 'identity':'identity2',
- 'division':'division2', 'audiooff':'audio', 'endfill':'stopfill',
- 'descriptionoff':'description','template3':'templatelist',
- 'template1':'template1x1', 'template2':'template2x1',
- 'template6':'template1x2', 'template7':'template2x2',
- 'template4':'template1x1a', 'hres':'width', 'vres':'height',
- 'sandwichtop2':'sandwichtop'}
+OLD_NAMES = {'product': 'product2', 'storeinbox': 'storein', 'minus': 'minus2',
+ 'division': 'division2', 'plus': 'plus2', 'and': 'and2',
+ 'or': 'or2', 'less': 'less2', 'greater': 'greater2',
+ 'equal': 'equal2', 'remainder': 'remainder2',
+ 'identity': 'identity2', 'division': 'division2',
+ 'audiooff': 'audio', 'endfill': 'stopfill',
+ 'descriptionoff': 'description', 'template3': 'templatelist',
+ 'template1': 'template1x1', 'template2': 'template2x1',
+ 'template6': 'template1x2', 'template7': 'template2x2',
+ 'template4': 'template1x1a', 'hres': 'width', 'vres': 'height',
+ 'sandwichtop2': 'sandwichtop'}
#
# Define the relative size and postion of media objects
-# (w, h, x, y, dx, dy)
+# (w, h, x, y, dx, dy)
#
TITLEXY = (0.9375, 0.875)
@@ -714,208 +721,209 @@ TEMPLATES = {'t1x1': (0.5, 0.5, 0.0625, 0.125, 1.05, 0),
# Names for blocks without names for popup help
#
SPECIAL_NAMES = {
- 'audio':_('audio'),
- 'division2':_('divide'),
- 'equal2':_('equal'),
- 'greater2':_('greater than'),
- 'hspace':_('horizontal space'),
- 'identity2':_('identity'),
- 'if':_('if then'),
- 'ifelse':_('if then else'),
- 'journal':_('journal'),
- 'less2':_('less than'),
- 'minus2':_('minus'),
- 'nop':_('Python code'),
- 'number':_('number'),
- 'plus2':_('plus'),
- 'product2':_('multiply'),
- 'sqrt':_('square root'),
- 'template1x1':_('presentation 1x1'),
- 'template1x1a':_('presentation 1x1'),
- 'template1x2':_('presentation 1x2'),
- 'template2x1':_('presentation 2x1'),
- 'template2x2':_('presentation 2x2'),
- 'templatelist':_('presentation bulleted list'),
- 'textsize':_('text size'),
- 'vspace':_('vertical space')}
+ 'audio': _('audio'),
+ 'division2': _('divide'),
+ 'equal2': _('equal'),
+ 'greater2': _('greater than'),
+ 'hspace': _('horizontal space'),
+ 'identity2': _('identity'),
+ 'if': _('if then'),
+ 'ifelse': _('if then else'),
+ 'journal': _('journal'),
+ 'less2': _('less than'),
+ 'minus2': _('minus'),
+ 'nop': _('Python code'),
+ 'number': _('number'),
+ 'plus2': _('plus'),
+ 'product2': _('multiply'),
+ 'sqrt': _('square root'),
+ 'template1x1': _('presentation 1x1'),
+ 'template1x1a': _('presentation 1x1'),
+ 'template1x2': _('presentation 1x2'),
+ 'template2x1': _('presentation 2x1'),
+ 'template2x2': _('presentation 2x2'),
+ 'templatelist': _('presentation bulleted list'),
+ 'textsize': _('text size'),
+ 'vspace': _('vertical space')}
#
# Help messages
#
HELP_STRINGS = {
- 'addturtle':_("chooses which turtle to command"),
- 'and2':_("logical AND operator"),
- 'arc':_("moves turtle along an arc"),
- 'audio':_("Sugar Journal audio object"),
- 'back':_("moves turtle backward"),
- 'blocks':_("Palette of variable blocks"),
- 'bottompos':_("ycor of bottom of screen"),
- 'box1':_("Variable 1 (numeric value)"),
- 'box2':_("Variable 2 (numeric value)"),
- 'box':_("named variable (numeric value)"),
- 'cartesian':_("displays Cartesian coordinates"),
- 'clean':_("clears the screen and reset the turtle"),
- 'clearheap':_("emptys FILO (first-in-last-out heap)"),
- 'color':_("holds current pen color (can be used in place of a number block)"),
- 'colors':_("Palette of pen colors"),
- 'comment':_("places a comment in your code"),
- 'debugoff':_("Debug"),
- 'description':_("Sugar Journal description field"),
- 'division2':_("divides top numeric input (numerator) by bottom numeric input (denominator)"),
- 'empty':_("permanently deletes items in trash"),
- 'eraseron':_("Clean"),
- 'equal2':_("logical equal-to operator"),
- 'extras':_("Palette of extra options"),
- 'fillscreen':_("fills the background with (color, shade)"),
- 'flow':_("Palette of flow operators"),
- 'forever':_("loops forever"),
- 'forward':_("moves turtle forward"),
- 'fullscreen':_("hides the Sugar toolbars"),
- 'gray':_("holds current gray level (can be used in place of a number block)"),
- 'greater2':_("logical greater-than operator"),
- 'hat1':_("top of Action 1 stack"),
- 'hat2':_("top of Action 2 stack"),
- 'hat':_("top of nameable action stack"),
- 'heading':_("holds current heading value of the turtle (can be used in place of a number block)"),
- 'height':_("the canvas height"),
- 'hideblocks':_("declutters canvas by hiding blocks"),
- 'hideshowoff':_("Hide blocks"),
- 'hspace':_("jogs stack right"),
- 'identity2':_("identity operator used for extending blocks"),
- 'ifelse':_("if-then-else operator that uses boolean operators from Numbers palette"),
- 'if':_("if-then operator that uses boolean operators from Numbers palette"),
- 'journal':_("Sugar Journal media object"),
- 'kbinput':_("query for keyboard input (results stored in keyboard block)"),
- 'keyboard':_("holds results of query-keyboard block"),
- 'leftpos':_("xcor of left of screen"),
- 'left':_("turns turtle counterclockwise (angle in degrees)"),
- 'less2':_("logical less-than operator"),
- 'minus2':_("subtracts bottom numeric input from top numeric input"),
- 'myfunc':_("a programmable block: used to add advanced math equations, e.g., sin(x)"),
- 'myfunc1arg':_("a programmable block: used to add advanced single-variable math equations, e.g., sin(x)"),
- 'myfunc2arg':_("a programmable block: used to add advanced multi-variable math equations, e.g., sqrt(x*x+y*y)"),
- 'myfunc3arg':_("a programmable block: used to add advanced multi-variable math equations, e.g., sin(x+y+z)"),
- 'next':_('displays next palette'),
- 'nop':_("runs code found in the tamyblock.py module found in the Journal"),
- 'not':_("logical NOT operator"),
- 'numbers':_("Palette of numeric operators"),
- 'number':_("used as numeric input in mathematic operators"),
- 'or':_("logical OR operator"),
- 'orientation':_("changes the orientation of the palette of blocks"),
- 'pendown':_("Turtle will draw when moved."),
- 'pen':_("Palette of pen commands"),
- 'pensize':_("holds current pen size (can be used in place of a number block)"),
- 'penup':_("Turtle will not draw when moved."),
- 'picture1x1':_("presentation template: select Journal object (with description)"),
- 'picture1x1a':_("presentation template: select Journal object (no description)"),
- 'picture1x2':_("presentation template: select two Journal objects"),
- 'picture2x1':_("presentation template: select two Journal objects"),
- 'picture2x2':_("presentation template: select four Journal objects"),
- 'picturelist':_("presentation template: list of bullets"),
- 'pitch':_('microphone input pitch'),
- 'plus2':_("adds two alphanumeric inputs"),
- 'polar':_("displays polar coordinates"),
- 'pop':_("pops value off FILO (first-in last-out heap)"),
- 'portfolio':_("Palette of presentation templates"),
- 'print':_("prints value in status block at bottom of the screen"),
- 'printheap':_("shows values in FILO (first-in last-out heap)"),
- 'product2':_("multiplies two numeric inputs"),
- 'push':_("pushes value onto FILO (first-in last-out heap)"),
- 'random':_("returns random number between minimum (top) and maximum (bottom) values"),
- 'readpixel':_("RGB color under the turtle is pushed to the stack"),
- 'remainder2':_("modular (remainder) operator"),
- 'repeat':_("loops specified number of times"),
- 'resistance':_("sensor input resistance"),
- 'reskin':_("put a custom 'shell' on the turtle"),
- 'restore':_("restores most recent blocks from trash"),
- 'restoreall':_("restore all blocks from trash"),
- 'rightpos':_("xcor of right of screen"),
- 'right':_("turns turtle clockwise (angle in degrees)"),
- 'run-fastoff':_("Run"),
- 'run-slowoff':_("Step"),
- 'sandwichbottom':_("bottom block in a collapsibe stack: click to collapse"),
- 'sandwichcollapsed':_("bottom block in a collapsed stack: click to open"),
- 'sandwichtop':_("top of a collapsible stack"),
- 'sandwichtop_no_label':_("top of a collapsed stack"),
- 'sandwichtop_no_arm':_("top of a collapsible stack"),
- 'sandwichtop_no_arm_no_label':_("top of a collapsed stack"),
- 'savepix':_("saves a picture to the Sugar Journal"),
- 'savesvg':_("saves turtle graphics as an SVG file in the Sugar Journal"),
- 'scale':_("holds current scale value"),
- 'see':_('returns the color that the turtle "sees"'),
- 'setcolor':_("sets color of the line drawn by the turtle"),
- 'setgray':_("sets gray level of the line drawn by the turtle"),
- 'seth':_("sets the heading of the turtle (0 is towards the top of the screen.)"),
- 'setpensize':_("sets size of the line drawn by the turtle"),
- 'setscale':_("sets the scale of media"),
- 'setshade':_("sets shade of the line drawn by the turtle"),
- 'settextcolor':_("sets color of text drawn by the turtle"),
- 'settextsize':_("sets size of text drawn by turtle"),
- 'setxy':_("moves turtle to position xcor, ycor; (0, 0) is in the center of the screen."),
- 'setxy2':_("moves turtle to position xcor, ycor; (0, 0) is in the center of the screen."),
- 'shade':_("holds current pen shade"),
- 'show':_("draws text or show media from the Journal"),
- 'showblocks':_("restores hidden blocks"),
- 'skin':_("put a custom 'shell' on the turtle"),
- 'sqrt':_("calculates square root"),
- 'stack1':_("invokes Action 1 stack"),
- 'stack2':_("invokes Action 2 stack"),
- 'stack':_("invokes named action stack"),
- 'start':_("connects action to toolbar run buttons"),
- 'startfill':_("starts filled polygon (used with end fill block)"),
- 'stopfill':_("completes filled polygon (used with start fill block)"),
- 'stopiton':_("Stop turtle"),
- 'stopstack':_("stops current action"),
- 'storeinbox1':_("stores numeric value in Variable 1"),
- 'storeinbox2':_("stores numeric value in Variable 2"),
- 'storein':_("stores numeric value in named variable"),
- 'string':_("string value"),
- 'template1x1':_("presentation template: select Journal object (with description)"),
- 'template1x1a':_("presentation template: select Journal object (no description)"),
- 'template1x2':_("presentation template: select two Journal objects"),
- 'template2x1':_("presentation template: select two Journal objects"),
- 'template2x2':_("presentation template: select four Journal objects"),
- 'templatelist':_("presentation template: list of bullets"),
- 'textcolor':_("holds current text color (can be used in place of a number block)"),
- 'textsize':_("holds current text size (can be used in place of a number block)"),
- 'toppos':_("ycor of top of screen"),
- 'trash':_("Trashcan"),
- 'turtle':_("Palette of turtle commands"),
- 'until':_("do-until-True operator that uses boolean operators from Numbers palette"),
- 'userdefined':_("runs code found in the tamyblock.py module found in the Journal"),
- 'userdefined2args':_("runs code found in the tamyblock.py module found in the Journal"),
- 'userdefined3args':_("runs code found in the tamyblock.py module found in the Journal"),
- 'voltage':_("sensor voltage"),
- 'volume':_("microphone input volume"),
- 'vspace':_("jogs stack down"),
- 'wait':_("pauses program execution a specified number of seconds"),
- 'while':_("do-while-True operator that uses boolean operators from Numbers palette"),
- 'width':_("the canvas width"),
- 'xcor':_("holds current x-coordinate value of the turtle (can be used in place of a number block)"),
- 'ycor':_("holds current y-coordinate value of the turtle (can be used in place of a number block)")}
+ 'addturtle': _("chooses which turtle to command"),
+ 'and2': _("logical AND operator"),
+ 'arc': _("moves turtle along an arc"),
+ 'audio': _("Sugar Journal audio object"),
+ 'back': _("moves turtle backward"),
+ 'blocks': _("Palette of variable blocks"),
+ 'bottompos': _("ycor of bottom of screen"),
+ 'box1': _("Variable 1 (numeric value)"),
+ 'box2': _("Variable 2 (numeric value)"),
+ 'box': _("named variable (numeric value)"),
+ 'cartesian': _("displays Cartesian coordinates"),
+ 'clean': _("clears the screen and reset the turtle"),
+ 'clearheap': _("emptys FILO (first-in-last-out heap)"),
+ 'color': _("holds current pen color (can be used in place of a number block)"),
+ 'colors': _("Palette of pen colors"),
+ 'comment': _("places a comment in your code"),
+ 'debugoff': _("Debug"),
+ 'description': _("Sugar Journal description field"),
+ 'division2': _("divides top numeric input (numerator) by bottom numeric input (denominator)"),
+ 'empty': _("permanently deletes items in trash"),
+ 'eraseron': _("Clean"),
+ 'equal2': _("logical equal-to operator"),
+ 'extras': _("Palette of extra options"),
+ 'fillscreen': _("fills the background with (color, shade)"),
+ 'flow': _("Palette of flow operators"),
+ 'forever': _("loops forever"),
+ 'forward': _("moves turtle forward"),
+ 'fullscreen': _("hides the Sugar toolbars"),
+ 'gray': _("holds current gray level (can be used in place of a number block)"),
+ 'greater2': _("logical greater-than operator"),
+ 'hat1': _("top of Action 1 stack"),
+ 'hat2': _("top of Action 2 stack"),
+ 'hat': _("top of nameable action stack"),
+ 'heading': _("holds current heading value of the turtle (can be used in place of a number block)"),
+ 'height': _("the canvas height"),
+ 'hideblocks': _("declutters canvas by hiding blocks"),
+ 'hideshowoff': _("Hide blocks"),
+ 'hspace': _("jogs stack right"),
+ 'identity2': _("identity operator used for extending blocks"),
+ 'ifelse': _("if-then-else operator that uses boolean operators from Numbers palette"),
+ 'if': _("if-then operator that uses boolean operators from Numbers palette"),
+ 'journal': _("Sugar Journal media object"),
+ 'kbinput': _("query for keyboard input (results stored in keyboard block)"),
+ 'keyboard': _("holds results of query-keyboard block"),
+ 'leftpos': _("xcor of left of screen"),
+ 'left': _("turns turtle counterclockwise (angle in degrees)"),
+ 'less2': _("logical less-than operator"),
+ 'minus2': _("subtracts bottom numeric input from top numeric input"),
+ 'myfunc': _("a programmable block: used to add advanced math equations, e.g., sin(x)"),
+ 'myfunc1arg': _("a programmable block: used to add advanced single-variable math equations, e.g., sin(x)"),
+ 'myfunc2arg': _("a programmable block: used to add advanced multi-variable math equations, e.g., sqrt(x*x+y*y)"),
+ 'myfunc3arg': _("a programmable block: used to add advanced multi-variable math equations, e.g., sin(x+y+z)"),
+ 'next': _('displays next palette'),
+ 'nop': _("runs code found in the tamyblock.py module found in the Journal"),
+ 'not': _("logical NOT operator"),
+ 'numbers': _("Palette of numeric operators"),
+ 'number': _("used as numeric input in mathematic operators"),
+ 'or': _("logical OR operator"),
+ 'orientation': _("changes the orientation of the palette of blocks"),
+ 'pendown': _("Turtle will draw when moved."),
+ 'pen': _("Palette of pen commands"),
+ 'pensize': _("holds current pen size (can be used in place of a number block)"),
+ 'penup': _("Turtle will not draw when moved."),
+ 'picture1x1': _("presentation template: select Journal object (with description)"),
+ 'picture1x1a': _("presentation template: select Journal object (no description)"),
+ 'picture1x2': _("presentation template: select two Journal objects"),
+ 'picture2x1': _("presentation template: select two Journal objects"),
+ 'picture2x2': _("presentation template: select four Journal objects"),
+ 'picturelist': _("presentation template: list of bullets"),
+ 'pitch': _('microphone input pitch'),
+ 'plus2': _("adds two alphanumeric inputs"),
+ 'polar': _("displays polar coordinates"),
+ 'pop': _("pops value off FILO (first-in last-out heap)"),
+ 'portfolio': _("Palette of presentation templates"),
+ 'print': _("prints value in status block at bottom of the screen"),
+ 'printheap': _("shows values in FILO (first-in last-out heap)"),
+ 'product2': _("multiplies two numeric inputs"),
+ 'push': _("pushes value onto FILO (first-in last-out heap)"),
+ 'random': _("returns random number between minimum (top) and maximum (bottom) values"),
+ 'readpixel': _("RGB color under the turtle is pushed to the stack"),
+ 'remainder2': _("modular (remainder) operator"),
+ 'repeat': _("loops specified number of times"),
+ 'resistance': _("sensor input resistance"),
+ 'reskin': _("put a custom 'shell' on the turtle"),
+ 'restore': _("restores most recent blocks from trash"),
+ 'restoreall': _("restore all blocks from trash"),
+ 'rightpos': _("xcor of right of screen"),
+ 'right': _("turns turtle clockwise (angle in degrees)"),
+ 'run-fastoff': _("Run"),
+ 'run-slowoff': _("Step"),
+ 'sandwichbottom': _("bottom block in a collapsibe stack: click to collapse"),
+ 'sandwichcollapsed': _("bottom block in a collapsed stack: click to open"),
+ 'sandwichtop': _("top of a collapsible stack"),
+ 'sandwichtop_no_label': _("top of a collapsed stack"),
+ 'sandwichtop_no_arm': _("top of a collapsible stack"),
+ 'sandwichtop_no_arm_no_label': _("top of a collapsed stack"),
+ 'savepix': _("saves a picture to the Sugar Journal"),
+ 'savesvg': _("saves turtle graphics as an SVG file in the Sugar Journal"),
+ 'scale': _("holds current scale value"),
+ 'see': _('returns the color that the turtle "sees"'),
+ 'setcolor': _("sets color of the line drawn by the turtle"),
+ 'setgray': _("sets gray level of the line drawn by the turtle"),
+ 'seth': _("sets the heading of the turtle (0 is towards the top of the screen.)"),
+ 'setpensize': _("sets size of the line drawn by the turtle"),
+ 'setscale': _("sets the scale of media"),
+ 'setshade': _("sets shade of the line drawn by the turtle"),
+ 'settextcolor': _("sets color of text drawn by the turtle"),
+ 'settextsize': _("sets size of text drawn by turtle"),
+ 'setxy': _("moves turtle to position xcor, ycor; (0, 0) is in the center of the screen."),
+ 'setxy2': _("moves turtle to position xcor, ycor; (0, 0) is in the center of the screen."),
+ 'shade': _("holds current pen shade"),
+ 'show': _("draws text or show media from the Journal"),
+ 'showblocks': _("restores hidden blocks"),
+ 'skin': _("put a custom 'shell' on the turtle"),
+ 'sqrt': _("calculates square root"),
+ 'stack1': _("invokes Action 1 stack"),
+ 'stack2': _("invokes Action 2 stack"),
+ 'stack': _("invokes named action stack"),
+ 'start': _("connects action to toolbar run buttons"),
+ 'startfill': _("starts filled polygon (used with end fill block)"),
+ 'stopfill': _("completes filled polygon (used with start fill block)"),
+ 'stopiton': _("Stop turtle"),
+ 'stopstack': _("stops current action"),
+ 'storeinbox1': _("stores numeric value in Variable 1"),
+ 'storeinbox2': _("stores numeric value in Variable 2"),
+ 'storein': _("stores numeric value in named variable"),
+ 'string': _("string value"),
+ 'template1x1': _("presentation template: select Journal object (with description)"),
+ 'template1x1a': _("presentation template: select Journal object (no description)"),
+ 'template1x2': _("presentation template: select two Journal objects"),
+ 'template2x1': _("presentation template: select two Journal objects"),
+ 'template2x2': _("presentation template: select four Journal objects"),
+ 'templatelist': _("presentation template: list of bullets"),
+ 'textcolor': _("holds current text color (can be used in place of a number block)"),
+ 'textsize': _("holds current text size (can be used in place of a number block)"),
+ 'toppos': _("ycor of top of screen"),
+ 'trash': _("Trashcan"),
+ 'turtle': _("Palette of turtle commands"),
+ 'until': _("do-until-True operator that uses boolean operators from Numbers palette"),
+ 'userdefined': _("runs code found in the tamyblock.py module found in the Journal"),
+ 'userdefined2args': _("runs code found in the tamyblock.py module found in the Journal"),
+ 'userdefined3args': _("runs code found in the tamyblock.py module found in the Journal"),
+ 'voltage': _("sensor voltage"),
+ 'volume': _("microphone input volume"),
+ 'vspace': _("jogs stack down"),
+ 'wait': _("pauses program execution a specified number of seconds"),
+ 'while': _("do-while-True operator that uses boolean operators from Numbers palette"),
+ 'width': _("the canvas width"),
+ 'xcor': _("holds current x-coordinate value of the turtle (can be used in place of a number block)"),
+ 'ycor': _("holds current y-coordinate value of the turtle (can be used in place of a number block)")}
#
# 'dead key' Unicode dictionaries
#
-DEAD_KEYS = ['grave','acute','circumflex','tilde','diaeresis','abovering']
-DEAD_DICTS = [{'A':192,'E':200,'I':204,'O':210,'U':217,'a':224,'e':232,'i':236,
- 'o':242,'u':249},
- {'A':193,'E':201,'I':205,'O':211,'U':218,'a':225,'e':233,'i':237,
- 'o':243,'u':250},
- {'A':194,'E':202,'I':206,'O':212,'U':219,'a':226,'e':234,
- 'i':238,'o':244,'u':251},
- {'A':195,'O':211,'N':209,'U':360,'a':227,'o':245,'n':241,'u':361},
- {'A':196,'E':203,'I':207,'O':211,'U':218,'a':228,'e':235,
- 'i':239,'o':245,'u':252},
- {'A':197,'a':229}]
+DEAD_KEYS = ['grave', 'acute', 'circumflex', 'tilde', 'diaeresis', 'abovering']
+DEAD_DICTS = [{'A':192, 'E':200, 'I':204, 'O':210, 'U':217, 'a':224, 'e':232,
+ 'i':236, 'o':242, 'u':249},
+ {'A':193, 'E':201, 'I':205, 'O':211, 'U':218, 'a':225, 'e':233,
+ 'i':237, 'o':243, 'u':250},
+ {'A':194, 'E':202, 'I':206, 'O':212, 'U':219, 'a':226, 'e':234,
+ 'i':238, 'o':244, 'u':251},
+ {'A':195, 'O':211, 'N':209, 'U':360, 'a':227, 'o':245, 'n':241,
+ 'u':361},
+ {'A':196, 'E':203, 'I':207, 'O':211, 'U':218, 'a':228, 'e':235,
+ 'i':239, 'o':245, 'u':252},
+ {'A':197, 'a':229}]
NOISE_KEYS = ['Shift_L', 'Shift_R', 'Control_L', 'Caps_Lock', 'Pause',
'Alt_L', 'Alt_R', 'KP_Enter', 'ISO_Level3_Shift', 'KP_Divide',
'Escape', 'Return', 'KP_Page_Up', 'Up', 'Down', 'Menu',
'Left', 'Right', 'KP_Home', 'KP_End', 'KP_Up', 'Super_L',
'KP_Down', 'KP_Left', 'KP_Right', 'KP_Page_Down', 'Scroll_Lock',
'Page_Down', 'Page_Up']
-WHITE_SPACE = ['space','Tab']
+WHITE_SPACE = ['space', 'Tab']
CURSOR = '█'
RETURN = '⏎'
@@ -959,7 +967,7 @@ MACROS = {
[6, 'setscale', 0, 0, [5, 7, 8]],
[7, ['number', '100'], 0, 0, [6, None]],
[8, 'show', 0, 0, [6, 9, 10]],
- [9, ['string',_('Title')], 0, 0, [8, None]],
+ [9, ['string', _('Title')], 0, 0, [8, None]],
[10, 'penup', 0, 0, [8, 11]],
[11, 'setxy2', 0, 0, [10, 12, 13, 14]],
[12, 'leftx', 0, 0, [11, None]],
@@ -968,8 +976,8 @@ MACROS = {
[15, 'setscale', 0, 0, [14, 16, 17]],
[16, ['number', '67'], 0, 0, [15, None]],
[17, 'list', 0, 0, [15, 18, 19, 20]],
- [18, ['string','∙ '], 0, 0, [17, None]],
- [19, ['string','∙ '], 0, 0, [17, None]],
+ [18, ['string', '∙ '], 0, 0, [17, None]],
+ [19, ['string', '∙ '], 0, 0, [17, None]],
[20, 'sandwichbottom', 0, 0, [17, None]]],
'picture1x1a':
[[0, 'sandwichtop_no_label', 0, 0, [None, 1]],
@@ -981,7 +989,7 @@ MACROS = {
[6, 'setscale', 0, 0, [5, 7, 8]],
[7, ['number', '100'], 0, 0, [6, None]],
[8, 'show', 0, 0, [6, 9, 10]],
- [9, ['string',_('Title')], 0, 0, [8, None]],
+ [9, ['string', _('Title')], 0, 0, [8, None]],
[10, 'penup', 0, 0, [8, 11]],
[11, 'setxy2', 0, 0, [10, 12, 13, 14]],
[12, 'leftx', 0, 0, [11, None]],
@@ -1002,7 +1010,7 @@ MACROS = {
[6, 'setscale', 0, 0, [5, 7, 8]],
[7, ['number', '100'], 0, 0, [6, None]],
[8, 'show', 0, 0, [6, 9, 10]],
- [9, ['string',_('Title')], 0, 0, [8, None]],
+ [9, ['string', _('Title')], 0, 0, [8, None]],
[10, 'setscale', 0, 0, [8, 11, 12]],
[11, ['number', '35'], 0, 0, [10, None]],
[12, 'penup', 0, 0, [10, 13]],
@@ -1044,7 +1052,7 @@ MACROS = {
[6, 'setscale', 0, 0, [5, 7, 8]],
[7, ['number', '100'], 0, 0, [6, None]],
[8, 'show', 0, 0, [6, 9, 10]],
- [9, ['string',_('Title')], 0, 0, [8, None]],
+ [9, ['string', _('Title')], 0, 0, [8, None]],
[10, 'setscale', 0, 0, [8, 11, 12]],
[11, ['number', '35'], 0, 0, [10, None]],
[12, 'penup', 0, 0, [10, 13]],
@@ -1086,7 +1094,7 @@ MACROS = {
[6, 'setscale', 0, 0, [5, 7, 8]],
[7, ['number', '100'], 0, 0, [6, None]],
[8, 'show', 0, 0, [6, 9, 10]],
- [9, ['string',_('Title')], 0, 0, [8, None]],
+ [9, ['string', _('Title')], 0, 0, [8, None]],
[10, 'setscale', 0, 0, [8, 11, 12]],
[11, ['number', '35'], 0, 0, [10, None]],
[12, 'penup', 0, 0, [10, 13]],
@@ -1128,7 +1136,7 @@ MACROS = {
[6, 'setscale', 0, 0, [5, 7, 8]],
[7, ['number', '100'], 0, 0, [6, None]],
[8, 'show', 0, 0, [6, 9, 10]],
- [9, ['string',_('Title')], 0, 0, [8, None]],
+ [9, ['string', _('Title')], 0, 0, [8, None]],
[10, 'setscale', 0, 0, [8, 11, 12]],
[11, ['number', '35'], 0, 0, [10, None]],
[12, 'penup', 0, 0, [10, 13]],
@@ -1148,5 +1156,4 @@ MACROS = {
[26, 'sandwichbottom', 0, 0, [24, None]]],
'reskin':
[[0, 'skin', 0, 0, [None, 1, None]],
- [1, 'journal', 0, 0, [0, None]]]
- }
+ [1, 'journal', 0, 0, [0, None]]]}